/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: #0d0d0d;
    color: #e8e8e8;
    line-height: 1.6;
}

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

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0d0d0d;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    max-width: 160px;
    margin-bottom: 30px;
    opacity: 0.95;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 3px solid #2a2a2a;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffffff, #888888);
    z-index: 10000;
    transition: width 0.1s ease;
    will-change: width;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #ffffff;
    color: #0d0d0d;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    will-change: transform, opacity;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #e8e8e8;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Sticky Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    will-change: transform;
}

.navbar-visible {
    transform: translateY(0);
}

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

.navbar-logo {
    height: 40px;
    width: auto;
    opacity: 0.95;
}

.navbar-links {
    display: flex;
    gap: 30px;
}

.navbar-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: opacity 0.2s ease;
}

.navbar-links a:hover {
    opacity: 0.7;
}

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

/* Video Header Section */
.video-header {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('video-poster.jpg');
    background-size: cover;
    background-position: center;
}

.background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 1;
    object-fit: cover;
    pointer-events: none;
}

.background-video:not([src]) {
    display: none;
}

.background-video::-webkit-media-controls {
    display: none !important;
}

.background-video::-webkit-media-controls-enclosure {
    display: none !important;
}

.header-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px;
}

.logo {
    max-width: 180px;
    width: 100%;
    height: auto;
    margin-bottom: 20px;
    opacity: 0.95;
}

.tagline {
    font-size: 1rem;
    color: #ffffff;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.8;
}

/* About Section */
.about {
    padding: 100px 20px;
    background-color: #0d0d0d;
    text-align: center;
}

.about h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 400;
    letter-spacing: 1px;
}

.about p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    color: #b8b8b8;
    font-weight: 300;
}

/* Stats Section */
.stats-section {
    padding: 80px 20px;
    background-color: #111111;
    border-top: 1px solid #222222;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 769px) and (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .stat-item:nth-child(4) {
        grid-column: 1 / 2;
    }
    .stat-item:nth-child(5) {
        grid-column: 2 / 3;
    }
}

.stat-item {
    text-align: center;
    padding: 30px 20px;
    background-color: #181818;
    border-radius: 4px;
    border: 1px solid #222222;
    transition: all 0.3s ease;
    will-change: transform;
}

