
/* --- THEME COLOR VARIABLES --- */
:root {
    /* STEAL A BRAINROT - Magenta/Purple Cyber Theme */
    --bg-color: #09000f;
    --card-bg: rgba(20, 0, 35, 0.65);

    --text-color: #ff2ff6;           /* Neon Magenta */
    --text-secondary-color: #532a7c; /* Soft Lavender */

    --border-color: rgba(255, 47, 246, 0.35);

    --accent-color: #9d4bff;         /* Cyber Purple */
    --accent-glow: rgba(157, 75, 255, 0.45);

    --primary-glow: rgba(255, 47, 246, 0.35);
    --secondary-glow: rgba(120, 50, 255, 0.30);

    --modal-backdrop: rgba(0, 0, 0, 0.75);
}

body.dark-mode {
    --bg-color: #09000f;
    --card-bg: rgba(20, 0, 35, 0.65);

    --text-color: #ff2ff6;
    --text-secondary-color: #b56cff;

    --border-color: rgba(255, 47, 246, 0.35);

    --accent-color: #9d4bff;
    --accent-glow: rgba(157, 75, 255, 0.45);

    --primary-glow: rgba(255, 47, 246, 0.35);
    --secondary-glow: rgba(120, 50, 255, 0.30);

    --modal-backdrop: rgba(0, 0, 0, 0.75);
}


/* --- BASE & FONT STYLES --- */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- BACKGROUND EFFECTS --- */
.background-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(150px);
    pointer-events: none;
    z-index: -1;
    transition: background-color 0.5s ease;
}
.circle1 {
    width: 400px; height: 400px;
    background: var(--primary-glow);
    top: 10%; left: 10%;
    animation: move-glow 15s infinite alternate;
}
.circle2 {
    width: 500px; height: 500px;
    background: var(--secondary-glow);
    bottom: 5%; right: 5%;
    animation: move-glow 20s infinite alternate-reverse;
}
.circle3 {
    width: 420px; height: 420px;
    background: rgba(127, 255, 0, 0.25);
    top: 55%; left: 35%;
    animation: move-glow 18s infinite alternate;
}
#floating-items-container {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden; z-index: -2;
}
.floating-item {
    position: absolute;
    opacity: 0.05;
    will-change: transform;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}
body.dark-mode .floating-item { opacity: 0.04; }

/* --- MAIN LAYOUT --- */
.container { width: 100%; max-width: 1200px; z-index: 1; }
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}
.nav-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: 0.5px;
}
.nav-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.nav-link {
    font-weight: 600;
    color: var(--text-secondary-color);
    text-decoration: none;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}
.nav-link:hover,
.nav-link:focus {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background: rgba(57, 255, 20, 0.15);
}
.nav-link-active {
    color: #000;
    background: var(--accent-color);
    border-color: transparent;
}
.nav-link-active:hover,
.nav-link-active:focus {
    color: #000;
}
.web3-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
body.dark-mode .web3-container { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); }

.main-header {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}
.header-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--accent-color);
}
body.dark-mode .header-title { color: var(--accent-color); }

.header-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary-color);
    margin: 0;
    font-family: 'Share Tech Mono', monospace;
}

/* --- THEME TOGGLE REMOVED --- */

