/* Paper Soccer Index Styles - Matching Chess Style Exactly */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --dark-bg: #0f0f23;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('/images/paper_soccer-bg.svg') no-repeat center center fixed;
    background-size: cover;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
}

.game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.game-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

/* Header Bar (for Back button area) - kept for compatibility if used */
.game-header-bar {
    position: relative;
    padding: 20px 0;
    margin-bottom: 20px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-5px);
}

.game-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.game-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Mode Selection */
.mode-selection {
    margin-bottom: 20px;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.game-modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Card Styles matching Chess */
.game-card,
.mode-card {
    background: var(--card-bg);
    border-radius: 20px;
    border: 2px solid var(--border-color);
    padding: 40px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 0;
    /* Override any defaults */
}

.game-card:hover,
.mode-card:hover {
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.card-icon i {
    color: inherit;
    /* Ensure icon takes gradient if possible, or force white/color */
    /* Webkit text fill color handles gradient on text/icon */
}

.game-card h3,
.mode-card h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.card-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Buttons */
.primary-button {
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    background: var(--primary-gradient);
    color: white;
    width: 100%;
}

.primary-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* Difficulty Selector */
.difficulty-selector {
    margin: 20px 0;
    text-align: left;
}

.difficulty-selector label {
    display: block;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.difficulty-options {
    display: flex;
    gap: 5px;
    width: 100%;
}

.difficulty-option {
    flex: 1;
    padding: 8px 4px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    min-width: 0;
}

.difficulty-option:hover {
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.difficulty-option.active {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.2);
    color: var(--text-primary);
    font-weight: 600;
}

.difficulty-option i {
    font-size: 0.7rem;
}

.difficulty-option.active i {
    color: #667eea;
}


/* Rules */
.rules-section {
    background: var(--card-bg);
    border-radius: 20px;
    border: 2px solid var(--border-color);
    padding: 30px;
    backdrop-filter: blur(10px);
    margin-top: 40px;
}

.rules-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.rules-section ul {
    list-style: none;
    padding: 0;
}

.rules-section li {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-left: 30px;
    position: relative;
}

.rules-section li::before {
    content: '⚽';
    /* Soccer ball bullet */
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .game-modes {
        grid-template-columns: 1fr;
    }

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

    .difficulty-options {
        flex-direction: column;
    }

    .difficulty-option {
        width: 100%;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 10px;
    }

    .mode-card {
        padding: 25px;
    }

    .mode-icon,
    .card-icon {
        font-size: 3rem;
    }

    .back-button {
        width: 100%;
        justify-content: center;
    }
}