:root {
    --primary: #d4a5a5;
    --secondary: #9c7c7c;
    --accent: #ffd6d6;
    --dark: #4a2c2c;
    --bg: #fff9f5;
    --text: #2d1f1f;
    --gold: #d4af37;
    --rose: #ff9eaf;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Optimización para móviles */
html, body {
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Cormorant Garamond', serif;
    background: linear-gradient(135deg, #fff9f5 0%, #ffe8e8 50%, #fff9f5 100%);
    color: var(--text);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    overscroll-behavior-y: contain;
}

/* Custom cursor (solo desktop) */
@media (hover: hover) and (pointer: fine) {
    body {
        cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><text y="20" font-size="20">💕</text></svg>') 12 12, auto;
    }

    button,
    .dot {
        cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><text y="20" font-size="20">👆</text></svg>') 12 12, pointer;
    }
}

/* Animated gradient background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 214, 214, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(212, 165, 165, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 158, 175, 0.15) 0%, transparent 50%);
    animation: moveGradient 15s ease infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes moveGradient {
    0%, 100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1) rotate(5deg);
    }
}

/* Confetti Canvas */
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

/* Enhanced particle system */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.heart {
    position: absolute;
    font-size: 20px;
    opacity: 0;
    animation: floatHeart 12s infinite ease-in-out;
    will-change: transform, opacity;
    transform: translateZ(0);
}

@keyframes floatHeart {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
        transform: translateY(90vh) translateX(10px) rotate(10deg) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translateY(40vh) translateX(-30px) rotate(-20deg) scale(0.8);
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-10vh) translateX(50px) rotate(30deg) scale(0);
        opacity: 0;
    }
}

/* Sparkles with color variation */
.sparkles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: twinkle 3s infinite ease-in-out;
    will-change: transform, opacity;
    transform: translateZ(0);
}

.sparkle.gold {
    background: linear-gradient(45deg, var(--gold), white);
    box-shadow: 0 0 10px var(--gold);
}

.sparkle.rose {
    background: linear-gradient(45deg, var(--rose), white);
    box-shadow: 0 0 10px var(--rose);
}

.sparkle.white {
    background: linear-gradient(45deg, white, var(--accent));
    box-shadow: 0 0 10px white;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.8) rotate(180deg);
    }
}

/* Loading screen enhancement */
.loading-screen, .start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffd6d6 0%, #d4a5a5 50%, #ffd6d6 100%);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 1000;
    transition: opacity 1s ease, visibility 1s ease;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.loading-screen.hidden, .start-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-heart {
    font-size: 5rem;
    animation: heartbeatPulse 1.2s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(212, 165, 165, 1));
}

@keyframes heartbeatPulse {
    0%, 100% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.3);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.3);
    }
    56% {
        transform: scale(1);
    }
}

.loading-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-style: italic;
    color: var(--dark);
    margin-top: 2rem;
    opacity: 0;
    animation: fadeInSlide 1s ease forwards 0.5s;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.5);
    text-align: center;
    padding: 0 1.5rem;
    max-width: 90%;
}

#startName {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-top: 1.5rem;
    opacity: 0;
    animation: fadeInSlide 1s ease forwards 1s;
    letter-spacing: 3px;
    text-shadow: 0 3px 15px rgba(212, 165, 165, 0.6);
    text-align: center;
    padding: 0 1rem;
}

.loading-progress {
    width: 80%;
    max-width: 250px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin-top: 2rem;
    overflow: hidden;
    opacity: 0;
    animation: fadeInSlide 1s ease forwards 1.2s;
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--rose), var(--gold));
    width: 0;
    animation: loadProgress 2s ease forwards 1.5s;
    box-shadow: 0 0 10px var(--gold);
}

@keyframes loadProgress {
    to {
        width: 100%;
    }
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Start button in start screen */
#startBtn {
    margin-top: 3rem;
    padding: 1.2rem 3rem;
    font-size: 1.4rem;
    font-family: 'Cinzel', serif;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(156, 124, 124, 0.4);
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

#startBtn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 30px rgba(156, 124, 124, 0.5);
}

