/**
 * Enhanced Mode Selection Styles
 * Beautiful card-based interface for choosing game modes
 */

/* === MODE SELECTION CONTAINER === */
.mode-selection-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 15px;
    text-align: center;
}

.mode-selection-header {
    margin-bottom: 20px;
}

.mode-selection-header h2 {
    font-size: 1.8em;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.mode-selection-header p {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* === MODE CARDS LAYOUT === */
.mode-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px 0;
    justify-items: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

/* === INDIVIDUAL MODE CARD === */
.mode-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    max-width: 280px;
    width: 100%;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mode-card:hover::before {
    opacity: 1;
}

.mode-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

/* === SINGLE PLAYER CARD STYLING === */
.mode-card.single-player {
    border-color: rgba(76, 175, 80, 0.4);
    background: linear-gradient(145deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.05) 100%);
}

.mode-card.single-player:hover {
    border-color: rgba(76, 175, 80, 0.6);
    box-shadow: 0 16px 48px rgba(76, 175, 80, 0.2);
}

.mode-card.single-player .mode-button {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.mode-card.single-player .mode-button:hover {
    background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
}

/* === MULTIPLAYER CARD STYLING === */
.mode-card.multiplayer {
    border-color: rgba(255, 107, 107, 0.4);
    background: linear-gradient(145deg, rgba(255, 107, 107, 0.15) 0%, rgba(255, 107, 107, 0.05) 100%);
}

.mode-card.multiplayer:hover {
    border-color: rgba(255, 107, 107, 0.6);
    box-shadow: 0 16px 48px rgba(255, 107, 107, 0.2);
}

.mode-card.multiplayer .mode-button {
    background: linear-gradient(135deg, #FF6B6B 0%, #ee5a52 100%);
}

.mode-card.multiplayer .mode-button:hover {
    background: linear-gradient(135deg, #ee5a52 0%, #FF6B6B 100%);
}

/* === CARD CONTENT === */
.mode-icon {
    font-size: 2.8em;
    margin-bottom: 10px;
    display: block;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
}

.mode-title {
    font-size: 1.4em;
    font-weight: bold;
    color: white;
    margin-bottom: 4px;
}

.mode-subtitle {
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
    font-weight: 500;
}

.mode-description {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin-bottom: 15px;
    text-align: left;
}

/* === MODE FEATURES === */
.mode-features {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
    text-align: left;
    flex-grow: 1;
}

.feature {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.8);
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.feature:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(5px);
}

/* === MODE BUTTON === */
.mode-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.95em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    width: 100%;
    margin-top: 8px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    box-sizing: border-box;
}

.mode-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.3);
}

.mode-button:active {
    transform: translateY(0px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* === MODE SELECTION FOOTER === */
.mode-selection-footer {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.mode-selection-footer p {
    margin: 0;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
}

.mode-selection-footer strong {
    color: #FFD700;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .mode-selection-container {
        padding: 15px;
    }
    
    .mode-selection-header h2 {
        font-size: 1.8em;
    }
    
    .mode-selection-header p {
        font-size: 1em;
    }
    
    .mode-cards {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 20px 0;
    }
    
    .mode-card {
        padding: 25px;
        max-width: none;
    }
    
    .mode-icon {
        font-size: 3em;
        margin-bottom: 10px;
    }
    
    .mode-title {
        font-size: 1.5em;
    }
    
    .mode-subtitle {
        font-size: 1em;
    }
    
    .mode-description {
        font-size: 0.9em;
        margin-bottom: 15px;
    }
    
    .mode-features {
        margin-bottom: 20px;
    }
    
    .feature {
        font-size: 0.8em;
        padding: 5px 10px;
    }
    
    .mode-button {
        padding: 12px 25px;
        font-size: 1em;
    }
    
    .mode-selection-footer {
        margin-top: 20px;
        padding: 15px;
    }
    
    .mode-selection-footer p {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .mode-selection-container {
        padding: 10px;
    }
    
    .mode-selection-header h2 {
        font-size: 1.5em;
    }
    
    .mode-card {
        padding: 20px;
    }
    
    .mode-icon {
        font-size: 2.5em;
    }
    
    .mode-title {
        font-size: 1.3em;
    }
    
    .mode-description {
        font-size: 0.85em;
    }
    
    .feature {
        font-size: 0.75em;
    }
}

/* === ANIMATION ENHANCEMENTS === */
@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0px) scale(1);
    }
}

.mode-card {
    animation: cardAppear 0.6s ease-out;
}

.mode-card:nth-child(1) {
    animation-delay: 0.1s;
}

.mode-card:nth-child(2) {
    animation-delay: 0.2s;
}

/* === ACCESSIBILITY === */
.mode-card:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.mode-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 2px;
}

/* === HIGH CONTRAST MODE === */
@media (prefers-contrast: high) {
    .mode-card {
        border-width: 3px;
        background: rgba(0, 0, 0, 0.8);
    }
    
    .mode-title, .mode-subtitle, .mode-description, .feature {
        color: white;
    }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    .mode-card {
        transition: none;
        animation: none;
    }
    
    .mode-card:hover {
        transform: none;
    }
    
    .mode-button:hover {
        transform: none;
    }
    
    .feature:hover {
        transform: none;
    }
}
