/* Reset and Base Styles - MEME THEME */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Rainbow Meme Color Palette */
    --meme-pink: #ff0080;
    --meme-green: #00ff80;
    --meme-cyan: #00ffff;
    --meme-purple: #8000ff;
    --meme-yellow: #ffff00;
    --meme-orange: #ff8000;
    --meme-red: #ff0000;
    
    /* Primary Colors */
    --primary-color: #ff0080;
    --secondary-color: #00ff80;
    --accent-color: #8000ff;
    --text-color: #000000;
    --background: #ffffff;
    
    /* Meme Gradients */
    --rainbow-gradient: linear-gradient(45deg, 
        #ff0080 0%, #00ff80 25%, #00ffff 50%, 
        #8000ff 75%, #ff0080 100%);
    --meme-hero-gradient: linear-gradient(135deg, 
        #ff0080 0%, #00ff80 25%, #00ffff 50%, 
        #8000ff 75%, #ffff00 100%);
    
    /* Meme Effects */
    --meme-border: 5px solid;
    --meme-shadow: 0 0 0 5px #ff0080, 0 0 0 10px #00ff80, 0 0 0 15px #00ffff;
    --meme-glow: 0 0 20px rgba(255, 0, 128, 0.5);
}

body {
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background);
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 0, 128, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 255, 128, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(128, 0, 255, 0.1) 0%, transparent 50%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Styles - MEME THEME - Enhanced for game section */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--rainbow-gradient);
    border-bottom: var(--meme-border) var(--meme-pink);
    box-shadow: var(--meme-shadow);
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h1 {
    color: #000;
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 2px 2px 0px var(--meme-yellow);
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: #000;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 10px 15px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.8);
    border: 3px solid var(--meme-pink);
    text-shadow: 1px 1px 0px var(--meme-yellow);
}

.nav-link:hover {
    background: var(--meme-pink);
    color: #fff;
    transform: scale(1.1);
    box-shadow: var(--meme-glow);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ff6b6b;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section - MEME THEME - Now after game */
.hero {
    min-height: 80vh;
    background: var(--meme-hero-gradient);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    border: var(--meme-border) var(--meme-pink);
    box-shadow: var(--meme-shadow);
    animation: memeRainbow 4s ease-in-out infinite;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-bg.jpg') center/cover;
    opacity: 0.1;
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #000;
    text-shadow: 
        3px 3px 0px var(--meme-yellow),
        6px 6px 0px var(--meme-pink),
        9px 9px 0px var(--meme-green);
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #000;
    font-weight: bold;
    text-shadow: 2px 2px 0px var(--meme-cyan);
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-description {
    font-size: 1.3rem;
    margin-bottom: 40px;
    line-height: 1.8;
    color: #000;
    font-weight: bold;
    text-shadow: 1px 1px 0px var(--meme-yellow);
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 50px;
    animation: fadeInUp 1s ease 0.6s both;
}

.btn {
    padding: 20px 40px;
    border: var(--meme-border) var(--meme-pink);
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    text-shadow: 2px 2px 0px var(--meme-yellow);
    box-shadow: var(--meme-shadow);
    animation: memePulse 2s ease-in-out infinite;
}

.btn-primary {
    background: var(--meme-pink);
    color: #000;
    border: var(--meme-border) var(--meme-green);
}

.btn-primary:hover {
    background: var(--meme-green);
    color: #000;
    transform: scale(1.1);
    box-shadow: var(--meme-glow);
}

.btn-secondary {
    background: var(--meme-cyan);
    color: #000;
    border: var(--meme-border) var(--meme-purple);
}

.btn-secondary:hover {
    background: var(--meme-purple);
    color: #fff;
    transform: scale(1.1);
    box-shadow: var(--meme-glow);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    animation: fadeInUp 1s ease 0.8s both;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Game Section - MEME THEME - Now at top */
.game-section {
    padding: 80px 0 60px 0;
    background: var(--rainbow-gradient);
    border: var(--meme-border) var(--meme-pink);
    box-shadow: var(--meme-shadow);
    position: relative;
    overflow: hidden;
    margin-top: 70px; /* Account for fixed navbar */
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 40px;
    color: #000;
    font-weight: bold;
    text-shadow: 
        3px 3px 0px var(--meme-yellow),
        6px 6px 0px var(--meme-pink);
}

/* Game Container - Single column layout */
.game-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

/* Game iframe wrapper with background image */
.game-iframe-wrapper {
    position: relative;
    width: 100%;
    max-width: 1080px;
    height: 600px;
    border-radius: 25px;
    overflow: hidden;
    border: var(--meme-border) var(--meme-pink);
    box-shadow: var(--meme-shadow);
    background-color: #ff6b6b !important; /* Fallback color */
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        url('../images/steal-brainrot.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
}

/* Hide background image when game starts */
.game-iframe-wrapper.game-started {
    background-image: none !important;
    background-color: #000 !important;
}

/* Game mask overlay - hidden by default, shown when game starts */
.game-mask-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.game-iframe-wrapper.game-started .game-mask-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Play Now Button Overlay */
.play-now-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
}

.play-now-btn {
    background: var(--rainbow-gradient);
    color: #000;
    border: var(--meme-border) var(--meme-pink);
    padding: 20px 50px;
    font-size: 1.8rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    text-shadow: 2px 2px 0px var(--meme-yellow);
    box-shadow: var(--meme-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.play-now-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--meme-glow);
    background: var(--meme-hero-gradient);
}

.play-now-btn:active {
    transform: scale(0.95);
}

.play-now-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.play-now-btn:hover::before {
    left: 100%;
}

/* Hide button when game starts */
.game-iframe-wrapper.game-started .play-now-overlay {
    display: none;
}

/* Animated gradient background as fallback */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Force background image display for initial state */
.game-section .container .game-container .game-iframe-wrapper:not(.game-started) {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/steal-brainrot.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #ff6b6b !important;
    position: relative !important;
}

/* Additional rule to ensure background is always visible before game starts */
.game-iframe-wrapper:not(.game-started) {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/steal-brainrot.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #ff6b6b !important;
}

/* Ultra-specific rule to force background display */
body .game-section .container .game-container .game-iframe-wrapper:not(.game-started) {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/steal-brainrot.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #ff6b6b !important;
    background-attachment: scroll !important;
}

/* Game Controls Section - Below game container */
.game-controls-section {
    background: var(--rainbow-gradient);
    padding: 40px;
    border-radius: 25px;
    border: var(--meme-border) var(--meme-green);
    box-shadow: var(--meme-shadow);
    color: #000;
    font-weight: bold;
    text-align: center;
}

.game-controls-section h3 {
    font-size: 2rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 0px var(--meme-yellow);
}

/* Remove duplicate game-iframe-wrapper styles */

.game-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    opacity: 0; /* Hidden by default, shown when game starts */
    pointer-events: none; /* Disable interaction when hidden */
}

/* Show iframe when game starts */
.game-iframe-wrapper.game-started .game-iframe {
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 2 !important;
}

/* Hide IGRU.net original text in iframe */
.game-iframe-wrapper {
    position: relative;
}

.game-iframe-wrapper::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 150px;
    height: 25px;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    pointer-events: none;
    border-radius: 5px;
}

.game-iframe:hover {
    transform: scale(1.02);
    box-shadow: var(--meme-glow);
}

/* Remove old game-info styles as controls moved below */

/* Remove old game-info h3 styles */

.controls-grid {
    display: grid;
    gap: 20px;
}

.control-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 20px;
    border: var(--meme-border) var(--meme-cyan);
    box-shadow: var(--meme-shadow);
    color: #000;
    font-weight: bold;
}

