body {
    font-family: "Comic Sans", "Comic Sans MS", Chalkboard, "ChalkboardSE-Regular", sans-serif;
    background-color: #d9ead3;
    margin: 0;
    padding: 0;
    color: #333;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><rect width="20" height="20" fill="%23d9ead3"/><circle cx="10" cy="10" r="1" fill="%23c5d9b7" opacity="0.3"/></svg>');
}

/* Global link styles */
a, a:visited, a:hover, a:active {
    color: #50389C;
    text-decoration: underline;
}

a:hover {
    text-decoration: wavy underline;
}

.container {
    display: flex;
    min-height: 100dvh;
}

.sidebar {
    width: 250px;
    background: linear-gradient(to bottom, #b6d7a8, #a4c2a5);
    border-right: 3px solid #93c47d;
    padding: 20px;
    box-shadow: 3px 0 10px rgba(0,0,0,0.2);
    position: fixed;
    height: calc(100vh - 40px);
    overflow-y: auto;
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 250px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.nav-menu li {
    margin-bottom: 10px;
}

.nav-menu a {
    display: block;
    padding: 12px 15px;
    background: linear-gradient(to bottom, #ffffff, #f0f0f0);
    border: 2px solid #93c47d;
    border-radius: 8px;
    color: #2d5016;
    text-decoration: none;
    font-weight: bold;
    font-size: 18.5px;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
    box-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

.nav-menu a:hover {
    background: linear-gradient(to bottom, #ffffcc, #ffff99);
    transform: translateY(-1px);
    box-shadow: 3px 3px 6px rgba(0,0,0,0.3);
}

.nav-menu a.active {
    background: linear-gradient(to bottom, #fff195, #ffffcc);
    border-color: #f1c232;
}

.about-section {
    background: rgba(255,255,255,0.8);
    padding: 15px;
    border: 2px solid #93c47d;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.4;
    color: #2d5016;
    text-align: center;
}

.about-section h4 {
    margin: 0 0 10px 0;
    color: #2d5016;
    font-size: 16.5px;
}

.uid-number {
    /* Prevent phone number detection and clicking */
    pointer-events: none;
    -webkit-touch-callout: none;
    color: inherit;
    text-decoration: none;
}

.uid-number::selection {
    background-color: rgba(147, 196, 125, 0.3);
}

.copyright {
    font-size: 9px;
    color: #888;
    margin-top: 10px;
}

.mint-flower {
    display: block;
    width: auto;
    height: 80px;
    cursor: pointer;
    z-index: 10;
    margin: 15px auto 0 auto;
}

/* Mint collection popup */
@font-face {
    font-family: 'Genshin';
    src: url('assets/Genshin.ttf') format('truetype');
    font-display: block;
}

.mint-popup {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    z-index: 1002;
    opacity: 0;
    pointer-events: none;
    animation: mintCollected 3s ease-out forwards;
}

.popup-obtained {
    font-family: 'Genshin', serif;
    color: #fff;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 1px 1px 6px rgba(0,0,0,0.8);
}

.popup-item {
    background: linear-gradient(to right, 
        transparent 0%, 
        rgba(0,0,0,0.6) 15%, 
        rgba(0,0,0,0.6) 85%, 
        transparent 100%);
    padding: 4px 37px 4px 25px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    color: #fff;
    font-family: 'Genshin', serif;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.popup-item img {
    width: 24px;
    height: 24px;
}

@keyframes mintCollected {
    0% {
        opacity: 0;
        transform: translateY(-40%);
    }
    15% {
        opacity: 1;
        transform: translateY(-50%);
    }
    85% {
        opacity: 1;
        transform: translateY(-50%);
    }
    100% {
        opacity: 0;
        transform: translateY(-60%);
    }
}

.main-content {
    margin-left: 290px;
    padding: 30px;
    flex: 1;
    max-width: calc(100vw - 350px);
}

.welcome-banner {
    background: linear-gradient(45deg, #ffffff, #f9f9f9);
    border: 3px solid #93c47d;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.2);
}

.welcome-banner h1 {
    color: #2d5016;
    font-size: 36px;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 2px 2px 4px rgba(0,0,0,0.1); }
    to { text-shadow: 2px 2px 4px rgba(0,0,0,0.1), 0 0 10px rgba(147,196,125,0.5); }
}

.welcome-banner p {
    font-size: 18px;
    color: #444;
    margin: 10px 0 0 0;
    line-height: 1.5;
}

.content-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.content-box {
    background: linear-gradient(to bottom, #ffffff, #f5f5f5);
    border: 2px solid #93c47d;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 3px 3px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.content-box:hover {
    transform: translateY(-2px);
    box-shadow: 5px 5px 12px rgba(0,0,0,0.3);
}

.content-box h3 {
    color: #2d5016;
    margin: 0 0 15px 0;
    font-size: 20px;
    border-bottom: 2px solid #b6d7a8;
    padding-bottom: 5px;
}

.content-box p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.fun-facts {
    background: linear-gradient(45deg, #ffffcc, #fff2cc);
    border: 3px dashed #f1c232;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    margin-top: 30px;
}

.fun-facts h3 {
    color: #bf9000;
    margin: 0 0 15px 0;
    font-size: 22px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.7; }
}

.marquee {
    width: calc(100% - 25px);
    height: 23px;
    background: #dbd1f8;
    border: 2px solid #7c6dac;
    padding: 10px;
    margin: 0 0 20px 0;
    border-radius: 10px;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.marquee-text {
    display: inline-block;
    width: max-content;
    animation: scroll 8s linear infinite;
    color: #50389C;
    font-weight: bold;
    padding-left: 100%;
}

@keyframes scroll {
    0% { 
        transform: translateX(0%); 
    }
    100% { 
        transform: translateX(-100%); 
    }
}

/* Responsive marquee speeds */
@media (max-width: 449px) {
    .marquee-text {
        animation-duration: 4.5s;
    }
}

@media (min-width: 450px) and (max-width: 768px) {
    .marquee-text {
        animation-duration: 7s;
    }
}

@media (min-width: 769px) {
    .marquee-text {
        animation-duration: 10s;
    }
}

/* Mobile hamburger menu button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1002;
    background: #93c47d;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
    transition: all 0.2s;
}

.mobile-menu-toggle:hover {
    background: #7fa85c;
    transform: scale(1.05);
}

/* Mobile styles */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        height: calc(100dvh - 40px);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .marquee {
        position: absolute;
        top: 20px;
        left: 80px; /* Position to the right of the menu button */
        right: 20px; /* Leave some margin on the right */
        width: calc(100vw - 125px);
        margin: 0;
        padding: 12px 10px;
        font-size: 14px;
    }

    .main-content {
        padding-top: 60px; /* Reduced padding since marquee scrolls with content */
    }

    .marquee-controls {
        position: absolute;
        top: 60px;
        left: 80px;
        right: 20px;
        margin: 5px 0;
        font-size: 12px;
        background: rgba(255, 255, 255, 0.9);
        padding: 5px 10px;
        border-radius: 4px;
    }

    .marquee-controls input[type="number"] {
        width: 50px;
        font-size: 12px;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
        padding-top: 80px; /* Space for mobile menu button */
        max-width: calc(100vw - 40px);
    }

    .welcome-banner {
        padding: 20px;
    }

    .logo {
        padding-top: 70px;
    }
}