/* Main container */
.container {
    position: relative;
    z-index: 2;
    max-width: 950px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    min-height: 100dvh; /* Soporte para dispositivos móviles */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Card wrapper with enhanced 3D */
.card-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    perspective: 2000px;
}

/* Enhanced page card */
.page {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 25px;
    padding: 3rem 2rem;
    box-shadow:
        0 25px 70px rgba(156, 124, 124, 0.25),
        0 0 0 1px rgba(212, 165, 165, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    border: 2px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
    will-change: transform, opacity, box-shadow;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    min-height: 450px;
}

/* Enhanced shimmer */
.page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.4) 50%,
            transparent 70%);
    animation: shimmer 8s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% {
        transform: translateX(-100%) translateY(-100%) rotate(0deg);
    }
    50% {
        transform: translateX(100%) translateY(100%) rotate(10deg);
    }
}

.page.active {
    opacity: 1;
    transform: translateY(0) scale(1) rotateY(0deg);
    pointer-events: all;
    position: relative;
}

/* Remove old slide animations */
.page.exit-left, .page.exit-right {
    animation: none !important;
}

/* New flip animations */
.flip-out-next {
    animation: flipOutNext 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform-origin: left center;
}

.flip-out-prev {
    animation: flipOutPrev 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform-origin: right center;
}

@keyframes flipOutNext {
    0% {
        transform: rotateY(0deg);
        box-shadow: 0 25px 70px rgba(156, 124, 124, 0.25);
        opacity: 1;
    }
    50% {
        transform: rotateY(-90deg);
        box-shadow: -20px 0 40px rgba(0, 0, 0, 0.3);
        opacity: 1;
    }
    100% {
        transform: rotateY(-180deg);
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
        opacity: 0;
    }
}

@keyframes flipOutPrev {
    0% {
        transform: rotateY(0deg);
        box-shadow: 0 25px 70px rgba(156, 124, 124, 0.25);
        opacity: 1;
    }
    50% {
        transform: rotateY(90deg);
        box-shadow: 20px 0 40px rgba(0, 0, 0, 0.3);
        opacity: 1;
    }
    100% {
        transform: rotateY(180deg);
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
        opacity: 0;
    }
}

/* Enhanced page emoji */
.page-emoji {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 1.5rem;
    animation: emojiFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(212, 165, 165, 0.4));
}

@keyframes emojiFloat {
    0%, 100% {
        transform: translateY(0) rotate(-5deg);
    }
    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

/* Recipient name on first page */
.recipient-name {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--primary);
    margin-bottom: 2rem;
    letter-spacing: 2px;
    text-shadow: 0 3px 10px rgba(212, 165, 165, 0.3);
    animation: fadeIn 1s ease 0.5s backwards;
}

/* Page title */
.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 600;
    font-style: italic;
    text-align: center;
    color: var(--dark);
    margin-bottom: 1rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(212, 165, 165, 0.2);
    animation: fadeIn 1s ease 0.8s backwards;
    line-height: 1.3;
}

/* Page subtitle */
.page-subtitle {
    font-family: 'Bodoni Moda', serif;
    font-size: 1.1rem;
    text-align: center;
    color: var(--secondary);
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
    opacity: 0.9;
    animation: fadeIn 1s ease 1s backwards;
}

/* Page content */
.page-content {
    font-size: 1.3rem;
    line-height: 2;
    text-align: justify;
    color: var(--text);
    max-width: 85%;
    margin: 0 auto;
    animation: fadeIn 1s ease 1.2s backwards;
    hyphens: auto;
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    gap: 1rem;
    z-index: 3;
    position: relative;
}

.nav-button {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    padding: 0.9rem 1.8rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(212, 165, 165, 0.3);
    letter-spacing: 1px;
    opacity: 1;
    transform: scale(1);
}

