/* 
   ENHANCED: Custom CSS for Game/Quiz pages with modern design
   Matches the overall website theme with purple gradients and modern styling
*/

/* Game Hero Section - matches home page hero */
.game-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.game-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
    animation: float 20s infinite linear;
}

@keyframes float {
    from { transform: translateY(0); }
    to { transform: translateY(-100px); }
}

.game-hero-content {
    position: relative;
    z-index: 1;
}

.game-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.game-hero p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Main Game Card */
.game-card {
    background: white;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: none;
    overflow: hidden;
}

.game-card .card-body {
    padding: 2rem;
}

/* Game Header with Stats */
.game-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.game-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

/* Score Badges */
.game-badge {
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    min-width: fit-content;
}

.game-badge-score {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.game-badge-question {
    background: linear-gradient(135deg, #34A853 0%, #16a085 100%);
    color: white;
}

.game-badge-timer {
    background: linear-gradient(135deg, #FF6D00 0%, #F57C00 100%);
    color: white;
    min-width: 90px;
}

/* Scoreboard Section */
.scoreboard-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.scoreboard-section h6 {
    font-weight: 700;
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scoreboard-section h6::before {
    content: '👥';
}

#scoreboard li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#scoreboard li:last-child {
    border-bottom: none;
}

/* Question Card */
.question-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

#questionText {
    font-size: 1.35rem;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

/* Answer Options */
#options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#options .list-group-item {
    border-radius: 12px !important;
    border: 2px solid #e9ecef;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fff;
}

#options .list-group-item:hover:not(.disabled) {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

#options .list-group-item.list-group-item-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #28a745;
    color: #155724;
}

#options .list-group-item.list-group-item-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #dc3545;
    color: #721c24;
}

#options .list-group-item.disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Points Display */
#pointsText {
    font-weight: 600;
    color: #667eea;
    font-size: 0.95rem;
}

/* Progress Bar */
.game-progress {
    height: 10px;
    border-radius: 5px;
    background: #e9ecef;
    overflow: hidden;
    margin-top: 1.5rem;
}

.game-progress .progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
    transition: width 0.5s ease;
}

/* Timer Section */
.timer-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
}

.timer-section .timer-icon {
    font-size: 1.25rem;
    color: #FF6D00;
}

#timer {
    font-weight: 700;
    font-size: 1.5rem;
    color: #FF6D00;
}

/* Timer inside badge should be white */
.game-badge-timer #timer {
    color: white;
    font-size: inherit;
    font-weight: inherit;
}

.timer-section.warning #timer {
    color: #dc3545;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Game Buttons */
.game-btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
        letter-spacing: 0.5px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
}

.game-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.game-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.game-btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
    color: white;
}

.game-btn-success {
    background: linear-gradient(135deg, #34A853 0%, #16a085 100%);
    border: none;
    color: white;
}

.game-btn-success:hover {
    background: linear-gradient(135deg, #2d9148 0%, #138a72 100%);
    color: white;
}

/* Game Over Screen */
.game-over {
    text-align: center;
    padding: 3rem 2rem;
}

.game-over h4 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.game-over .final-score {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 1rem 0;
}

.game-over p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Welcome Message in Quiz */
.welcome-message-quiz {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.welcome-message-quiz h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.75rem;
}

.welcome-message-quiz p {
    color: #555;
    font-size: 1rem;
    margin: 0;
}

/* Hint Text */
.game-hint {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 1.5rem;
}

/* Multiplayer Page Styles */
.multiplayer-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: none;
    overflow: hidden;
}

.multiplayer-card .card-body {
    padding: 3rem 2rem;
}

.multiplayer-card h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.multiplayer-card .text-muted {
    font-size: 1.05rem;
}

/* Multiplayer Buttons */
.multiplayer-btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
}

.multiplayer-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.multiplayer-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.multiplayer-btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
    color: white;
}

/* Connection Status Badge */
#connectionStatus {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 50px;
}

/* Game Code Display */
.game-code-display {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.game-code-display .display-6 {
    font-family: 'Courier New', monospace;
    letter-spacing: 5px;
    color: #667eea;
}

/* Player List in Lobby */
#playerList {
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
}

#playerList li {
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Input Fields */
.game-input {
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    border: 2px solid #e9ecef;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.game-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-hero h1 {
        font-size: 1.75rem;
    }
    
    .game-card .card-body {
        padding: 1.25rem;
    }
    
    #questionText {
        font-size: 1.15rem;
    }
    
    .game-over .final-score {
        font-size: 3rem;
    }
    
    .multiplayer-card .card-body {
        padding: 2rem 1.5rem;
    }
}
