/* Reset and variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    background: var(--book-bg);
    background-attachment: fixed;
}

:root {
    --paper-bg: #f4e8d0;
    --paper-shadow: rgba(0, 0, 0, 0.3);
    --paper-border: #d4c4a8;
    --paper-text: #3d2817;
    --paper-old: #e8d5b7;
    --card-bg: #ffffff;
    --card-shadow: rgba(0, 0, 0, 0.4);
    --hover-shadow: rgba(0, 0, 0, 0.5);
    --border-radius: 8px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --book-bg: #2c1810;
}

body {
    font-family: 'Inter', 'Georgia', 'Times New Roman', serif;
    background: var(--book-bg);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(139, 69, 19, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(101, 67, 33, 0.2) 0%, transparent 50%);
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    color: var(--paper-text);
    min-height: 100vh;
    height: 100%;
    width: 100%;
    max-width: 100vw;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Animated Background - PEPE Theme */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

/* Floating PEPE Particles */
.pepe-particle {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.3;
    animation: floatPepe 20s infinite ease-in-out;
    filter: blur(0.3px);
    text-shadow: 0 0 15px rgba(76, 175, 80, 0.5), 0 0 30px rgba(76, 175, 80, 0.3);
    will-change: transform;
}

.pepe-1 { left: 5%; top: 10%; animation-delay: 0s; animation-duration: 18s; }
.pepe-2 { left: 15%; top: 20%; animation-delay: 1s; animation-duration: 22s; }
.pepe-3 { left: 25%; top: 5%; animation-delay: 2s; animation-duration: 20s; }
.pepe-4 { left: 35%; top: 15%; animation-delay: 3s; animation-duration: 19s; }
.pepe-5 { left: 45%; top: 8%; animation-delay: 4s; animation-duration: 21s; }
.pepe-6 { left: 55%; top: 25%; animation-delay: 5s; animation-duration: 18s; }
.pepe-7 { left: 65%; top: 12%; animation-delay: 6s; animation-duration: 23s; }
.pepe-8 { left: 75%; top: 18%; animation-delay: 7s; animation-duration: 20s; }
.pepe-9 { left: 85%; top: 6%; animation-delay: 8s; animation-duration: 19s; }
.pepe-10 { left: 10%; top: 60%; animation-delay: 9s; animation-duration: 21s; }
.pepe-11 { left: 20%; top: 70%; animation-delay: 10s; animation-duration: 18s; }
.pepe-12 { left: 30%; top: 65%; animation-delay: 11s; animation-duration: 22s; }
.pepe-13 { left: 70%; top: 75%; animation-delay: 12s; animation-duration: 20s; }
.pepe-14 { left: 80%; top: 65%; animation-delay: 13s; animation-duration: 19s; }
.pepe-15 { left: 90%; top: 70%; animation-delay: 14s; animation-duration: 21s; }

@keyframes floatPepe {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(1);
        opacity: 0.25;
    }
    20% {
        transform: translateY(-40px) translateX(30px) rotate(8deg) scale(1.15);
        opacity: 0.35;
    }
    40% {
        transform: translateY(-80px) translateX(-20px) rotate(-10deg) scale(0.85);
        opacity: 0.3;
    }
    60% {
        transform: translateY(-50px) translateX(25px) rotate(6deg) scale(1.1);
        opacity: 0.38;
    }
    80% {
        transform: translateY(-20px) translateX(-15px) rotate(-4deg) scale(0.95);
        opacity: 0.32;
    }
    100% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(1);
        opacity: 0.25;
    }
}

/* Floating Circles - Decorative Elements */
.floating-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.2) 0%, rgba(76, 175, 80, 0.05) 50%, transparent 70%);
    border: 2px solid rgba(76, 175, 80, 0.4);
    animation: floatCircle 25s infinite ease-in-out;
    filter: blur(0.3px);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.2), inset 0 0 30px rgba(76, 175, 80, 0.1);
    will-change: transform;
}

.circle-1 {
    width: 100px;
    height: 100px;
    left: 8%;
    top: 15%;
    animation-delay: 0s;
    animation-duration: 20s;
}

.circle-2 {
    width: 150px;
    height: 150px;
    left: 25%;
    top: 30%;
    animation-delay: 2s;
    animation-duration: 24s;
}

