*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #e91e8c;
    --primary-hover: #c4177a;
    --primary-light: #fce4f2;
    --success: #e91e8c;
    --danger: #dc3545;
    --bg: #fff0f6;
    --card-bg: #ffffff;
    --text: #4a2040;
    --text-light: #8c5070;
    --border: #f5c6e0;
    --shadow: 0 2px 8px rgba(233, 30, 140, 0.1);
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, #fce4ec, #f8bbd0, #f48fb1);
    color: #880e4f;
    text-align: center;
    padding: 2.5rem 1rem;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '🍼  👶🏻  🧸  🎀  🌸  👣  🍼  👶🏻  🧸  🎀  🌸  👣';
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    font-size: 1.1rem;
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
}

header::after {
    content: '👣  🌸  🎀  🧸  👶🏻  🍼  👣  🌸  🎀  🧸  👶🏻  🍼';
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    font-size: 1.1rem;
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
    position: relative;
}

main {
    flex: 1;
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

.loading {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--text-light);
}

/* Lista de regalos */
.regalos-lista {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.regalo-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.regalo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 30, 140, 0.15);
}

.regalo-info {
    flex: 1;
}

.regalo-info h3 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    color: var(--text);
}

.regalo-info p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.btn-elegir {
    padding: 0.6rem 1.2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.btn-elegir:hover { background: var(--primary-hover); }
.btn-elegir:focus { outline: 3px solid rgba(233, 30, 140, 0.3); outline-offset: 2px; }

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    font-size: 1.3rem;
    color: var(--text-light);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(74, 32, 64, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    position: relative;
    animation: modalIn 0.3s ease;
    border: 1px solid var(--border);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-close:hover { color: var(--text); }

.modal-regalo-nombre {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.modal-regalo-nombre-grande {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
    padding: 0.75rem;
    background: var(--primary-light);
    border-radius: 8px;
}

.resumen-seleccion {
    text-align: left;
    background: var(--primary-light);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.resumen-seleccion p {
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 1rem;
}

.resumen-seleccion .resumen-label {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.85rem;
}

.resumen-seleccion .resumen-valor {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
}

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: 0.4rem; font-size: 0.9rem; }
.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}
.form-group input:focus { outline: none; border-color: var(--primary); }

.btn-confirmar {
    display: block;
    width: 100%;
    padding: 0.85rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-confirmar:hover { background: var(--primary-hover); }
.btn-confirmar:disabled { background: #f5c6e0; cursor: not-allowed; }

.form-error {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #ffe0e0;
    color: var(--danger);
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}

.modal-exito-content { text-align: center; }
.modal-exito-content h2 { font-size: 1.8rem; margin-bottom: 1rem; }
.modal-exito-content p { margin-bottom: 1.5rem; color: var(--text-light); }

footer { text-align: center; padding: 1.5rem; color: var(--text-light); font-size: 0.9rem; }
.hidden { display: none !important; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 768px) {
    header { padding: 2rem 1rem; }
    header h1 { font-size: 1.6rem; }
    header::before, header::after { font-size: 1rem; }
    main { padding: 1.5rem 0.75rem; }
    .modal-content { padding: 1.5rem; margin: 0.5rem; }
}

@media (max-width: 480px) {
    header { padding: 1.5rem 0.75rem; }
    header h1 { font-size: 1.3rem; }
    header::before, header::after { font-size: 0.85rem; }
    .regalo-item { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .btn-elegir { width: 100%; text-align: center; padding: 0.75rem; }
    .modal-content { padding: 1.25rem; }
    .modal-regalo-nombre-grande { font-size: 1.2rem; }
}
