/* ===============================
   FONDO Y TIPOGRAFÍA
=============================== */
body {
    margin: 0;
    padding: 0;
    font-family: 'Garamond', 'Times New Roman', serif;
    background: linear-gradient(160deg, #fff0e5, #ffe6d9);
    color: #5b3a29;
    overflow-x: hidden;
}

h2 {
    text-align: center;
    font-size: 32px;
    color: #a3423c;
    margin-top: 20px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

/* ===============================
   BOTÓN NUEVA CARTA
=============================== */
.crear-carta button {
    display: block;
    margin: 20px auto;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 12px;
    border: 2px solid #d8a47f;
    background: linear-gradient(135deg, #fce4d6, #f9c7b8);
    color: #5b3a29;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.25s, box-shadow 0.25s;
}

.crear-carta button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* ===============================
   POPUP NUEVA CARTA
=============================== */
.popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
    z-index: 9999;
}

.popup.hidden {
    display: none;
}

.popup-content {
    background: #fff1e6;
    padding: 24px 32px;
    border-radius: 20px;
    border: 3px solid #d8a47f;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    position: relative;
    max-width: 400px;
    width: 90%;
}

.popup-content label {
    font-weight: bold;
    margin-bottom: 8px;
    display: block;
}

.popup-content input {
    width: 100%;
    padding: 10px;
    margin-bottom: 14px;
    border-radius: 10px;
    border: 2px solid #d8a47f;
    font-size: 14px;
}

.popup-content button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #f9c7b8, #f2a68b);
    color: #5b3a29;
    font-weight: bold;
    cursor: pointer;
    transition: 0.25s;
}

.popup-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* CERRAR */
.cerrar {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 32px;
    cursor: pointer;
    color: #a3423c;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

/* ===============================
   LISTADO DE CARTAS
=============================== */
.cartas-listado {
    width: 90%;
    max-width: 600px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.carta {
    background: #fff2e6;
    border: 2px solid #d8a47f;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    font-size: 16px;
    line-height: 1.5;
    position: relative;
    transition: transform 0.25s;
    margin-bottom: 15px;
}

.carta:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.15);
}

.carta p {
    margin: 0;
}

/* ===============================
   RESPONSIVE
=============================== */
@media(max-width: 430px) {
    .popup-content { padding: 18px 20px; }
    .popup-content input, .popup-content button { font-size: 14px; }
    .cartas-listado { width: 95%; }
}
