:root {
    --primary-color: #00a8ff;
    --secondary-color: #005073;
    --accent-color: #ffcc00;
    --text-color: #ffffff;
    --bg-gradient-start: #001e3c;
    --bg-gradient-end: #004e92;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

/* Adult Swim / Glitch Aesthetics */
@font-face {
    font-family: 'GlitchFont';
    src: local('Courier New'), monospace; /* Fallback to a monospaced font */
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.1) 50%,
        rgba(0,0,0,0.1)
    );
    background-size: 100% 4px;
    z-index: 999;
    pointer-events: none;
    animation: scrollScanlines 10s linear infinite;
}

@keyframes scrollScanlines {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}

#subliminal-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    background: rgba(0, 0, 0, 0.85);
    transition: opacity 0.1s;
}

#subliminal-text {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 3rem;
    color: #fff;
    text-transform: uppercase;
    text-align: center;
    max-width: 80%;
    text-shadow: 2px 2px 0 #ff0000, -2px -2px 0 #00ffff;
}

.glitch-active {
    animation: glitch-skew 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
    color: var(--text-color);
    position: relative;
}

.glitch-active::before,
.glitch-active::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent; /* Changed from solid color to transparent to fit glass theme */
}

.glitch-active::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

.glitch-active::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(30px, 9999px, 10px, 0); }
    20% { clip: rect(80px, 9999px, 90px, 0); }
    40% { clip: rect(10px, 9999px, 50px, 0); }
    60% { clip: rect(40px, 9999px, 20px, 0); }
    80% { clip: rect(90px, 9999px, 60px, 0); }
    100% { clip: rect(20px, 9999px, 70px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(10px, 9999px, 80px, 0); }
    20% { clip: rect(50px, 9999px, 20px, 0); }
    40% { clip: rect(90px, 9999px, 10px, 0); }
    60% { clip: rect(20px, 9999px, 40px, 0); }
    80% { clip: rect(60px, 9999px, 90px, 0); }
    100% { clip: rect(70px, 9999px, 30px, 0); }
}

@keyframes glitch-skew {
    0% { transform: skew(0deg); }
    20% { transform: skew(-2deg); }
    40% { transform: skew(2deg); }
    60% { transform: skew(-1deg); }
    80% { transform: skew(1deg); }
    100% { transform: skew(0deg); }
}

.color-invert {
    filter: invert(1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scroll from fish */
    position: relative;
}

/* Fish Tank Background Elements */
#fish-tank {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.fish {
    position: absolute;
    width: 80px; /* Adjust based on image size */
    height: auto;
    opacity: 0.8;
    transition: transform 0.5s ease;
}

.bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    bottom: -20px;
    animation: rise 10s infinite ease-in;
}

@keyframes rise {
    0% { bottom: -20px; transform: translateX(0); opacity: 0; }
    50% { opacity: 0.6; }
    100% { bottom: 100vh; transform: translateX(-20px); opacity: 0; }
}

@keyframes swimRight {
    from { left: -150px; }
    to { left: 100vw; }
}

@keyframes swimLeft {
    from { left: 100vw; }
    to { left: -150px; }
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
    transition: transform 0.3s ease-in-out;
}

nav.nav-hidden {
    transform: translateY(-100%);
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 20px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: color 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a:hover, nav a.active {
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

/* Main Content Container */
.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    text-align: center;
}

/* Landing Page Specifics */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 70vh; /* Center vertically on landing */
}

h1 {
    font-size: 4rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 40px;
    color: #e0e0e0;
}

.btn-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-color);
    color: #00334e;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--text-color);
    color: var(--text-color);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Features Section (for landing) */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
    text-align: left;
}

.feature-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 10px;
}

.feature-card h3 {
    color: var(--accent-color);
    margin-bottom: 10px;
}

/* Text Pages (Privacy, TOS, Donate) */
.text-content {
    text-align: left;
    line-height: 1.6;
}

.text-content h2 {
    color: var(--accent-color);
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.text-content p, .text-content ul {
    margin-bottom: 15px;
}

.text-content ul {
    padding-left: 20px;
}

/* Donation Cards */
.donation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.donation-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.donation-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
}

.donation-card h3 {
    color: var(--accent-color);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #fff;
}

.perks {
    text-align: left;
    margin-bottom: 30px;
    flex-grow: 1;
}

.perks li {
    margin-bottom: 8px;
    list-style-type: none;
}

.perks li::before {
    content: "🐟";
    margin-right: 10px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: auto;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-gradient-start);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Shop Styles */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.shop-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.shop-item:hover {
    transform: scale(1.05) rotate(1deg);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.3);
}

.shop-item img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
}