/* --- CLAIM CONTROLS --- */
.claimed-items-section {
    text-align: center;
    border: 1px solid var(--accent-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background: rgba(57, 255, 20, 0.1);
    animation: fade-in 0.4s ease;
}
.claimed-items-title {
    font-size: 1.5rem; font-weight: 600;
    color: var(--accent-color);
    margin: 0 0 1rem 0;
}
.claimed-items-container {
    display: flex; flex-wrap: wrap;
    justify-content: center; gap: 1rem; margin-bottom: 1.5rem;
}
.claimed-item-icon {
    width: 60px; height: 60px;
    border-radius: 12px;
    border: 1px solid var(--accent-color);
    background: var(--card-bg);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 15px var(--accent-glow);
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.claimed-item-icon:hover {
    transform: scale(1.05);
}
.claimed-item-icon img { width: 45px; height: 45px; object-fit: contain; pointer-events: none; }
.claimed-item-icon::after {
    content: '✓'; position: absolute; top: -8px; right: -8px;
    width: 20px; height: 20px;
    background: var(--accent-color);
    color: #000; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: bold;
    border: 2px solid var(--bg-color);
}

/* --- ITEMS GRID --- */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}
.item-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    display: flex; flex-direction: column; align-items: center;
    gap: 0.75rem; cursor: pointer;
    transition: all 0.3s ease;
    position: relative; overflow: hidden;
}
.item-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.3);
}
.item-img-bg {
    width: 100px; height: 100px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background-color: rgba(57, 255, 20, 0.08);
}
.item-img { width: 80px; height: 80px; object-fit: contain; }
.item-title { font-size: 0.9rem; font-weight: 600; text-align: center; }
.item-tag {
    position: absolute; top: 10px; left: 10px;
    font-size: 0.7rem; font-weight: 700;
    padding: 2px 8px; border-radius: 6px;
    color: #fff; text-transform: uppercase;
}
.tag-og { 
    background: linear-gradient(45deg, #ffff00, #39ff14);
}
.tag-secret { 
    background: linear-gradient(45deg, #39ff14, #00ff00);
}

/* --- SELECTION STYLES --- */
.selection-indicator {
    position: absolute; top: 10px; right: 10px;
    width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid var(--border-color);
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}
body.dark-mode .selection-indicator { background: rgba(13, 17, 23, 0.5); }

.item-card.selected {
    border-color: var(--accent-color);
    box-shadow: 0 0 25px rgba(57, 255, 20, 0.4);
}
.item-card.selected .selection-indicator {
    background: var(--accent-color);
    border-color: #000;
}
.item-card.selected .selection-indicator::after {
    content: '✓'; color: #000;
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px; font-weight: bold;
}

/* --- BUTTONS --- */
.web3-button {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem; font-weight: 600;
    color: var(--accent-color);
    background: transparent;
    border: 1px solid var(--accent-color);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.web3-button:hover {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.4);
}
.web3-button.gradient-animated {
    border: none;
    background: var(--accent-color);
    color: #000;
}
.web3-button.gradient-animated:hover { 
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.5);
}


/* --- MODALS --- */
.modal-backdrop {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--modal-backdrop);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    animation: fade-in 0.3s ease;
}
.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    width: 90%; max-width: 500px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slide-up 0.4s ease;
}
body.dark-mode .modal-content { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); }

.modal-close {
    position: absolute; top: 1rem; right: 1rem;
    background: none; border: none; font-size: 1.5rem;
    color: var(--text-secondary-color);
    cursor: pointer; transition: color 0.3s ease;
}
.modal-close:hover { color: var(--text-color); }
.modal-title { font-size: 1.8rem; margin: 0 0 0.5rem 0; }
.modal-sub { color: var(--text-secondary-color); margin: 0 0 1.5rem 0; }
.modal-input {
    width: 100%;
    padding: 0.8rem 1rem; border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem; margin-bottom: 1rem;
    box-sizing: border-box; transition: all 0.3s ease;
}
.modal-input:focus {
    outline: none; border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}
.modal-error { color: #ffff00; min-height: 1.2em; margin-bottom: 0.5rem; }

/* --- GENERATOR --- */
#generator-modal .loading-item-img {
    margin: 1.5rem auto; width: 100px; height: 100px;
    object-fit: contain; border-radius: 12px;
    background: rgba(139, 148, 158, 0.1);
    border: 1px solid var(--border-color);
}
.progress-bar {
    width: 100%; height: 1.5rem;
    background: var(--bg-color);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    margin: 1.5rem 0; overflow: hidden;
}
.progress-fill {
    height: 100%; border-radius: 1rem;
    font-family: 'Share Tech Mono', monospace;
    color: #000;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
    background: var(--accent-color);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.generator-urgent { color: #ff6b6b !important; }
.pulse-title { animation: pulse-text 2s ease-in-out infinite; }
.generator-claimed-images {
    margin: 1.5rem auto; padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-color);
}
.generator-claimed-title { font-size: 1rem; color: var(--text-secondary-color); margin-bottom: 1rem; }
.generator-claimed-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.generator-claimed-item {
    width: 50px; height: 50px;
    border-radius: 8px; border: 1px solid var(--border-color);
    background: var(--card-bg);
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.generator-claimed-img { width: 35px; height: 35px; object-fit: contain; }
.generator-claimed-item::after {
    content: '✓'; position: absolute; top: -6px; right: -6px;
    width: 16px; height: 16px; background: var(--accent-color);
    color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 10px;
    border: 2px solid var(--bg-color);
}

/* --- WINNER POPUP --- */
.winner-popup {
    display: none; position: fixed;
    left: 50%; bottom: 2rem; transform: translateX(-50%);
    z-index: 1001;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px; padding: 0.75rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex; align-items: center; gap: 1rem;
    opacity: 0; transition: opacity 0.4s ease, background-color 0.3s ease, border-color 0.3s ease;
}
#winner-popup-icon img { width: 38px; height: 38px; vertical-align: middle; border-radius: 8px; }
#winner-popup-content b { color: var(--accent-color); }

/* --- IOS POPUP --- */
#ios-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#ios-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://i.ibb.co/bRr4FxYt/gom6com.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* --- ABOUT PAGE --- */
.about-page .web3-container {
    margin-top: 1rem;
}
.about-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}
.about-hero {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.about-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin: 0;
}
.about-subtitle {
    margin: 0 auto;
    max-width: 640px;
    color: var(--text-secondary-color);
    line-height: 1.7;
}
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.about-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
body.dark-mode .about-card {
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}
.about-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(107, 70, 193, 0.15);
}
body.dark-mode .about-card:hover {
    box-shadow: 0 16px 40px rgba(147, 112, 219, 0.18);
}
.about-card h2 {
    margin: 0 0 0.75rem 0;
    font-size: 1.3rem;
    color: var(--accent-color);
}
.about-card p {
    margin: 0;
    color: var(--text-secondary-color);
    line-height: 1.6;
}
.about-cta {
    text-align: center;
}
.about-cta h2 {
    margin: 0 0 1rem 0;
    font-size: 1.6rem;
}

