/* Base Styles & Variables */
:root {
    --primary-color: #4a6fa5;
    --primary-dark: #3a5a8c;
    --secondary-color: #f39c12;
    --accent-color: #e74c3c;
    --text-color: #2c3e50;
    --light-text: #ecf0f1;
    --dark-bg: #1a252f;
    --light-bg: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #4a6fa5 0%, #3a5a8c 100%);
    --gradient-secondary: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 111, 165, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(74, 111, 165, 0.5);
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: var(--transition);
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
    padding: 1rem 0;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo span {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2.5rem;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover:after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 700px;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://games.michitai.com/ancient-terra-game/background.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.4;
    z-index: 1;
}

/* Features Section */
.features {
    padding: 6rem 0;
    background-color: var(--light-bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 10px 20px rgba(74, 111, 165, 0.3);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Screenshots Section */
.screenshots {
    padding: 6rem 0;
    background-color: white;
}

.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.screenshot-item {
    height: 250px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #888;
    transition: var(--transition);
}

.screenshot-item:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* About Section */
.about {
    padding: 6rem 0;
    background-color: var(--light-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.character-placeholder {
    width: 300px;
    height: 300px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 5rem;
    box-shadow: 0 15px 35px rgba(74, 111, 165, 0.3);
}

.game-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    text-align: center;
}

.stat {
    flex: 1;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: #666;
}

/* Newsletter Section */
.newsletter {
    padding: 5rem 0;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
}

.newsletter h2 {
    color: white;
    margin-bottom: 1rem;
}

.newsletter p {
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    overflow: hidden;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    font-size: 1rem;
    outline: none;
}

.newsletter-form button {
    border-radius: 0 50px 50px 0;
    padding: 15px 30px;
    font-weight: 600;
    background: var(--gradient-secondary);
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--secondary-color);
}

/* Footer */
.footer {
    background-color: var(--dark-bg);
    color: #ecf0f1;
    padding: 5rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-about h3 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.footer-about p {
    opacity: 0.8;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links h4, 
.footer-contact h4 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-links h4:after,
.footer-contact h4:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #bdc3c7;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-contact a {
    color: #bdc3c7;
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-image {
        margin-top: 3rem;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .stat {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 1.5rem 0;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 80%;
        margin-bottom: 1rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        border-radius: 10px;
    }
    
    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
        border-radius: 10px;
    }
    
    .newsletter-form button {
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .feature-card {
        padding: 1.5rem 1rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links h4:after,
    .footer-contact h4:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-contact p {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Game Guide Section */
.game-guide {
    padding: 6rem 0;
    background-color: #f9fafb;
}

.game-guide .section-title {
    text-align: center;
    margin-bottom: 1rem;
}

.game-guide .section-subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.panel-container {
    max-width: 900px;
    margin: 0 auto;
}

.panel {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    background: white;
}

.panel:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.panel-header {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.panel-header:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.panel-icon {
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

.panel.active .panel-icon {
    transform: rotate(180deg);
}

.panel-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: white;
}

.panel-content-inner {
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.panel-content p {
    margin: 0 0 1rem 0;
    color: #4b5563;
    line-height: 1.6;
}

.panel-content p:last-child {
    margin-bottom: 0;
}

/* Color Swatches for Voxel Color Palette */
.color-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.panel-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.panel-content h5 {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
}

.panel-content ul {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.panel-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

/* Responsive Styles for Game Guide */
@media (max-width: 768px) {
    .game-guide {
        padding: 4rem 0;
    }
    
    .panel-header h3 {
        font-size: 1rem;
        padding-right: 1.5rem;
    }
    
    .panel-content-inner {
        padding: 1.25rem;
    }
    
    .back-to-top {
        width: 2.5rem;
        height: 2.5rem;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out forwards;
}