.control-item strong {
    color: var(--meme-pink);
    display: block;
    margin-bottom: 10px;
    text-shadow: 1px 1px 0px var(--meme-yellow);
}

.control-item ul {
    list-style: none;
    padding: 0;
}

.control-item li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.control-item li:last-child {
    border-bottom: none;
}

/* What is Section */
.what-is-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    align-items: center;
}

.content-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.content-text .lead {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: #333;
}

.content-text p {
    margin-bottom: 20px;
}

.content-image {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.character-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.character-image:hover {
    transform: scale(1.05);
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--rainbow-gradient);
    padding: 40px 30px;
    border-radius: 25px;
    text-align: center;
    border: var(--meme-border) var(--meme-pink);
    box-shadow: var(--meme-shadow);
    transition: all 0.3s ease;
    color: #000;
    font-weight: bold;
}

.feature-card:hover {
    transform: scale(1.05);
    box-shadow: var(--meme-glow);
}

.feature-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0px var(--meme-yellow);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #000;
    text-shadow: 2px 2px 0px var(--meme-cyan);
}

.feature-card p {
    line-height: 1.6;
    color: #000;
    font-weight: bold;
    text-shadow: 1px 1px 0px var(--meme-yellow);
}

/* Guide Section */
.guide-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.guide-steps {
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.step-number {
    background: #ff6b6b;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.step-content p {
    line-height: 1.6;
    color: #666;
}

/* Why Play Section */
.why-play-section {
    padding: 80px 0;
    background: #fff;
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.reason-card {
    background: #f8f9fa;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.reason-card:hover {
    transform: translateY(-5px);
}

.reason-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.reason-card p {
    line-height: 1.6;
    color: #666;
}

/* FAQ Section */
.faq-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--rainbow-gradient);
    margin-bottom: 20px;
    border-radius: 25px;
    border: var(--meme-border) var(--meme-pink);
    box-shadow: var(--meme-shadow);
    overflow: hidden;
    color: #000;
    font-weight: bold;
}

.faq-question {
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-question h3 {
    font-size: 1.3rem;
    color: #000;
    margin: 0;
    text-shadow: 2px 2px 0px var(--meme-yellow);
}

.faq-toggle {
    font-size: 2rem;
    color: var(--meme-pink);
    transition: transform 0.3s ease;
    text-shadow: 2px 2px 0px var(--meme-yellow);
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 30px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 30px 25px;
    max-height: 200px;
}

.faq-answer p {
    line-height: 1.6;
    color: #666;
}

/* Footer - MEME THEME */
.footer {
    background: var(--rainbow-gradient);
    color: #000;
    padding: 50px 0 20px;
    border-top: var(--meme-border) var(--meme-pink);
    box-shadow: var(--meme-shadow);
    font-weight: bold;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    color: #000;
    text-shadow: 2px 2px 0px var(--meme-yellow);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #ff6b6b;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    color: #ccc;
}

/* MEME THEME ANIMATIONS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes memeBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

@keyframes memeWiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(5deg);
    }
    75% {
        transform: rotate(-5deg);
    }
}

@keyframes memePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: var(--meme-shadow);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 
            0 0 0 8px var(--meme-pink), 
            0 0 0 16px var(--meme-green), 
            0 0 0 24px var(--meme-cyan);
    }
}

@keyframes memeRainbow {
    0% {
        filter: hue-rotate(0deg);
    }
    25% {
        filter: hue-rotate(90deg);
    }
    50% {
        filter: hue-rotate(180deg);
    }
    75% {
        filter: hue-rotate(270deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

@keyframes memeSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes memeShake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}
