/* How to Play Page Styles */

/* Page Header */
.page-header {
    padding: 8rem 0 3rem;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    text-align: center;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content */
.howtoplay-content {
    padding: 3rem 0 6rem;
}

/* Table of Contents */
.toc {
    background: var(--bg-secondary);
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
}

.toc h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.toc ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
}

.toc a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.toc a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Guide Sections */
.guide-section {
    margin-bottom: 4rem;
    scroll-margin-top: 6rem;
}

.guide-section > h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.section-intro {
    margin-bottom: 2rem;
}

.section-intro p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 900px;
}

/* Example Cards */
.example-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
}

.example-card:hover {
    box-shadow: var(--shadow-lg);
}

.example-card.reverse {
    grid-template-columns: 1fr 300px;
}

.example-card.reverse .example-image {
    order: 2;
}

.example-card.reverse .example-text {
    order: 1;
}

.example-image img {
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
}

.example-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.example-text p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.example-text strong {
    color: var(--text-primary);
}

/* Controls Grid */
.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.control-item {
    background: var(--bg-secondary);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.control-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.control-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.control-item h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.control-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Game Modes */
.modes-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.mode-card {
    background: var(--bg-secondary);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.mode-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.mode-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.mode-icon {
    font-size: 2rem;
}

.mode-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mode-card > p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.mode-features {
    list-style: none;
    font-size: 0.9rem;
}

.mode-features li {
    padding: 0.25rem 0;
    color: var(--text-secondary);
}

/* Settings Categories */
.settings-categories {
    display: grid;
    gap: 1.5rem;
}

.settings-category {
    background: var(--bg-secondary);
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    border: 1px solid var(--border-color);
}

.settings-category h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.settings-category ul {
    list-style: none;
}

.settings-category li {
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.settings-category li strong {
    color: var(--text-primary);
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 1.5rem;
    margin-top: 4rem;
}

.cta-section h2 {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.75rem;
}

.cta-section p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.cta-section .btn-primary {
    background: white;
    color: var(--primary-dark);
}

.cta-section .btn-primary:hover {
    background: var(--bg-secondary);
}

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background: var(--border-color);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
}

.lang-dropdown.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.lang-dropdown a:first-child {
    border-radius: 0.75rem 0.75rem 0 0;
}

.lang-dropdown a:last-child {
    border-radius: 0 0 0.75rem 0.75rem;
}

.lang-dropdown a:hover {
    background: var(--bg-secondary);
}

.lang-dropdown a.active {
    background: var(--primary-color);
    color: white;
}

/* Responsive Design */
@media (max-width: 968px) {
    .page-title {
        font-size: 2.5rem;
    }

    .example-card,
    .example-card.reverse {
        grid-template-columns: 1fr;
    }

    .example-card.reverse .example-image,
    .example-card.reverse .example-text {
        order: unset;
    }

    .example-image {
        max-width: 350px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 7rem 0 2rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .toc ul {
        flex-direction: column;
        gap: 0.75rem;
    }

    .guide-section > h2 {
        font-size: 1.5rem;
    }

    .example-card {
        padding: 1.5rem;
    }

    .example-text h3 {
        font-size: 1.25rem;
    }

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

    .cta-section {
        padding: 3rem 1.5rem;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }
}
