/* Reset and Base Styles */

/* Challenge Stats Styles */
.challenge-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
    border-radius: 8px;
    border-left: 4px solid #2e8b57;
}

.challenge-stats .stat {
    font-size: 0.9rem;
    color: #2e8b57;
    font-weight: 500;
}

.challenge-stats .stat strong {
    color: #1a5f1a;
    font-weight: 700;
}

@media (max-width: 768px) {
    .challenge-stats {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* Legal Pages Styles */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.legal-page h1 {
    color: #2e8b57;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-align: center;
}

.legal-page h2 {
    color: #2e8b57;
    font-size: 1.8rem;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 5px;
}

.legal-page h3 {
    color: #3cb371;
    font-size: 1.3rem;
    margin-top: 20px;
    margin-bottom: 10px;
}

.legal-page h4 {
    color: #555;
    font-size: 1.1rem;
    margin-top: 15px;
    margin-bottom: 8px;
}

.legal-page p {
    margin-bottom: 15px;
    line-height: 1.7;
    color: #555;
}

.legal-page ul {
    margin-bottom: 15px;
    padding-left: 30px;
}

.legal-page li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #555;
}

.legal-page a {
    color: #2e8b57;
    text-decoration: none;
    border-bottom: 1px dotted #2e8b57;
}

.legal-page a:hover {
    color: #3cb371;
    border-bottom: 1px solid #3cb371;
}

/* Content Article Styles */
.content-article {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-top: 20px;
    margin-bottom: 20px;
}

.content-article h1 {
    color: #2e8b57;
    font-size: 2.8rem;
    margin-bottom: 15px;
    text-align: center;
}

.article-intro {
    font-size: 1.2rem;
    color: #666;
    text-align: center;
    margin-bottom: 40px;
    font-style: italic;
    border-left: 4px solid #3cb371;
    padding-left: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
}

.fact-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px dotted #e0e0e0;
}

.fact-section:last-child {
    border-bottom: none;
}

.fact-section h2 {
    color: #2e8b57;
    font-size: 2rem;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
}

.fact-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #2e8b57, #3cb371);
    margin: 10px auto;
    border-radius: 2px;
}

.fact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.fact-item {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border-left: 5px solid #3cb371;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.fact-item h3 {
    color: #2e8b57;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.fact-item p {
    color: #555;
    line-height: 1.7;
}

.lifecycle-content, .behavior-content, .culture-content {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-top: 25px;
}

.lifecycle-list {
    margin: 20px 0;
    padding-left: 30px;
}

.lifecycle-list li {
    margin-bottom: 15px;
    line-height: 1.7;
    color: #555;
}

.lifecycle-list strong {
    color: #2e8b57;
}

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

.habitat-item {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-top: 4px solid #3cb371;
}

.habitat-item h3 {
    color: #2e8b57;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.communication-types {
    margin-top: 25px;
}

