/* Durak Index Page Styles */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
}

.durak-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.durak-header {
    padding: 20px;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.back-button {
    position: absolute;
    left: 20px;
    top: 20px;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.back-button:hover {
    opacity: 1;
}

.game-icon {
    font-size: 48px;
    margin-bottom: 10px;
    color: #e94560;
}

.durak-header h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
    background: linear-gradient(45deg, #e94560, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

/* Main */
.durak-main {
    flex: 1;
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.mode-selection h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

/* Mode Cards */
.mode-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.mode-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.mode-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(233, 69, 96, 0.2);
    border-color: rgba(233, 69, 96, 0.3);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.card-icon i {
    font-size: 24px;
    color: white;
}

.mode-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.card-description {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Selectors */
.players-selector,
.difficulty-selector {
    margin-bottom: 16px;
}

.players-selector label,
.difficulty-selector label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.players-select,
.difficulty-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

.players-select:focus,
.difficulty-select:focus {
    outline: none;
    border-color: #e94560;
}

.players-select option,
.difficulty-select option {
    background: #1a1a2e;
    color: #fff;
}

/* Primary Button */
.primary-button {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

.primary-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Game Rules */
.game-rules {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
}

.game-rules h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: #e94560;
}

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

.game-rules li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.5;
}

.game-rules li::before {
    content: '♦';
    position: absolute;
    left: 0;
    color: #e94560;
}

/* Join Card */
.join-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    margin: 40px auto;
}

.join-icon {
    font-size: 64px;
    color: #e94560;
    margin-bottom: 20px;
}

.join-card h2 {
    margin-bottom: 16px;
}

.room-info {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
}

.join-button {
    width: auto;
    padding: 16px 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .back-button {
        position: relative;
        left: 0;
        top: 0;
        margin-bottom: 20px;
        justify-content: center;
    }

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

    .game-icon {
        font-size: 36px;
    }

    .mode-cards {
        grid-template-columns: 1fr;
    }

    .mode-card {
        padding: 24px;
    }

    .durak-main {
        padding: 20px 16px;
    }
}

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

    .subtitle {
        font-size: 0.95rem;
    }

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

    .mode-card {
        padding: 20px;
    }

    .card-icon {
        font-size: 32px;
    }

    .mode-card h3 {
        font-size: 1.2rem;
    }

    .game-rules {
        padding: 16px;
    }

    .game-rules li {
        font-size: 0.9rem;
    }
}