.shop-item h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.shop-item .price {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.shop-item .currency {
    font-size: 0.8rem;
    color: #aaa;
    text-transform: uppercase;
}

.shop-item .buy-btn {
    background: var(--secondary-color);
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'GlitchFont', monospace;
    transition: background 0.2s;
}

.shop-item .buy-btn:hover {
    background: var(--primary-color);
}

/* Glitchy Shop Item Variants */
.shop-item.glitchy {
    animation: shake 0.5s infinite;
}

.shop-item.glitchy img {
    filter: hue-rotate(90deg) invert(1);
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

/* Weird Landing Page Styles */
.weird-landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80vh;
    font-family: 'Courier New', monospace;
    color: #0f0;
    text-shadow: 0 0 5px #0f0;
}

.weird-landing h1 {
    font-size: 5rem;
    animation: glitch-skew 1s infinite;
}

/* Easter Egg Prompts */
.easter-egg-zone {
    position: relative;
}

.easter-egg-prompt {
    position: absolute;
    top: var(--prompt-top, 50%);
    left: var(--prompt-left, 50%);
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    animation: chatPulse 2s ease-in-out infinite;
    z-index: 5;
}

.easter-egg-prompt img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 168, 255, 0.5));
}

.easter-egg-chat {
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--accent-color);
}

@keyframes chatPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 12px rgba(255, 204, 0, 0.4); }
    50% { transform: translate(-50%, -50%) scale(1.05); box-shadow: 0 0 25px rgba(0, 168, 255, 0.7); }
}

body.easter-egg-active {
    overflow: hidden;
}

.easter-egg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1200;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.overlay-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, hsla(var(--overlay-hue), 80%, 60%, 0.7), transparent),
        radial-gradient(circle at 80% 30%, hsla(calc(var(--overlay-hue) + 120), 75%, 55%, 0.6), transparent),
        linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8));
    animation: overlayHueShift 6s linear infinite;
}

.overlay-noise {
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 3px);
    mix-blend-mode: soft-light;
    animation: scrollScanlines 5s linear infinite;
}

.overlay-text-stream {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 60px;
    display: flex;
    flex-wrap: wrap;
    align-content: space-around;
    gap: 12px;
    z-index: 2;
}

.overlay-text-fragment {
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    color: hsla(var(--fragment-hue), 90%, 70%, 0.9);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8), 0 0 20px hsla(var(--fragment-hue), 90%, 70%, 0.7);
    animation: fragmentFly linear forwards;
}

@keyframes fragmentFly {
    from { transform: translate3d(0, 20px, 0) scale(0.9); opacity: 0; }
    to { transform: translate3d(0, -20px, 0) scale(1.1); opacity: 1; }
}

.overlay-close {
    position: absolute;
    bottom: 30px;
    right: 30px;
    padding: 12px 24px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.overlay-close:hover {
    background: rgba(255, 204, 0, 0.2);
    color: var(--accent-color);
}

@keyframes overlayHueShift {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Typography Adjustments */
    h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }

    #subliminal-text {
        font-size: 1.5rem;
        max-width: 90%;
    }

    /* Navigation Adjustments */
    nav {
        flex-direction: column;
        padding: 15px;
        background: rgba(0, 0, 0, 0.6); /* Darker background for better readability */
    }

    nav a {
        margin: 8px 0;
        font-size: 1.2rem;
        padding: 5px;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    nav a:last-child {
        border-bottom: none;
    }

    /* Layout Adjustments */
    .container {
        margin: 20px 15px;
        padding: 25px 15px;
        width: auto;
    }

    .hero {
        height: auto;
        padding: 40px 0;
        min-height: 60vh;
    }

    /* Button Adjustments */
    .btn-group {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 1.1rem;
    }

    /* Grid Adjustments */
    .features, 
    .donation-grid, 
    .shop-grid {
        grid-template-columns: 1fr; /* Force single column */
        gap: 20px;
    }

    .feature-card, 
    .donation-card, 
    .shop-item {
        padding: 20px;
    }

    /* Fish Tank Adjustments */
    .fish {
        width: 60px; /* Smaller fish on mobile */
        opacity: 0.6; /* Less intrusive */
    }
    
    /* Shop Adjustments */
    .shop-item img {
        width: 80px;
        height: 80px;
    }

    .easter-egg-prompt {
        padding: 10px 12px;
    }

    .easter-egg-prompt img {
        width: 70px;
        height: 70px;
    }

    .overlay-text-stream {
        padding: 30px;
    }

    .overlay-close {
        right: 15px;
        bottom: 15px;
        padding: 10px 18px;
    }
}

/* Guide Page Styles */

/* Table of Contents */
.guide-toc {
    background: rgba(0, 0, 0, 0.3);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    margin-bottom: 40px;
    text-align: left;
}

.guide-toc h2 {
    color: var(--accent-color);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.guide-toc ul {
    list-style-type: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive columns */
    gap: 10px;
    padding: 0;
}

.guide-toc a {
    color: var(--text-color);
    text-decoration: none;
    display: block;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    transition: all 0.2s;
}

.guide-toc a:hover {
    background: var(--secondary-color);
    color: #fff;
    transform: translateX(5px);
}

/* Info Cards for Guide Sections */
.guide-card {
    background: rgba(0, 0, 0, 0.25);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    margin-bottom: 30px;
    text-align: left;
    scroll-margin-top: 100px; /* Prevents nav bar from covering title when jumping */
}

.guide-card h2 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.guide-card h3 {
    color: var(--primary-color);
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.guide-card ul, .guide-card ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.guide-card li {
    margin-bottom: 8px;
}

.guide-card p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.guide-icon {
    float: right;
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-left: 20px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.3));
    animation: float 3s ease-in-out infinite;
}

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