.stat-item:hover {
    background-color: #1d1d1d;
    border-color: #2a2a2a;
    transform: translateY(-3px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1;
}

.stat-label {
    font-size: 0.95rem;
    color: #888888;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Timeline Section */
.timeline-section {
    padding: 80px 20px;
    background-color: #0d0d0d;
    border-top: 1px solid #222222;
}

.timeline-section h2 {
    font-size: 2rem;
    margin-bottom: 60px;
    color: #ffffff;
    font-weight: 400;
    letter-spacing: 1px;
    text-align: center;
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    padding-left: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -56px;
    top: 5px;
    width: 14px;
    height: 14px;
    background-color: #ffffff;
    border-radius: 50%;
    border: 3px solid #0d0d0d;
    box-shadow: 0 0 0 2px #2a2a2a;
}

.timeline-year {
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.timeline-content h3 {
    font-size: 1.2rem;
    color: #e8e8e8;
    margin-bottom: 8px;
    font-weight: 500;
}

.timeline-content p {
    color: #888888;
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 300;
}

/* Testimonials Section */
.testimonials-section {
    padding: 80px 20px;
    background-color: #111111;
    border-top: 1px solid #222222;
}

.testimonials-section h2 {
    font-size: 2rem;
    margin-bottom: 50px;
    color: #ffffff;
    font-weight: 400;
    letter-spacing: 1px;
    text-align: center;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-card {
    background-color: #181818;
    padding: 35px;
    border-radius: 4px;
    border: 1px solid #222222;
    transition: all 0.3s ease;
    will-change: transform;
}

.testimonial-card:hover {
    background-color: #1d1d1d;
    border-color: #2a2a2a;
    transform: translateY(-3px);
}

.testimonial-stars {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.testimonial-text {
    color: #b8b8b8;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 15px;
    font-weight: 300;
    font-style: italic;
}

.testimonial-author {
    color: #666666;
    font-size: 0.85rem;
    font-weight: 400;
}

/* FAQ Section */
.faq-section {
    padding: 80px 20px;
    background-color: #0d0d0d;
    border-top: 1px solid #222222;
}

.faq-section h2 {
    font-size: 2rem;
    margin-bottom: 50px;
    color: #ffffff;
    font-weight: 400;
    letter-spacing: 1px;
    text-align: center;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 15px;
    background-color: #181818;
    border: 1px solid #222222;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #2a2a2a;
}

.faq-question {
    width: 100%;
    padding: 20px 25px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s ease;
}

.faq-question:hover {
    color: #cccccc;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    will-change: transform;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

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

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 25px 20px 25px;
}

.faq-answer p {
    color: #b8b8b8;
    font-size: 0.95rem;
    line-height: 1.7;
    font-weight: 300;
    margin: 0;
}

/* Press Section */
.press-section {
    padding: 80px 20px;
    background-color: #111111;
    border-top: 1px solid #222222;
}

.press-section h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #ffffff;
    font-weight: 400;
    letter-spacing: 1px;
    text-align: center;
}

.press-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
    margin-top: 50px;
}

.press-card {
    background-color: #181818;
    padding: 40px 35px;
    border-radius: 4px;
    border: 1px solid #222222;
    text-align: center;
    transition: all 0.3s ease;
    will-change: transform;
}

.press-card:hover {
    background-color: #1d1d1d;
    border-color: #2a2a2a;
    transform: translateY(-3px);
}

.press-card h3 {
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 15px;
    font-weight: 500;
}

.press-card p {
    color: #888888;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
    font-weight: 300;
}

/* Newsletter Section */
.newsletter-section {
    padding: 80px 20px;
    background-color: #0d0d0d;
    border-top: 1px solid #222222;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #ffffff;
    font-weight: 400;
    letter-spacing: 1px;
}

.newsletter-content > p {
    font-size: 1rem;
    color: #888888;
    margin-bottom: 30px;
    font-weight: 300;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.newsletter-input {
    flex: 1;
    padding: 14px 20px;
    background-color: #181818;
    border: 1px solid #2a2a2a;
    border-radius: 3px;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.newsletter-input:focus {
    outline: none;
    border-color: #444444;
    background-color: #1d1d1d;
}

.newsletter-input::placeholder {
    color: #666666;
}

.newsletter-privacy {
    font-size: 0.8rem;
    color: #666666;
    font-weight: 300;
}

/* Games Section */
.games {
    padding: 80px 20px;
    background-color: #111111;
}

.games h2 {
    font-size: 2rem;
    margin-bottom: 50px;
    color: #ffffff;
    font-weight: 400;
    letter-spacing: 1px;
    text-align: center;
}

/* Collab Games Section */
.collab-games {
    padding: 80px 20px;
    background-color: #0d0d0d;
    border-top: 1px solid #222222;
}

.collab-games h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #ffffff;
    font-weight: 400;
    letter-spacing: 1px;
    text-align: center;
}

/* Published Games Section */
.published-games {
    padding: 80px 20px;
    background-color: #111111;
    border-top: 1px solid #222222;
}

.published-games h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #ffffff;
    font-weight: 400;
    letter-spacing: 1px;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: #888888;
    font-size: 0.95rem;
    margin-bottom: 50px;
    font-weight: 300;
}

/* Game Card - Optimized */
.game-card {
    display: flex;
    background-color: #181818;
    margin-bottom: 30px;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s ease, background-color 0.2s ease;
    border: 1px solid #222222;
    will-change: transform;
}

.game-card:hover {
    transform: translateY(-2px);
    background-color: #1d1d1d;
    border-color: #2a2a2a;
}

.game-image {
    flex: 0 0 500px;
    height: 287px;
    overflow: hidden;
    background-color: #0d0d0d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    opacity: 0.9;
    will-change: transform;
}

.game-card:hover .game-image img {
    transform: scale(1.02);
    opacity: 1;
}

.game-info {
    flex: 1;
    padding: 35px;
    display: flex;
    flex-direction: column;
}

.game-info h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: #ffffff;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.collab-badge {
    display: inline-block;
    color: #888888;
    font-size: 0.85rem;
    margin-bottom: 15px;
    padding: 6px 12px;
    background-color: #1a1a1a;
    border-radius: 3px;
    border: 1px solid #2a2a2a;
    width: fit-content;
}

.game-description {
    flex: 1;
    margin-bottom: 20px;
    color: #b8b8b8;
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 300;
}

.game-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.genre {
    color: #aaaaaa;
    font-size: 0.85rem;
    padding: 6px 14px;
    background-color: #1a1a1a;
    border-radius: 3px;
    border: 1px solid #2a2a2a;
    font-weight: 400;
}

.status {
    color: #ffffff;
    font-size: 0.85rem;
    padding: 6px 14px;
    background-color: #2a2a2a;
    border-radius: 3px;
    font-weight: 400;
    border: 1px solid #3a3a3a;
}

.game-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Buttons - Optimized */
.btn {
    display: inline-block;
    padding: 11px 28px;
    text-decoration: none;
    border-radius: 3px;
    font-weight: 400;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    will-change: transform;
}

.btn-primary {
    background-color: #ffffff;
    color: #0d0d0d;
    border: 1px solid #ffffff;
}

.btn-primary:hover {
    background-color: #e8e8e8;
    border-color: #e8e8e8;
}

.btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid #444444;
}

.btn-secondary:hover {
    background-color: #1a1a1a;
    border-color: #666666;
}

/* Contact Section */
.contact {
    padding: 80px 20px;
    background-color: #0d0d0d;
    text-align: center;
    border-top: 1px solid #222222;
}

.contact h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #ffffff;
    font-weight: 400;
    letter-spacing: 1px;
}