.circle-3 {
    width: 80px;
    height: 80px;
    left: 50%;
    top: 10%;
    animation-delay: 4s;
    animation-duration: 22s;
}

.circle-4 {
    width: 120px;
    height: 120px;
    left: 70%;
    top: 25%;
    animation-delay: 6s;
    animation-duration: 26s;
}

.circle-5 {
    width: 90px;
    height: 90px;
    left: 15%;
    top: 65%;
    animation-delay: 8s;
    animation-duration: 21s;
}

.circle-6 {
    width: 140px;
    height: 140px;
    left: 40%;
    top: 75%;
    animation-delay: 10s;
    animation-duration: 23s;
}

.circle-7 {
    width: 110px;
    height: 110px;
    left: 75%;
    top: 60%;
    animation-delay: 12s;
    animation-duration: 25s;
}

.circle-8 {
    width: 130px;
    height: 130px;
    left: 90%;
    top: 80%;
    animation-delay: 14s;
    animation-duration: 22s;
}

@keyframes floatCircle {
    0% {
        transform: translateY(0) translateX(0) scale(1) rotate(0deg);
        opacity: 0.2;
    }
    25% {
        transform: translateY(-50px) translateX(40px) scale(1.3) rotate(90deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-30px) translateX(-35px) scale(0.7) rotate(180deg);
        opacity: 0.25;
    }
    75% {
        transform: translateY(-60px) translateX(20px) scale(1.1) rotate(270deg);
        opacity: 0.28;
    }
    100% {
        transform: translateY(0) translateX(0) scale(1) rotate(360deg);
        opacity: 0.2;
    }
}

/* Ensure content is above background */
.container,
header,
.book-container,
#album-controls,
.wallet-checker,
.game-section {
    position: relative;
    z-index: 2;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Header - Completely separate, no games here - Sticky on scroll */
header {
    background: linear-gradient(135deg, #3d2817 0%, #2c1810 100%);
    padding: 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
    border-bottom: 3px solid #5d4037;
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    left: 0;
    right: 0;
    margin-left: 0;
    margin-right: 0;
}

/* Ensure header doesn't contain game section */
header .game-section {
    display: none !important;
}


.header-content {
    position: relative;
    z-index: 2;
    padding: 2rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.header-pepe-gif {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pepe-dancing {
    max-width: 180px;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(4px 4px 12px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 20px rgba(76, 175, 80, 0.3));
    animation: bouncePepe 2.5s ease-in-out infinite, rotatePepe 8s linear infinite;
    will-change: transform;
}

@keyframes bouncePepe {
    0%, 100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) scale(1.08) rotate(2deg);
    }
    50% {
        transform: translateY(-25px) scale(1.12) rotate(0deg);
    }
    75% {
        transform: translateY(-15px) scale(1.08) rotate(-2deg);
    }
}

@keyframes rotatePepe {
    0% {
        filter: drop-shadow(4px 4px 12px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 20px rgba(76, 175, 80, 0.3)) hue-rotate(0deg);
    }
    50% {
        filter: drop-shadow(4px 4px 12px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 25px rgba(76, 175, 80, 0.5)) hue-rotate(10deg);
    }
    100% {
        filter: drop-shadow(4px 4px 12px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 20px rgba(76, 175, 80, 0.3)) hue-rotate(0deg);
    }
}

.logo-container {
    position: relative;
}

.logo-image {
    max-width: 120px;
    height: auto;
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.5));
    animation: pulse 3s ease-in-out infinite, shine 5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.5)) brightness(1); }
    50% { transform: scale(1.05); filter: drop-shadow(3px 3px 12px rgba(244, 232, 208, 0.3)) brightness(1.1); }
}

@keyframes shine {
    0%, 100% { filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.5)); }
    50% { filter: drop-shadow(3px 3px 12px rgba(244, 232, 208, 0.5)); }
}

.header-text {
    text-align: center;
}