.popup-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://i.ibb.co/bRr4FxYt/gom6com.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

.popup {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 24px; 
    padding: 2rem; 
    width: 350px;
    max-width: calc(100vw - 40px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 1000; 
    font-size: 16px; 
    line-height: 1.5;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}
.highlight { color: var(--accent-color); }

/* --- GIF CONTAINER --- */
.gif-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.instruction-gif {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.instruction-text {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--text-color);
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    text-align: center;
}

/* --- ANIMATIONS --- */
@keyframes move-glow {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(100px, 50px) scale(1.2); }
}
@keyframes gradient-text { to { background-position: 200% center; } }
@keyframes gradient-anim {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-text { 0%, 100% { opacity: 1; } 50% { opacity: 0.8; } }
@keyframes float1 { 0% { transform: translate(-100px, 110vh) rotate(0deg); } 100% { transform: translate(110vw, -100px) rotate(720deg); } }
@keyframes float2 { 0% { transform: translate(110vw, 110vh) rotate(0deg); } 100% { transform: translate(-100px, -100px) rotate(-720deg); } }
@keyframes float3 { 0% { transform: translate(50vw, 110vh) rotate(0deg); } 100% { transform: translate(50vw, -100px) rotate(360deg); } }

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) and (min-width: 481px) {
    body { padding: 1rem 0.5rem; }
    .web3-container { padding: 1.5rem; }
    .header-title { font-size: 2rem; }
    .items-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 1rem; }
    .item-img-bg { width: 80px; height: 80px; }
    .item-img { width: 65px; height: 65px; }
    
    /* Larger GIF for tablets and larger phones */
    .instruction-gif {
        max-width: 100%;
        max-height: 320px;
        width: auto;
        height: auto;
        border-radius: 8px;
        object-fit: contain;
    }
}

@media (max-width: 480px) {
    body { padding: 1rem 0.5rem; }
    .web3-container { padding: 1.5rem; }
    .header-title { font-size: 2rem; }
    .items-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 1rem; }
    .item-img-bg { width: 80px; height: 80px; }
    .item-img { width: 65px; height: 65px; }
}
@media (max-width: 480px) {
    .web3-container { padding: 1rem; border-radius: 16px; }
    .items-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .header-title { font-size: 1.8rem; }
    .modal-content { padding: 1.5rem; }
    .modal-title { font-size: 1.5rem; }
    .main-header { margin-bottom: 1.5rem; }
    
    /* Mobile popup adjustments - Phone Optimized */
    #ios-popup {
        padding: 8px;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile */
    }
    
    #ios-popup::before {
        background-image: url('https://i.ibb.co/bRr4FxYt/gom6com.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: fixed; /* Better mobile performance */
    }
    
    .popup {
        width: 350px;
        max-width: calc(100vw - 16px);
        padding: 1.2rem;
        background: var(--card-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--border-color);
        border-radius: 20px;
        margin: 0 auto;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    }
    
    .instruction-gif {
        max-width: 100%;
        max-height: 280px;
        width: auto;
        height: auto;
        border-radius: 8px;
        object-fit: contain;
    }
    
    .instruction-text {
        font-size: 0.95rem;
        color: var(--text-color);
        font-weight: 700;
        font-family: 'Poppins', sans-serif;
        line-height: 1.4;
        margin-top: 0.5rem;
        text-align: center;
    }
    
    .gif-container {
        margin-bottom: 1rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* Extra small phones (320px and below) */
@media (max-width: 320px) {
    #ios-popup {
        padding: 4px;
    }
    
    .popup {
        width: 350px;
        max-width: calc(100vw - 8px);
        padding: 1rem;
        border-radius: 16px;
    }
    
    .instruction-gif {
        max-height: 220px;
    }
    
    .instruction-text {
        font-size: 0.9rem;
        font-weight: 700;
        text-align: center;
    }
}

/* --- 320x50 BANNER AD CONTAINER --- */
.banner-ad-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 50px;
    z-index: 1000; /* Keeps it on top of most content */
}

/* Optional: Styles for a placeholder so you can see the banner area */
.banner-ad-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary-color);
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px 8px 0 0; /* Rounded top corners */
}

/* Helper class */
.hidden { display: none !important; }