/* ========================================
   S9 Game - Global Styles
   Professional & Responsive Design
======================================== */

/* Root Variables */
:root {
    --primary-color: #ff4757;
    --secondary-color: #2f3542;
    --accent-color: #ffa502;
    --text-dark: #2f3542;
    --text-light: #747d8c;
    --bg-light: #f1f2f6;
    --bg-white: #ffffff;
    --success-color: #2ed573;
    --border-color: #dfe4ea;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

/* Header & Navigation */
header {
    background: linear-gradient(135deg, var(--primary-color), #e84118);
    color: var(--bg-white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bg-white);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--bg-white);
    border-radius: 2px;
    transition: var(--transition);
}

/* Navigation */
nav ul {
    display: flex;
    gap: 5px;
    align-items: center;
}

nav ul li a {
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    display: block;
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--bg-white);
    padding: 80px 20px;
    text-align: center;
    position: relative;
}

.hero-with-image {
    padding: 0;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: blur(8px);
    transform: scale(1.1);
}

.hero-overlay {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 60px 20px;
    width: 100%;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 25px;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

.hero-section h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-description {
    font-size: 1.15rem;
    margin-bottom: 35px;
    opacity: 0.95;
    line-height: 1.7;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-color);
    color: var(--text-dark);
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.download-btn:hover {
    background: #ff9500;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Section Styles */
section {
    padding: 60px 20px;
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 50px;
    font-size: 1.1rem;
}

/* App Details Grid */
.app-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.app-info-tile {
    background: var(--bg-white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
    border: 2px solid transparent;
}

.app-info-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.app-info-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.app-info-value {
    font-size: 1.2rem;
    color: var(--text-dark);
    font-weight: 700;
}

.app-info-tile.highlight .app-info-value {
    color: var(--primary-color);
}

/* Content Section */
.content-section {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
}

.content-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.content-section h3 {
    font-size: 1.4rem;
    margin: 30px 0 15px;
    color: var(--text-dark);
}

.content-section p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: var(--text-dark);
}

.content-section ul,
.content-section ol {
    margin: 15px 0 15px 25px;
    line-height: 1.8;
}

.content-section li {
    margin-bottom: 10px;
    list-style: disc;
    color: var(--text-dark);
}

.content-section ol li {
    list-style: decimal;
}

/* Images Gallery */
.images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 40px;
    color: var(--bg-white);
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: var(--bg-white);
    padding: 35px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* Installation Steps */
.installation-steps {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.installation-steps ol {
    list-style: none;
    counter-reset: step-counter;
}

.installation-steps li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 60px;
    margin-bottom: 25px;
    line-height: 1.8;
}

.installation-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: var(--primary-color);
    color: var(--bg-white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

/* FAQ Section */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-white);
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-question {
    padding: 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-dark);
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-toggle {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
}

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

.faq-answer-content {
    padding: 0 25px 25px;
    color: var(--text-light);
    line-height: 1.8;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* Contact Form */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    background: var(--primary-color);
    color: var(--bg-white);
    padding: 14px 40px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.submit-btn:hover {
    background: #e84118;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Footer */
footer {
    background: var(--secondary-color);
    color: var(--bg-white);
    padding: 50px 20px 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-section ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Guide Images */
.guide-image-container {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.guide-feature-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
    margin-top: 40px;
}

.game-item {
    background: var(--bg-white);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    min-height: 140px;
}

.game-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
}

.game-item img {
    width: 65px;
    height: 65px;
    object-fit: contain;
    margin-bottom: 15px;
}

.game-item span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.3;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

.mt-40 {
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        max-height: 0;
        overflow: hidden;
        transition: var(--transition);
    }

    nav.active {
        max-height: 500px;
    }

    nav ul {
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        padding: 15px;
    }

    .hero-with-image {
        min-height: 400px;
    }

    .hero-overlay {
        padding: 40px 20px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

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

    .images-gallery {
        grid-template-columns: 1fr;
    }

    .details-table td {
        padding: 15px;
        font-size: 0.95rem;
    }

    .details-table td:first-child {
        width: 50%;
    }

    .content-section {
        padding: 25px;
    }

    .contact-form {
        padding: 25px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .game-item img {
        width: 60px;
        height: 60px;
    }

    .app-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 50px 20px;
    }

    .hero-section h1 {
        font-size: 1.6rem;
    }

    .download-btn {
        padding: 14px 30px;
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .feature-card {
        padding: 25px;
    }

    .installation-steps {
        padding: 25px;
    }

    .installation-steps li {
        padding-left: 50px;
    }

    .games-grid {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 15px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 15px;
        grid-template-columns: unset;
    }

    .games-grid::-webkit-scrollbar {
        height: 6px;
    }

    .games-grid::-webkit-scrollbar-track {
        background: var(--bg-light);
        border-radius: 10px;
    }

    .games-grid::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 10px;
    }

    .game-item {
        flex: 0 0 auto;
        width: 110px;
        padding: 20px;
        min-height: 120px;
        scroll-snap-align: start;
    }

    .game-item img {
        width: 50px;
        height: 50px;
    }

    .game-item span {
        font-size: 0.85rem;
    }

    .images-gallery {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 15px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 15px;
        grid-template-columns: unset;
    }

    .images-gallery::-webkit-scrollbar {
        height: 6px;
    }

    .images-gallery::-webkit-scrollbar-track {
        background: var(--bg-light);
        border-radius: 10px;
    }

    .images-gallery::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 10px;
    }

    .gallery-item {
        flex: 0 0 auto;
        width: 280px;
        scroll-snap-align: start;
    }

    .gallery-item img {
        height: 250px;
    }

    .app-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .app-info-tile {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    header,
    footer,
    .download-btn,
    .contact-form {
        display: none;
    }
}