.parchment-title {
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 3rem;
    color: #f4e8d0;
    margin: 0;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    animation: shimmer 4s ease-in-out infinite;
    background: linear-gradient(90deg, #f4e8d0 0%, #d4c4a8 50%, #f4e8d0 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.parchment-subtitle {
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 1.2rem;
    color: #d4c4a8;
    margin-top: 0.5rem;
    font-style: italic;
}

.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    flex-wrap: wrap;
    background: rgba(44, 24, 16, 0.6);
    border-top: 2px solid rgba(212, 196, 168, 0.3);
}

.nav-link {
    color: #d4c4a8;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(244, 232, 208, 0.1);
    color: #f4e8d0;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-left: 1rem;
}

.social-link {
    font-size: 1.5rem;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    transform: scale(1.2);
}

/* Wallet Checker */
.wallet-checker {
    background: var(--paper-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px var(--paper-shadow);
    border: 2px solid var(--paper-border);
}

.wallet-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--paper-text);
}

.input-wrapper {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.input-wrapper input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--paper-border);
    border-radius: 6px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
}

.check-btn {
    padding: 0.75rem 2rem;
    background: #8b4513;
    color: #f4e8d0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.check-btn:hover:not(:disabled) {
    background: #6b3410;
    transform: translateY(-2px);
}

.wallet-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--paper-border);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    font-weight: 600;
    color: var(--paper-text);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #8b4513;
}

/* Book Container - Simple Page System with Page Flip Effect */
.book-container {
    perspective: 2000px;
    margin: 2rem 0;
}

.simple-book-container {
    width: 100%;
    max-width: 1360px;
    min-height: 1900px;
    margin: 0 auto;
    position: relative;
    perspective: 3000px;
    box-sizing: border-box;
    overflow: visible;
}

.simple-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 1360px;
    height: 100%;
    min-height: 1900px;
    background: var(--paper-bg);
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.02) 2px, rgba(0, 0, 0, 0.02) 4px),
        radial-gradient(circle at 20% 30%, rgba(139, 69, 19, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(101, 67, 33, 0.15) 0%, transparent 50%);
    border: 3px solid var(--paper-border);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 10px 40px var(--paper-shadow), inset 0 0 50px rgba(139, 69, 19, 0.1);
    display: grid;
    opacity: 1;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 0.4s ease;
    transform-origin: right center;
    box-sizing: border-box;
    margin: 0 auto;
    overflow: visible;
}

.simple-page.flipping {
    transform: rotateY(-180deg);
    z-index: 5;
    box-shadow: -30px 10px 50px rgba(0, 0, 0, 0.6);
}

.simple-page.flipping-out {
    transform: rotateY(-180deg);
    opacity: 0;
    z-index: 1;
}

.simple-page.active {
    opacity: 1;
    transform: rotateY(0deg);
    z-index: 10;
}

.simple-page.hidden {
    opacity: 0;
    transform: rotateY(0deg);
    z-index: 1;
    pointer-events: none;
}

.simple-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(139, 69, 19, 0.02) 50%, transparent 100%);
    pointer-events: none;
    z-index: 1;
    opacity: 0.2;
}

.page-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1360px;
    min-height: 1800px;
    display: grid;
    grid-template-columns: 400px 400px 400px;
    grid-template-rows: 560px 560px 560px;
    gap: 1.5rem;
    padding: 1.5rem;
    box-sizing: border-box;
    overflow: visible;
    align-content: start;
    align-items: start;
    justify-content: center;
    justify-items: center;
    margin: 0 auto;
}

.page-content .card {
    position: relative;
    z-index: 20;
    width: 400px !important;
    height: 560px !important;
    max-width: 400px !important;
    max-height: 560px !important;
    min-width: 400px !important;
    min-height: 560px !important;
    opacity: 1 !important;
    margin: 0;
    flex-shrink: 0;
}

/* Card Styles - EXACT DIMENSIONS 400x560 */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px var(--card-shadow), inset 0 0 20px rgba(139, 69, 19, 0.1);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    width: 400px !important;
    height: 560px !important;
    max-width: 400px !important;
    max-height: 560px !important;
    min-width: 400px !important;
    min-height: 560px !important;
    display: flex;
    flex-direction: column;
    border: 3px solid var(--paper-border);
    opacity: 1 !important;
    margin: 0;
    flex-shrink: 0;
    box-sizing: border-box;
}

