/* Variables */
:root {
    --primary: #00ff88;
    --primary-dark: #00cc6a;
    --secondary: #ff6b35;
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a25;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --border-color: #2a2a3a;
    --font-main: 'Inter', sans-serif;
    --font-retro: 'Press Start 2P', cursive;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-retro);
    font-size: 1rem;
}

.logo-bit {
    color: var(--primary);
}

.logo-ria {
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-game {
    font-family: var(--font-retro);
    font-size: 0.7rem;
    background: var(--secondary);
    color: white;
    padding: 0.75rem 1.5rem;
}

.btn-game:hover {
    background: #ff8555;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding: 8rem 2rem 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--primary);
    position: relative;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Game Container */
.game-container {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

.game-wrapper {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-retro);
    font-size: 0.65rem;
}

.game-title {
    color: var(--secondary);
}

.game-score {
    color: var(--primary);
}

#gameCanvas {
    display: block;
    background: #1a1a2e;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    image-rendering: pixelated;
}

.game-controls {
    text-align: center;
    padding-top: 1rem;
}

.game-instructions {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

kbd {
    background: var(--bg-dark);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-family: var(--font-retro);
    font-size: 0.6rem;
}

/* Features Section */
.features {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-5px);
    border-color: var(--primary);
}

.feature-icon {
    font-family: var(--font-retro);
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* CTA Section */
.cta {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-dark) 100%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Footer */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand {
    font-family: var(--font-retro);
    font-size: 0.9rem;
}

.footer-brand p {
    font-family: var(--font-main);
    color: var(--text-secondary);
    margin-top: 1rem;
    font-size: 0.9rem;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-contact p {
    color: var(--text-secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Page Styles */
.page-header {
    padding: 8rem 2rem 4rem;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-dark) 100%);
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Services Page */
.services-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: start;
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-dark);
    border: 2px solid var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-retro);
    font-size: 0.8rem;
    color: var(--primary);
}

.service-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.service-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.service-features span {
    background: var(--bg-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Contact Page */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-method-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
}

.contact-method-text strong {
    display: block;
    margin-bottom: 0.25rem;
}

.contact-method-text span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
}

/* Legal Pages */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.legal-content h3 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.legal-content ul {
    color: var(--text-secondary);
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    list-style: disc;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.legal-date {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 2rem;
}

/* Technologies Section */
.technologies {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.technologies h2 {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    color: var(--text-secondary);
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.3s ease;
    min-width: 100px;
}

.tech-item:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.tech-icon {
    font-family: var(--font-retro);
    font-size: 1rem;
    color: var(--primary);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    border-radius: 8px;
}

.tech-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.tech-item:hover .tech-name {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 6rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    #gameCanvas {
        width: 100%;
        max-width: 350px;
        height: auto;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .service-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .service-icon {
        margin: 0 auto;
    }

    .service-features {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .game-wrapper {
        padding: 0.75rem;
    }

    .game-header {
        font-size: 0.55rem;
    }
}