.nav-button:hover:not(:disabled) {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 7px 20px rgba(212, 165, 165, 0.4);
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: scale(0.95);
}

/* Page indicator */
.page-indicator {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: var(--secondary);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 3px 15px rgba(212, 165, 165, 0.2);
    letter-spacing: 1px;
    flex-shrink: 1;
    text-align: center;
    min-width: 70px;
}

/* Page dots */
.dots {
    display: flex;
    justify-content: center;
    gap: 0.7rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(212, 165, 165, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dot:hover {
    background: rgba(212, 165, 165, 0.5);
    transform: scale(1.2);
}

.dot.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transform: scale(1.3);
    box-shadow: 0 3px 10px rgba(212, 165, 165, 0.5);
    border-color: white;
}

/* Credits styling - Creative and subtle */
.credits {
    margin-top: 1rem;
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 0.8rem;
    color: var(--secondary);
    opacity: 0.3;
    transition: all 0.5s ease;
    letter-spacing: 1.5px;
    font-style: italic;
    cursor: default;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.credits:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.credits-heart {
    font-size: 0.7rem;
    animation: simplePulse 2s infinite;
    display: inline-block;
}

@keyframes simplePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.credits-author {
    font-weight: 600;
    position: relative;
}

.credits-author::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.credits:hover .credits-author::after {
    width: 100%;
}

.credits.visible-end {
    opacity: 0.6;
}

/* Decorative accents on page */
.accent-1, .accent-2, .accent-3, .accent-4 {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.15;
    pointer-events: none;
    animation: floatAccent 6s ease-in-out infinite;
}

.accent-1 {
    top: 20px;
    left: 20px;
    animation-delay: 0s;
}

.accent-2 {
    top: 20px;
    right: 20px;
    animation-delay: 1.5s;
}

.accent-3 {
    bottom: 20px;
    left: 20px;
    animation-delay: 3s;
}

.accent-4 {
    bottom: 20px;
    right: 20px;
    animation-delay: 4.5s;
}

@keyframes floatAccent {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(10deg);
    }
}

/* Corner decorations */
.corner-decoration {
    position: absolute;
    width: 120px;
    height: 120px;
    pointer-events: none;
    opacity: 0.3;
}

.corner-decoration.top-left {
    top: -30px;
    left: -30px;
    background: radial-gradient(circle at top left, var(--rose), transparent);
    border-radius: 0 0 100% 0;
    animation: pulseCorner 4s ease-in-out infinite;
}

.corner-decoration.bottom-right {
    bottom: -30px;
    right: -30px;
    background: radial-gradient(circle at bottom right, var(--gold), transparent);
    border-radius: 100% 0 0 0;
    animation: pulseCorner 4s ease-in-out infinite 2s;
}

@keyframes pulseCorner {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.15);
    }
}