.card:hover {
    transform: translateY(-15px) rotate(2deg) scale(1.08);
    box-shadow: 0 20px 40px var(--hover-shadow), inset 0 0 40px rgba(139, 69, 19, 0.2), 0 0 30px rgba(244, 232, 208, 0.3);
    z-index: 30;
    border-color: #8b4513;
}

.card.owned {
    border-color: #6b8e23;
    border-width: 4px;
}

/* Opacidad solo cuando hay wallet chequeada */
.wallet-checked .card.missing {
    opacity: 0.6 !important;
    filter: grayscale(0.3);
    border-color: #8b7355;
}

.wallet-checked .card:not(.owned):not(.missing) {
    opacity: 0.65 !important;
    filter: grayscale(0.15);
}

.card-number {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(61, 40, 23, 0.9);
    color: #f4e8d0;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 5;
}

.card-owned-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #6b8e23;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 5;
}

.card-image {
    width: 100%;
    height: 480px !important;
    max-width: 400px !important;
    max-height: 480px !important;
    object-fit: contain;
    background: #f0f0f0;
    border-bottom: 2px solid var(--paper-border);
    transition: transform 0.4s ease;
    opacity: 1 !important;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    flex-shrink: 0;
}

.card:hover .card-image {
    transform: scale(1.05);
}

.card-info {
    padding: 0.8rem;
    background: var(--card-bg);
    color: var(--paper-text);
    height: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
}

.card-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    text-align: center;
    word-break: break-word;
}

.card-status {
    font-size: 0.85rem;
    color: #8b4513;
    text-align: center;
    font-weight: 500;
}

/* Album Controls */
.album-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--paper-bg);
    border: 2px solid var(--paper-border);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px var(--paper-shadow);
    flex-wrap: wrap;
    gap: 1rem;
}

.season-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.season-selector label {
    font-weight: 700;
    font-size: 1.3rem;
    color: #8b4513;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    font-family: 'Cinzel', serif;
    letter-spacing: 0.5px;
}

.season-selector select {
    padding: 0.75rem 1.5rem;
    border: 3px solid #8b4513;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: #8b4513;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.season-selector select:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.season-selector select:focus {
    outline: none;
    border-color: #6b3410;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.2);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.toggle-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--paper-border);
    background: rgba(255, 255, 255, 0.6);
    color: var(--paper-text);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.toggle-btn.active {
    background: #8b4513;
    border-color: #6b3410;
    color: #f4e8d0;
}

.page-info {
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--paper-text);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.page-btn {
    padding: 1rem 2rem;
    background: #8b4513;
    color: #f4e8d0;
    border: 2px solid #6b3410;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
    background: #6b3410;
    transform: translateY(-2px);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#page-numbers {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.page-number {
    padding: 0.6rem 1rem;
    border: 2px solid var(--paper-border);
    background: rgba(255, 255, 255, 0.7);
    color: var(--paper-text);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    font-weight: 500;
    min-width: 45px;
    margin: 0 0.2rem;
}

.page-number:hover:not(.active) {
    background: rgba(255, 255, 255, 0.9);
    border-color: #8b4513;
    transform: translateY(-2px);
}

.page-number.active {
    background: #8b4513;
    border-color: #6b3410;
    color: #f4e8d0;
    font-weight: 600;
}

.page-ellipsis {
    padding: 0.6rem 0.5rem;
    color: var(--paper-text);
    font-size: 1rem;
    margin: 0 0.2rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    -webkit-overflow-scrolling: touch;
}

.modal-content {
    background-color: var(--paper-bg);
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.02) 2px, rgba(0, 0, 0, 0.02) 4px),
        radial-gradient(circle at 20% 30%, rgba(139, 69, 19, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(101, 67, 33, 0.15) 0%, transparent 50%);
    margin: 3% auto;
    padding: 0;
    border: 4px solid var(--paper-border);
    border-radius: 16px;
    width: 95%;
    max-width: 1200px;
    max-height: 92vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), inset 0 0 50px rgba(139, 69, 19, 0.1);
    animation: fadeIn 0.4s ease-out;
    display: flex;
    flex-direction: column;
    position: relative;
}

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

.close {
    color: var(--paper-text);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    z-index: 2000;
    background: rgba(139, 69, 19, 0.9);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 2px solid #6b3410;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    padding: 0;
}

