/* ============================================================
   game.css — Game detail page styles
   Multi-Game Portal Website
   ============================================================ */

/* ------------------------------------------------------------
   Game Container (iframe wrapper)
   ------------------------------------------------------------ */
.game-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    text-align: center;
}

/* ------------------------------------------------------------
   Game Frame
   ------------------------------------------------------------ */
.game-frame {
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    background: #000;
    position: relative;
}

.game-frame iframe {
    width: 100%;
    height: 700px;
    border: none;
    display: block;
}

/* ------------------------------------------------------------
   Game Controls Bar
   ------------------------------------------------------------ */
.game-controls {
    padding: 0.8rem 1.2rem;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.game-controls-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.game-controls-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Fullscreen Button */
.fullscreen-btn {
    background: linear-gradient(90deg, #ff6b6b 0%, #ffa500 100%);
    color: #fff;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.fullscreen-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.45);
}

.fullscreen-btn:active {
    transform: translateY(0);
}

/* Loading overlay */
.game-loading {
    position: absolute;
    inset: 0;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 10;
    color: #fff;
    font-size: 0.95rem;
}

.game-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ff6b6b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ------------------------------------------------------------
   Game Info Section
   ------------------------------------------------------------ */
.game-info {
    padding: 3rem 2rem;
    background: #fff;
}

.game-info h1 {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.game-description {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: center;
}

/* ------------------------------------------------------------
   Game Tags Row
   ------------------------------------------------------------ */
.game-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.games-like-pill {
    background: linear-gradient(90deg, #ff6b6b, #ffa500);
    color: #fff !important;
    border: none;
}

.games-like-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(255, 107, 107, 0.4);
}

/* ------------------------------------------------------------
   Controls Section
   ------------------------------------------------------------ */
.controls-section {
    margin-bottom: 2rem;
}

.controls-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-left: 4px solid #ff6b6b;
    padding-left: 1rem;
    color: var(--text-dark);
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.8rem;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.control-item:hover {
    background: #eef0f3;
}

kbd {
    background: #333;
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'Segoe UI', Verdana, monospace;
    min-width: 80px;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 0 #111;
}

.control-desc {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.3;
}

.mobile-note {
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
    padding: 0.6rem 1rem;
    background: #fff8e1;
    border-radius: 6px;
    border-left: 3px solid #ffa500;
}

/* ------------------------------------------------------------
   Features Section
   ------------------------------------------------------------ */
.features-section {
    margin-bottom: 2rem;
}

.features-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-left: 4px solid #ff6b6b;
    padding-left: 1rem;
    color: var(--text-dark);
}

.features-list {
    columns: 2 auto;
    column-gap: 2rem;
    list-style: disc;
    padding-left: 1.5rem;
}

.features-list li {
    margin-bottom: 0.5rem;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    break-inside: avoid;
}

/* ------------------------------------------------------------
   FAQ Section
   ------------------------------------------------------------ */
.faq-section {
    margin-bottom: 2rem;
}

.faq-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-left: 4px solid #ff6b6b;
    padding-left: 1rem;
    color: var(--text-dark);
}

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

.faq-item {
    background: #fff;
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    border: 1px solid #eee;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.faq-question {
    padding: 1.2rem 1.5rem;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: background 0.3s ease;
    user-select: none;
}

.faq-question h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    margin: 0;
}

.toggle-icon {
    font-size: 1.3rem;
    color: #ff6b6b;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    font-style: normal;
    display: inline-block;
}

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

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

.faq-answer p,
.faq-answer ul {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.faq-answer ul {
    list-style: disc;
    padding-left: 1.5rem;
}

.faq-answer ul li {
    margin-bottom: 0.3rem;
}

/* Active state */
.faq-item.active .faq-answer {
    padding: 1.2rem 1.5rem;
    max-height: 500px;
}

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

.faq-item.active .faq-question {
    background: #fff0f0;
}

/* ------------------------------------------------------------
   Related Games Section
   ------------------------------------------------------------ */
.related-games {
    padding: 3rem 2rem;
    background: #f8f9fa;
}

/* ------------------------------------------------------------
   Responsive — 768px
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    .game-container {
        padding: 1rem;
    }

    .game-frame iframe {
        height: 400px;
    }

    .game-info {
        padding: 2rem 1rem;
    }

    .game-info h1 {
        font-size: 1.8rem;
    }

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

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

    .features-list {
        columns: 1;
    }

    .faq-question h3 {
        font-size: 1rem;
    }

    .related-games {
        padding: 2rem 1rem;
    }

    .game-controls {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ------------------------------------------------------------
   Responsive — 480px
   ------------------------------------------------------------ */
@media (max-width: 480px) {
    .game-frame iframe {
        height: 300px;
    }

    .game-frame {
        border-radius: 8px;
    }

    .game-info h1 {
        font-size: 1.4rem;
    }

    .game-description {
        font-size: 0.95rem;
    }

    .controls-section h2,
    .features-section h2,
    .faq-section h2 {
        font-size: 1.2rem;
    }

    kbd {
        min-width: 60px;
        font-size: 0.8rem;
    }

    .faq-question {
        padding: 1rem;
    }

    .faq-question h3 {
        font-size: 0.95rem;
    }

    .faq-item.active .faq-answer {
        padding: 1rem;
    }
}