.contact p {
    font-size: 1rem;
    margin-bottom: 35px;
    color: #888888;
    font-weight: 300;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #181818;
    color: #ffffff;
    text-decoration: none;
    border-radius: 3px;
    border: 1px solid #2a2a2a;
    transition: all 0.2s ease;
    font-weight: 400;
    font-size: 0.9rem;
}

.social-btn:hover {
    background-color: #1d1d1d;
    border-color: #3a3a3a;
}

/* Email Contact Section */
.email-contact {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid #222222;
}

.email-label {
    color: #888888;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 300;
}

.email-link {
    display: inline-block;
    color: #ffffff;
    font-size: 1.1rem;
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
    font-weight: 400;
}

.email-link:hover {
    color: #cccccc;
    border-bottom-color: #666666;
}

/* Footer */
footer {
    padding: 30px 20px;
    background-color: #0a0a0a;
    text-align: center;
    border-top: 1px solid #1a1a1a;
}

footer p {
    color: #666666;
    font-size: 0.85rem;
    font-weight: 300;
}

/* Fade-in Animations - Optimized */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Header animations */
.logo {
    animation: fadeInScale 1s ease;
}

.tagline {
    animation: fadeInUp 1s ease 0.3s both;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 0.95;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 0.8;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .game-card {
        flex-direction: column;
    }
    
    .game-image {
        flex: 0 0 auto;
        width: 100%;
        height: auto;
        aspect-ratio: 1232 / 706;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline {
        padding-left: 40px;
    }

    .timeline-item::before {
        left: -46px;
    }

    .newsletter-form {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        padding: 12px 20px;
    }

    .navbar-logo {
        height: 35px;
    }

    .navbar-links {
        gap: 15px;
    }

    .navbar-links a {
        font-size: 0.8rem;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .logo {
        max-width: 140px;
    }
    
    .tagline {
        font-size: 0.85rem;
        letter-spacing: 2px;
    }
    
    .about h1,
    .games h2,
    .collab-games h2,
    .contact h2,
    .stats-section h2,
    .timeline-section h2,
    .testimonials-section h2,
    .faq-section h2,
    .press-section h2,
    .newsletter-content h2 {
        font-size: 1.6rem;
    }
    
    .about {
        padding: 60px 20px;
    }
    
    .games,
    .collab-games,
    .stats-section,
    .timeline-section,
    .testimonials-section,
    .faq-section,
    .press-section,
    .newsletter-section {
        padding: 60px 20px;
    }
    
    .game-info {
        padding: 25px;
    }
    
    .game-info h3 {
        font-size: 1.4rem;
    }
    
    .game-image {
        flex: 0 0 auto;
        width: 100%;
        height: auto;
        aspect-ratio: 1232 / 706;
    }
    
    .social-links {
        flex-direction: column;
        align-items: center;
    }
    
    .social-btn {
        width: 100%;
        max-width: 300px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .press-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .navbar-links {
        display: none;
    }

    .navbar-logo {
        height: 30px;
    }

    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 42px;
        height: 42px;
    }

    .video-header {
        height: 70vh;
    }
    
    .logo {
        max-width: 120px;
    }
    
    .tagline {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }
    
    .game-image {
        flex: 0 0 auto;
        width: 100%;
        height: auto;
        aspect-ratio: 1232 / 706;
    }
    
    .game-info {
        padding: 20px;
    }
    
    .about p {
        font-size: 1rem;
    }
    
    .header-overlay {
        padding: 30px 20px;
    }

    .timeline {
        padding-left: 30px;
    }

    .timeline-item {
        padding-left: 20px;
    }

    .timeline-item::before {
        left: -38px;
        width: 12px;
        height: 12px;
    }

    .timeline-year {
        font-size: 1.2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .testimonial-card {
        padding: 25px;
    }

    .press-card {
        padding: 30px 25px;
    }
}