.close:hover {
    color: #f4e8d0;
    background: rgba(139, 69, 19, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.close:active {
    transform: scale(0.95);
}

/* Modal Body */
#modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

/* Card Details Layout */
.card-details {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2.5rem;
    align-items: start;
}

.card-details-image {
    position: sticky;
    top: 2rem;
    background: rgba(255, 255, 255, 0.3);
    padding: 1.5rem;
    border-radius: 12px;
    border: 3px solid var(--paper-border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.card-details-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card-details-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.card-details-info h2 {
    font-family: 'Cinzel', serif;
    color: #8b4513;
    font-size: 2.5rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid var(--paper-border);
    padding-bottom: 1rem;
}

.card-details-section {
    background: rgba(255, 255, 255, 0.4);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--paper-border);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-details-section h3 {
    font-family: 'Cinzel', serif;
    color: #8b4513;
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--paper-border);
}

.card-details-section p {
    margin: 0.8rem 0;
    line-height: 1.6;
    color: var(--paper-text);
}

.card-details-section strong {
    color: #8b4513;
    font-weight: 600;
}

.card-details-section a {
    color: #4caf50;
    text-decoration: underline;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.3rem 0.6rem;
    background: rgba(76, 175, 80, 0.15);
    border-radius: 6px;
    border: 2px solid #4caf50;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

.card-details-section a:hover {
    color: #ffffff;
    background: #4caf50;
    border-color: #388e3c;
    text-decoration: underline;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
}

.card-details-section a:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.status-locked {
    color: #d32f2f;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    background: rgba(211, 47, 47, 0.1);
    border-radius: 6px;
    display: inline-block;
}

.status-unlocked {
    color: #4caf50;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 6px;
    display: inline-block;
}

/* Holders List */
.holders-list {
    background: rgba(255, 255, 255, 0.4);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--paper-border);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.holders-list h3 {
    font-family: 'Cinzel', serif;
    color: #8b4513;
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--paper-border);
}

.holder-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    margin: 0.5rem 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    border: 1px solid var(--paper-border);
    transition: all 0.3s ease;
}

.holder-item:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.holder-item .wallet {
    color: var(--paper-text);
    font-size: 0.9rem;
    word-break: break-all;
}

.holder-item .wallet-link {
    color: #4caf50;
    text-decoration: underline;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    background: rgba(76, 175, 80, 0.15);
    border-radius: 4px;
    border: 1px solid #4caf50;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(76, 175, 80, 0.2);
}

.holder-item .wallet-link:hover {
    color: #ffffff;
    background: #4caf50;
    border-color: #388e3c;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.4);
}

.holder-item .quantity {
    color: #8b4513;
    font-weight: 600;
    text-align: center;
}

.holder-item .percentage {
    color: #4caf50;
    font-weight: 600;
    text-align: right;
}

/* Dispensers List */
.dispensers-list {
    background: rgba(255, 255, 255, 0.4);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--paper-border);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dispensers-list h3 {
    font-family: 'Cinzel', serif;
    color: #8b4513;
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--paper-border);
}

.dispenser-item {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1.2rem;
    margin: 0.8rem 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    border: 1px solid var(--paper-border);
    transition: all 0.3s ease;
}

.dispenser-item:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dispenser-item div {
    color: var(--paper-text);
}

.dispenser-item strong {
    color: #8b4513;
    font-weight: 600;
    display: block;
    margin-bottom: 0.3rem;
}

.dispenser-source {
    color: var(--paper-text);
}

.dispenser-price {
    color: #4caf50;
    font-weight: 600;
    text-align: center;
}

.dispenser-remaining {
    color: #8b4513;
    text-align: right;
}

/* Mobile Responsive for Modal */
@media (max-width: 768px) {
    .modal {
        z-index: 2000;
        padding: 0;
    }
    
    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        border: none;
        border-top: 4px solid var(--paper-border);
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .close {
        top: 0.5rem;
        right: 0.5rem;
        width: 45px;
        height: 45px;
        font-size: 2rem;
        background: rgba(211, 47, 47, 0.95);
        border-color: #b71c1c;
        color: #fff;
    }
    
    .close:hover {
        background: rgba(211, 47, 47, 1);
    }
    
    #modal-body {
        padding: 1rem;
        flex: 1;
        overflow-y: auto;
    }
    
    .card-details {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .card-details-image {
        position: relative;
        top: 0;
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .card-details-image img {
        max-height: 50vh;
        width: auto;
    }
    
    .card-details-info {
        gap: 1rem;
    }
    
    .card-details-info h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .card-details-section {
        padding: 1rem;
    }
    
    .card-details-section h3 {
        font-size: 1.2rem;
    }
    
    .holder-item,
    .dispenser-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.8rem;
    }
    
    .holder-item .quantity,
    .holder-item .percentage,
    .dispenser-price,
    .dispenser-remaining {
        text-align: left;
    }
    
    .holders-list,
    .dispensers-list {
        padding: 1rem;
    }
    
    .holders-list h3,
    .dispensers-list h3 {
        font-size: 1.2rem;
    }
}

/* Loading */
.loading, .modal-loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    border: 4px solid rgba(139, 69, 19, 0.2);
    border-top: 4px solid #8b4513;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 2px solid #ef5350;
    margin: 2rem 0;
}