/* Final message */
.final-message {
    text-align: center;
    margin-top: 2.5rem;
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    color: var(--primary);
    animation: fadeIn 1.5s ease 1.2s backwards, pulse 2s ease-in-out infinite;
    text-shadow: 0 2px 10px rgba(212, 165, 165, 0.3);
    letter-spacing: 1px;
    line-height: 1.4;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Scroll hint */
.scroll-hint {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--secondary);
    font-size: 0.85rem;
    opacity: 0.7;
    animation: bounce 2s infinite;
    z-index: 5;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(212, 165, 165, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.hint-icon {
    font-size: 1.1rem;
    animation: wiggle 1s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-15deg);
    }
    75% {
        transform: rotate(15deg);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

.scroll-hint.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Sound toggle button */
.sound-toggle {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(156, 124, 124, 0.4);
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-toggle:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 7px 20px rgba(156, 124, 124, 0.5);
}

.sound-toggle:active {
    transform: scale(0.95);
}

.sound-toggle.muted {
    opacity: 0.6;
    background: linear-gradient(135deg, #888, #666);
}

/* Responsive design - Tablet */
@media (max-width: 768px) {
    /* Optimizaciones para tablet y móvil */
    .page::before {
        animation: none; /* Mejor rendimiento */
    }
    
    body::before {
        animation: moveGradient 20s ease infinite;
    }
    
    .container {
        padding: 1.5rem 0.75rem;
    }

    .page {
        padding: 2.5rem 1.5rem;
        border-radius: 20px;
        min-height: 400px;
    }

    .recipient-name {
        font-size: 2.2rem;
        letter-spacing: 1.5px;
        line-height: 1.3;
    }

    .loading-name {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .loading-heart {
        font-size: 4.5rem;
    }

    .page-title {
        font-size: 1.8rem;
        letter-spacing: 1px;
        line-height: 1.4;
    }

    .page-subtitle {
        font-size: 1.05rem;
    }

    .page-content {
        font-size: 1.2rem;
        line-height: 1.8;
    }

    .page-emoji {
        font-size: 3.5rem;
    }

    .nav-button {
        padding: 0.85rem 1.5rem;
        font-size: 0.85rem;
    }

    .loading-text {
        font-size: 1.4rem;
        padding: 0 1.25rem;
    }

    .page-indicator {
        font-size: 0.85rem;
        padding: 0.7rem 1.2rem;
    }

    .sound-toggle {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }

    .scroll-hint {
        font-size: 0.8rem;
        padding: 0.55rem 1.1rem;
    }

    .final-message {
        font-size: 1.6rem;
    }
}

/* Responsive design - Mobile */
@media (max-width: 480px) {
    .container {
        padding: 1rem 0.5rem;
    }

    .page {
        padding: 2rem 1.25rem;
        border-radius: 18px;
        min-height: 380px;
    }

    .recipient-name {
        font-size: 1.8rem;
        letter-spacing: 1px;
        margin-bottom: 1.5rem;
    }

    .loading-name {
        font-size: 1.7rem;
        letter-spacing: 1.5px;
        padding: 0 0.75rem;
    }

    .loading-heart {
        font-size: 4rem;
    }

    .page-title {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
        line-height: 1.3;
        padding: 0 0.25rem;
    }

    .page-subtitle {
        font-size: 1rem;
        margin-bottom: 1.75rem;
    }

    .page-content {
        font-size: 1.15rem;
        line-height: 1.75;
    }

    .page-emoji {
        font-size: 3.2rem;
        margin-bottom: 1.25rem;
    }

    .navigation {
        margin-top: 2.25rem;
        gap: 0.5rem;
    }

    .nav-button {
        padding: 0.75rem 1.25rem;
        font-size: 0.8rem;
    }

    .page-indicator {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
        min-width: 65px;
    }

    .loading-text {
        font-size: 1.25rem;
    }

    .accent-1, .accent-2, .accent-3, .accent-4 {
        font-size: 2rem;
    }

    .sound-toggle {
        top: 12px;
        right: 12px;
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }

    .final-message {
        font-size: 1.5rem;
        margin-top: 2rem;
    }

    .scroll-hint {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
        bottom: 20px;
    }

    .dots {
        gap: 0.6rem;
        margin-top: 1.75rem;
    }

    .dot {
        width: 10px;
        height: 10px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .page {
        padding: 1.75rem 1rem;
        min-height: 360px;
    }

    .recipient-name {
        font-size: 1.6rem;
    }

    .page-title {
        font-size: 1.45rem;
    }

    .page-subtitle {
        font-size: 0.95rem;
    }

    .page-content {
        font-size: 1.1rem;
    }

    .page-emoji {
        font-size: 3rem;
    }

    .nav-button {
        padding: 0.7rem 1rem;
        font-size: 0.75rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Touch feedback */
@media (hover: none) {
    .nav-button:active:not(:disabled) {
        background: linear-gradient(135deg, var(--secondary), var(--dark));
    }
    
    .dot:active {
        transform: scale(1.5);
    }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Safe area insets para notch de iPhone */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .sound-toggle {
        top: max(15px, env(safe-area-inset-top));
        right: max(15px, env(safe-area-inset-right));
    }
}