.communication-types h4 {
    color: #2e8b57;
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.gaming-connection {
    background: linear-gradient(135deg, #2e8b57, #3cb371);
    color: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    margin-top: 40px;
}

.gaming-connection h2 {
    color: white;
    margin-bottom: 20px;
    font-size: 2rem;
}

.gaming-connection p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.7;
}

.play-button {
    display: inline-block;
    background: white;
    color: #2e8b57;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.play-button:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Breadcrumb Navigation */
.breadcrumb {
    padding: 20px 0 10px;
    font-size: 14px;
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '>';
    margin: 0 8px;
    color: #999;
    font-size: 12px;
}

.breadcrumb-link {
    color: #2e8b57;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.breadcrumb-link:hover {
    background: #e8f5e8;
    color: #1f5f3f;
}

.breadcrumb-current {
    color: #666;
    font-weight: 500;
}

/* FAQ Styles */
.faq-section {
    margin-bottom: 40px;
}

.faq-section h2 {
    color: #2e8b57;
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.faq-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #3cb371;
    box-shadow: 0 2px 8px rgba(46,139,87,0.1);
}

.faq-question {
    background: #f8f9fa;
    color: #2e8b57;
    padding: 20px;
    margin: 0;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    text-align: left;
    width: 100%;
    position: relative;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: #e8f5e8;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: bold;
    color: #3cb371;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
}

.faq-answer p {
    padding: 20px;
    margin: 0;
    line-height: 1.6;
    color: #555;
}

.faq-answer a {
    color: #2e8b57;
    text-decoration: none;
    border-bottom: 1px dotted #2e8b57;
}

.faq-answer a:hover {
    color: #1f5f3f;
    border-bottom: 1px solid #1f5f3f;
}

/* Performance Optimizations */
html {
    scroll-behavior: smooth;
}

/* Critical CSS - Above the fold */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Optimize font loading */
body {
    font-display: swap;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #2e8b57, #3cb371);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Game Hero Section - First screen with immediate game access */
.game-section-hero {
    background: linear-gradient(135deg, #87ceeb, #4682b4);
    color: white;
    padding: 2rem 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.game-hero-content {
    text-align: center;
    margin-bottom: 2rem;
}

.game-hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.game-hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.game-container-hero {
    max-width: 1000px;
    margin: 0 auto;
}

.game-frame-hero {
    width: 100%;
    height: 600px;
    border: 3px solid white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    margin-bottom: 1.5rem;
    background: white;
}

.game-frame-hero iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.game-instructions {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.game-instructions p {
    font-size: 1.1rem;
    margin: 0;
}

/* Benefits Hero Section */
.benefits-hero-section {
    padding: 3rem 0;
    background: white;
}

.benefits-hero-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.benefit-hero {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.benefit-hero:hover {
    transform: translateY(-5px);
}

.benefit-hero-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.benefit-hero h3 {
    color: #2e8b57;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.benefit-hero p {
    color: #666;
    font-size: 0.9rem;
}

.play-button {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: bold;
}

.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

/* Game Section */
.game-section {
    padding: 3rem 0;
    background: white;
}

.game-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.game-header {
    margin-bottom: 2rem;
}

.game-header h2 {
    font-size: 2.5rem;
    color: #2e8b57;
    margin-bottom: 1rem;
}

.game-header p {
    font-size: 1.1rem;
    color: #666;
}

.game-frame {
    width: 100%;
    height: 600px;
    border: 3px solid #2e8b57;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(46, 139, 87, 0.2);
    margin-bottom: 2rem;
}

.game-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.game-info {
    background: #f0f8f0;
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid #2e8b57;
}

.game-info p {
    color: #2e8b57;
    font-weight: 500;
}

/* Quick Guide Section */
.quick-guide {
    padding: 4rem 0;
    background: #f8f9fa;
}

.quick-guide h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #2e8b57;
    margin-bottom: 3rem;
}

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

.guide-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.guide-item:hover {
    transform: translateY(-5px);
}

.guide-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.guide-item h3 {
    color: #2e8b57;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.guide-item p {
    color: #666;
}

/* Why Play Section */
.why-play {
    padding: 4rem 0;
    background: white;
}

.why-play h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #2e8b57;
    margin-bottom: 3rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.benefit {
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid #2e8b57;
    transition: transform 0.3s ease;
}

.benefit:hover {
    transform: translateY(-3px);
}

.benefit h3 {
    color: #2e8b57;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.benefit p {
    color: #555;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    background: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    margin: 0 0.5rem;
    color: #6c757d;
}

.breadcrumb a {
    color: #2e8b57;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #1e5631;
    text-decoration: underline;
}

.breadcrumb li:last-child span {
    color: #6c757d;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #3cb371;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #3cb371;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
    color: #bdc3c7;
}

.footer-bottom a {
    color: #3cb371;
    text-decoration: none;
}

/* Tablet Responsive */
@media screen and (max-width: 992px) and (min-width: 769px) {
    .benefits-hero-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: #2e8b57;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .game-hero-title {
        font-size: 2rem;
    }

    .game-hero-subtitle {
        font-size: 1rem;
    }

    .game-section-hero {
        min-height: auto;
        padding: 1.5rem 0;
    }

    .game-frame-hero {
        height: 400px;
        border-width: 2px;
    }

    .benefits-hero-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .benefit-hero {
        padding: 1rem;
    }

    .benefit-hero-icon {
        font-size: 2rem;
    }

    .game-header h2 {
        font-size: 2rem;
    }

    .game-frame {
        height: 400px;
    }

    .guide-grid {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .game-section-hero {
        padding: 1rem 0;
    }

    .game-hero-title {
        font-size: 1.8rem;
    }

    .game-frame-hero {
        height: 350px;
        border-radius: 15px;
    }

    .benefits-hero-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .game-section,
    .quick-guide,
    .why-play {
        padding: 2rem 0;
    }

    .game-frame {
        height: 350px;
    }

    .guide-item,
    .benefit {
        padding: 1.5rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
.game-frame iframe {
    transition: opacity 0.3s ease;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus Styles for Accessibility */
button:focus,
a:focus {
    outline: 2px solid #3cb371;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .play-button {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}