/* Gomoku Index Styles */

: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/gomoku-bg.svg') no-repeat center center fixed;
    background-size: cover;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
}

.gomoku-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;
}

.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);
    margin-bottom: 20px;
    margin-top: 20px;
}

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

.game-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Main Content */
.game-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.game-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;
}

.game-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;
}

.game-card h2 {
    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;
}

.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;
    gap: 10px;
    border: none;
    background: var(--primary-gradient);
    color: white;
}

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

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

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

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

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

.game-rules li::before {
    content: '⚫';
    position: absolute;
    left: 0;
    color: #667eea;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .gomoku-container {
        padding: 15px;
    }

    .game-header h1 {
        font-size: 2rem;
    }

    .back-button {
        position: static;
        transform: none;
        margin-bottom: 20px;
    }

    .game-card {
        padding: 25px;
    }

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

    .game-card h2 {
        font-size: 1.5rem;
    }

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

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

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

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

.mode-card {
    margin: 0;
}

.mode-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

/* Selectors */
.selector-group {
    margin: 20px 0;
    text-align: left;
}

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

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

.selector-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;
}

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

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

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

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

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

    .mode-selection h2 {
        font-size: 1.5rem;
    }
}

/* Join Page Styles */
.join-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    padding: 20px;
}

.join-card {
    background: var(--card-bg);
    border-radius: 20px;
    border: 2px solid var(--border-color);
    padding: 40px;
    text-align: center;
    backdrop-filter: blur(10px);
    max-width: 400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.join-icon {
    font-size: 4rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0;
}

.join-card h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}

.join-description {
    width: 100%;
}

.hello {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.player-name-btn {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #4facfe;
    padding: 8px 20px;
    border-radius: 15px;
    cursor: pointer;
    display: inline-block;
    font-size: 1rem;
    transition: all 0.2s;
}

.player-name-btn:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: #4facfe;
}

.room-info {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 15px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-color);
}

.room-label {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.room-id {
    font-size: 1.8rem;
    font-weight: bold;
    color: #f1c40f;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.join-game {
    width: 100%;
    padding: 15px;
    border-radius: 30px;
    border: none;
    background: var(--primary-gradient);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.join-game:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

@media (max-width: 480px) {
    .game-header h1 {
        font-size: 1.8rem;
    }

    .join-card {
        padding: 25px;
    }

    .join-icon {
        font-size: 3rem;
    }

    .room-id {
        font-size: 1.5rem;
    }

    .back-button {
        margin-top: 20px;
    }
}