/* Info Sections */
.info-section {
    background: var(--paper-bg);
    padding: 3rem;
    margin: 3rem 0;
    border-radius: var(--border-radius);
    border: 2px solid var(--paper-border);
    box-shadow: 0 4px 12px var(--paper-shadow);
}

.info-section h2 {
    font-family: 'Cinzel', serif;
    color: #8b4513;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.content-box {
    line-height: 1.8;
    color: var(--paper-text);
}

.content-box a {
    color: #8b4513;
    text-decoration: none;
    font-weight: 600;
}

.content-box a:hover {
    text-decoration: underline;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-item {
    background: rgba(255, 255, 255, 0.5);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 2px solid var(--paper-border);
}

.feature-item strong {
    display: block;
    font-size: 1.2rem;
    color: #8b4513;
    margin-bottom: 0.5rem;
}

/* Game Section - Completely separate from header, in main content */
.game-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: var(--border-radius);
    border: 2px solid var(--paper-border);
    box-shadow: 0 4px 12px var(--paper-shadow);
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
    clear: both;
    display: block;
    will-change: opacity, transform;
}

.game-section.game-section-hidden {
    opacity: 0 !important;
    transform: translateY(-20px) !important;
    pointer-events: none;
}

/* Games Page Styles */
.games-page-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 3rem 2rem;
    margin: 2rem 0;
    border-radius: var(--border-radius);
    border: 2px solid var(--paper-border);
    box-shadow: 0 4px 12px var(--paper-shadow);
    text-align: center;
}

.games-page-title {
    font-family: 'Cinzel', serif;
    color: #8b4513;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.games-page-subtitle {
    color: var(--paper-text);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.games-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.game-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--paper-border);
    border-radius: var(--border-radius);
    padding: 2rem;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 4px 8px var(--paper-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px var(--paper-shadow);
}

