/* Higher or Lower Game Specific Styles */

/* Game Screens */
.game-screen {
    min-height: 60vh;
}

/* Start Panel */
.start-panel {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xxl);
    margin-bottom: var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.start-panel h3 {
    color: var(--gold);
    font-size: 1.5rem;
    text-transform: uppercase;
    margin-bottom: var(--spacing-xl);
}

/* Difficulty Cards */
.difficulty-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.difficulty-card {
    background: var(--dark-bg);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.difficulty-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: var(--glow-gold);
}

.difficulty-card.selected {
    border-color: var(--gold);
    background: linear-gradient(135deg, var(--deep-purple), var(--purple));
    box-shadow: var(--glow-gold);
}

.difficulty-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.difficulty-card h4 {
    color: var(--gold);
    font-size: 1.3rem;
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
}

.difficulty-desc {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
}

.difficulty-note {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
}

/* Match Type & Promotion Selection */
.match-type-selection,
.promotion-selection {
    margin-bottom: var(--spacing-xl);
}

.match-type-selection h4,
.promotion-selection h4 {
    color: var(--electric-blue);
    font-size: 1rem;
    text-transform: uppercase;
    margin-bottom: var(--spacing-md);
}

/* High Scores */
.high-scores {
    background: var(--card-bg);
    border: 2px solid var(--gold);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.high-scores h3 {
    color: var(--gold);
    font-size: 1.3rem;
    text-transform: uppercase;
    margin-bottom: var(--spacing-lg);
}

.scores-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.score-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.score-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.score-value {
    color: var(--electric-blue);
    font-size: 2.5rem;
    font-weight: 900;
    font-family: 'Courier New', monospace;
}

/* Score Header (during game) */
.score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.score-display,
.streak-display {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.score-label,
.streak-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 700;
}

.score-number,
.streak-number {
    color: var(--gold);
    font-size: 2rem;
    font-weight: 900;
    font-family: 'Courier New', monospace;
}

.streak-number {
    color: var(--danger);
}

.difficulty-badge {
    background: var(--purple);
    color: var(--gold);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    border: 2px solid var(--gold);
}

/* Wrestlers Container */
.wrestlers-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.wrestler-side {
    display: flex;
    justify-content: center;
}

/* Wrestler Card (Game Version) */
.wrestler-card-game {
    background: linear-gradient(135deg, var(--deep-purple), var(--dark-bg));
    border: 3px solid var(--gold);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg), var(--glow-gold);
    position: relative;
    transition: all 0.3s ease;
}

.wrestler-card-game.clickable {
    cursor: pointer;
}

.wrestler-card-game.clickable:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--electric-blue);
    box-shadow: var(--shadow-lg), 0 15px 50px rgba(0, 212, 255, 0.6);
}

.wrestler-card-game.clickable.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.wrestler-card-game.clickable.disabled:hover {
    transform: none;
    border-color: var(--gold);
    box-shadow: var(--shadow-lg), var(--glow-gold);
}

.wrestler-card-game.correct {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.3), var(--deep-purple));
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 200, 83, 0.8);
}

.wrestler-card-game.incorrect {
    border-color: var(--danger);
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.3), var(--deep-purple));
    box-shadow: var(--shadow-lg), 0 0 40px rgba(255, 23, 68, 0.8);
}

.card-header {
    position: absolute;
    top: var(--spacing-md);
    left: var(--spacing-md);
    background: var(--gold);
    color: var(--dark-bg);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2rem;
}