.game-card-header h3 {
    font-family: 'Cinzel', serif;
    color: #8b4513;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.game-card-description {
    color: var(--paper-text);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.game-card-requirements {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(139, 69, 19, 0.1);
    border-radius: 8px;
}

.game-card-requirements p {
    color: var(--paper-text);
    font-size: 0.9rem;
    margin: 0;
}

.game-card-btn {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: #f4e8d0;
    border: 2px solid #654321;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-card-btn:hover {
    background: linear-gradient(135deg, #a0522d 0%, #8b4513 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.4);
}

.game-card-btn:active {
    transform: scale(0.98);
}

.game-section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.game-section-header h2 {
    font-family: 'Cinzel', serif;
    color: #8b4513;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.game-section-header p {
    color: var(--paper-text);
    font-size: 1.1rem;
}

.game-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.game-btn {
    background: rgba(139, 69, 19, 0.9);
    color: #f4e8d0;
    border: 3px solid #6b3410;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.game-btn:hover {
    background: rgba(139, 69, 19, 1);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.game-description {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.9;
}

/* Memory Game Modal */
#memory-game-modal {
    z-index: 2001;
}

#memory-game-modal .modal-content {
    max-width: 900px;
    max-height: 95vh;
    overflow-y: auto;
}

/* Memory Game */
.memory-game-container {
    background: var(--paper-bg);
    padding: 2rem;
    margin: 0;
    border-radius: var(--border-radius);
    border: none;
    box-shadow: none;
    position: relative;
    width: 100%;
}

.memory-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.memory-game-header h2 {
    font-family: 'Cinzel', serif;
    color: #ffd700;
    font-size: 1.8rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.game-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 2px solid #8b4513;
    color: #f4e8d0;
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.stat-item strong {
    color: #ffd700;
    font-size: 1.3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.game-close-btn {
    background: rgba(211, 47, 47, 0.9);
    color: #fff;
    border: 2px solid #b71c1c;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.game-close-btn:hover {
    background: rgba(211, 47, 47, 1);
    transform: scale(1.1);
}

.memory-game-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.memory-card {
    aspect-ratio: 3/4;
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.memory-card.flipped {
    transform: rotateY(180deg);
}

.memory-card.matched {
    opacity: 0.6;
    cursor: default;
}

.memory-card-front,
.memory-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    border: 3px solid var(--paper-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.memory-card-front {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.card-back-pattern {
    font-size: 4rem;
    opacity: 0.9;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.memory-card-back {
    transform: rotateY(180deg);
    background: #fff;
    display: flex;
    flex-direction: column;
}

.memory-card-back img {
    width: 100%;
    height: 85%;
    object-fit: cover;
}

.card-name-overlay {
    height: 15%;
    background: linear-gradient(135deg, #8b4513 0%, #6b3410 100%);
    color: #ffd700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.3rem;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    border-top: 2px solid #ffd700;
}

.game-message {
    margin-top: 1.5rem;
    text-align: center;
}

.game-complete-message {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3) 0%, rgba(56, 142, 60, 0.3) 100%);
    border: 3px solid #4caf50;
    border-radius: 12px;
    padding: 2rem;
    color: #f4e8d0;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.game-complete-message h3 {
    color: #ffd700;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.game-complete-message p {
    font-size: 1.2rem;
    margin: 0.5rem 0;
    color: #f4e8d0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.play-again-btn {
    margin-top: 1rem;
    padding: 1rem 2rem;
    background: #8b4513;
    color: #f4e8d0;
    border: 2px solid #6b3410;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-again-btn:hover {
    background: #6b3410;
    transform: translateY(-2px);
}

/* Mobile Game Styles */
@media (max-width: 768px) {
    .game-section {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .game-section-header h2 {
        font-size: 1.5rem;
    }
    
    .game-buttons {
        flex-direction: column;
    }
    
    .game-btn {
        width: 100%;
        min-width: auto;
    }
    
    .memory-game-container {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .memory-game-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .memory-game-header h2 {
        font-size: 1.3rem;
    }
    
    .game-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .memory-game-board {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .card-back-pattern {
        font-size: 2.5rem;
    }
    
    .card-name-overlay {
        font-size: 0.7rem;
    }
}

/* Footer */
footer {
    margin-top: 4rem;
    padding: 2rem 0;
    text-align: center;
    background: rgba(44, 24, 16, 0.8);
    border-top: 2px solid rgba(212, 196, 168, 0.3);
    color: #d4c4a8;
}

/* Mobile Hamburger Menu */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
    background: rgba(139, 69, 19, 0.9);
    border: 2px solid #8b4513;
    border-radius: 8px;
    width: 50px;
    height: 50px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #f4e8d0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(139, 69, 19, 1);
    transform: scale(1.05);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 24, 16, 0.98);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--paper-border);
    background: rgba(61, 40, 23, 0.9);
}

.mobile-logo {
    max-width: 80px;
    height: auto;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: #f4e8d0;
    font-size: 2.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: rgba(139, 69, 19, 0.3);
    transform: rotate(90deg);
}

.mobile-menu-content {
    padding: 2rem 1.5rem;
}

/* Mobile Wallet Checker in Menu */
.mobile-wallet-checker {
    background: rgba(139, 69, 19, 0.2);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--paper-border);
    margin-bottom: 2rem;
}

.mobile-wallet-input-wrapper {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.mobile-wallet-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--paper-border);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--paper-text);
}

.mobile-check-btn {
    padding: 0.75rem 1.5rem;
    background: #8b4513;
    color: #f4e8d0;
    border: 2px solid #6b3410;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.mobile-check-btn:hover:not(:disabled) {
    background: #6b3410;
    transform: translateY(-2px);
}

.mobile-check-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mobile-wallet-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 2px solid var(--paper-border);
}

.mobile-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.mobile-stat-label {
    font-weight: 600;
    color: #f4e8d0;
    font-size: 0.95rem;
}

.mobile-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4caf50;
}

.mobile-nav-link {
    display: block;
    padding: 1rem;
    color: #f4e8d0;
    text-decoration: none;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(212, 196, 168, 0.2);
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    background: rgba(139, 69, 19, 0.3);
    padding-left: 1.5rem;
}

.mobile-social-links {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--paper-border);
}