.wrestler-name {
    color: var(--gold);
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: var(--spacing-sm);
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wrestler-promotion {
    color: var(--electric-blue);
    font-size: 0.9rem;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-weight: 700;
}

/* Rating Display */
.rating-display {
    background: var(--dark-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-xl);
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.rating-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
}

.rating-value {
    color: var(--electric-blue);
    font-size: 3rem;
    font-weight: 900;
    font-family: 'Courier New', monospace;
}

.rating-display.hidden .rating-value {
    color: var(--text-secondary);
    font-size: 2.5rem;
}

.rating-display.revealed .rating-value {
    color: var(--electric-blue);
    animation: revealRating 0.5s ease-out;
}

@keyframes revealRating {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* VS Section */
.vs-section {
    text-align: center;
}

.vs-text {
    background: linear-gradient(135deg, var(--gold), var(--dark-gold));
    color: var(--dark-bg);
    font-size: 2.5rem;
    font-weight: 900;
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--glow-gold);
    margin-bottom: var(--spacing-md);
}

.vs-question {
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.vs-question strong {
    color: var(--gold);
    font-size: 1.3rem;
}

/* Primary Button Styling (Start Game, Play Again, etc) */
.primary-btn {
    background: linear-gradient(135deg, var(--gold), var(--dark-gold));
    color: var(--dark-bg);
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg) var(--spacing-xxl);
    font-size: 1.2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md), var(--glow-gold);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 10px 40px rgba(255, 215, 0, 0.6);
}

.primary-btn:active {
    transform: translateY(0);
}

/* Secondary Button Styling (Back to Menu, Quit, etc) */
.secondary-btn {
    background: var(--dark-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: var(--card-bg);
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.secondary-btn:active {
    transform: translateY(0);
}

/* Result Overlay */
.result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.result-content {
    text-align: center;
    padding: var(--spacing-xxl);
    background: linear-gradient(135deg, var(--deep-purple), var(--purple));
    border: 3px solid var(--gold);
    border-radius: var(--radius-lg);
    box-shadow: var(--glow-gold);
    max-width: 500px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.result-icon {
    font-size: 5rem;
    margin-bottom: var(--spacing-lg);
    animation: bounce 0.6s ease-in-out;
}

.result-icon.correct {
    color: var(--success);
}

.result-icon.incorrect {
    color: var(--danger);
}

.result-text {
    font-size: 2.5rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: var(--spacing-md);
}

.result-text.correct {
    color: var(--success);
}

.result-text.incorrect {
    color: var(--danger);
}

.result-detail {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: var(--spacing-xl);
}

/* Game Controls */
.game-controls {
    text-align: center;
    margin-top: var(--spacing-xl);
}

/* Game Over Panel */
.gameover-panel {
    background: var(--card-bg);
    border: 3px solid var(--danger);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xxl);
    text-align: center;
    box-shadow: 0 0 30px rgba(255, 23, 68, 0.5);
    max-width: 600px;
    margin: 0 auto;
}

.gameover-icon {
    font-size: 5rem;
    margin-bottom: var(--spacing-lg);
    animation: heartbreak 0.8s ease-in-out;
}

@keyframes heartbreak {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2) rotate(-10deg);
    }
    75% {
        transform: scale(0.9) rotate(10deg);
    }
}

.gameover-title {
    color: var(--danger);
    font-size: 2.5rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: var(--spacing-xl);
}

.final-stats {
    background: var(--dark-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.final-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border-color);
}

.final-stat:last-child {
    border-bottom: none;
}

.final-stat .stat-label {
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-transform: uppercase;
}

.final-stat .stat-value {
    color: var(--electric-blue);
    font-size: 2.5rem;
    font-weight: 900;
    font-family: 'Courier New', monospace;
}

.final-stat .stat-value.gold {
    color: var(--gold);
}

.new-record {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: linear-gradient(90deg, var(--gold), var(--dark-gold));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    }
}

.record-icon {
    font-size: 2rem;
}

.record-text {
    color: var(--dark-bg);
    font-size: 1.3rem;
    font-weight: 900;
    text-transform: uppercase;
}

.gameover-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* Responsive Design */
@media (max-width: 968px) {
    .wrestlers-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .vs-section {
        order: 2;
    }

    .wrestler-side.right-side {
        order: 3;
    }

    .vs-text {
        font-size: 2rem;
        padding: var(--spacing-md);
    }

    .scores-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .wrestler-name {
        font-size: 1.2rem;
        min-height: 2.5rem;
    }

    .rating-value {
        font-size: 2.5rem;
    }

    .choice-text {
        font-size: 1.1rem;
    }

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