.mobile-social-link {
    display: block;
    padding: 1rem;
    color: #4caf50;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.mobile-social-link:hover {
    background: rgba(76, 175, 80, 0.2);
    padding-left: 1.5rem;
}

/* Mobile Reels Container */
.mobile-reels-container {
    display: none;
    width: 100%;
    height: calc(100vh - 80px);
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mobile-reels-container::-webkit-scrollbar {
    display: none;
}

.mobile-reel-item {
    width: 100%;
    min-height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    background: var(--book-bg);
    border-bottom: 2px solid var(--paper-border);
    position: relative;
}

.reel-card-image {
    width: 100%;
    height: 60vh;
    position: relative;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reel-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.reel-card-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 10;
}

.reel-card-number {
    background: rgba(139, 69, 19, 0.9);
    color: #f4e8d0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.reel-owned-badge {
    background: rgba(76, 175, 80, 0.9);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.reel-card-info {
    flex: 1;
    padding: 1.5rem;
    background: var(--paper-bg);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reel-card-title {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: #8b4513;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.reel-card-actions {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.reel-info-btn {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid var(--paper-border);
    border-radius: 12px;
    background: rgba(139, 69, 19, 0.9);
    color: #f4e8d0;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.reel-info-btn:hover {
    background: rgba(139, 69, 19, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.reel-info-btn:active {
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Hide desktop elements */
    .book-container,
    .album-controls,
    .wallet-checker,
    .main-nav,
    header .header-content .header-pepe-gif,
    header .header-content .header-text .parchment-subtitle {
        display: none !important;
    }
    
    /* Show mobile elements */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .mobile-reels-container {
        display: block;
    }
    
    /* Reduced header */
    header {
        padding: 1rem 0;
        margin-bottom: 0;
        min-height: auto;
        overflow: visible;
        width: 100%;
        box-sizing: border-box;
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .header-content {
        padding: 1rem 0.5rem !important;
        gap: 0.75rem !important;
        min-height: auto;
        align-items: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    header .container {
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
        box-sizing: border-box;
        margin: 0;
    }
    
    header {
        width: 100%;
        box-sizing: border-box;
        position: relative;
        left: 0;
        right: 0;
    }
    
    .logo-container {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin: 0;
        overflow: visible;
    }
    
    .logo-image {
        max-width: 60px !important;
        max-height: 60px !important;
        width: auto;
        height: auto;
        object-fit: contain;
        display: block;
        margin: 0;
        padding: 0;
        overflow: visible;
    }
    
    .logo-container {
        overflow: visible !important;
        padding-top: 0.25rem;
    }
    
    .parchment-title {
        font-size: 1.2rem !important;
        margin: 0 !important;
        line-height: 1.2;
    }
    
    .header-text {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: auto;
    }
    
    /* Hide animated background on mobile for performance */
    .animated-background {
        display: none;
    }
    
    /* Full screen mobile */
    body {
        overflow-x: hidden;
    }
    
    .container {
        padding: 0;
        max-width: 100%;
    }
    
    main.container {
        padding: 0;
        margin: 0;
    }
}

/* Large screens - even bigger */
@media (min-width: 1920px) {
    .simple-book-container {
        width: 1800px;
        height: 1200px;
    }
    
    .page-content {
        gap: 2.5rem;
        padding: 2.5rem;
    }
    
    .page-content .card {
        width: 400px;
        height: 560px;
    }
    
    .card-image {
        height: 480px;
    }
    
    .card-info {
        height: 80px;
    }
}
