body {
    background-color: var(--bs-dark);
    color: var(--bs-light);
}

/* Car preview in the customize panel */
.car-preview {
    width: 80px;
    height: 120px;
    margin: 10px auto;
    background-color: #222;
    border-radius: 5px;
    padding: 5px;
    border: 1px solid #444;
}

#gameCanvas {
    background-color: #000;
    border: 2px solid var(--bs-secondary);
    width: 100%;
    height: auto;
}

/* Make leaderboard rows clickable in both game over and pause screens */
#gameOverHighScoresList tr, 
#pauseHighScoresList tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#gameOverHighScoresList tr:hover, 
#pauseHighScoresList tr:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.game-stats {
    font-size: 1.5rem;
    color: var(--bs-light);
}

/* Dynamic Game Dashboard */
.dashboard-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
    max-width: 600px;
}

.stat-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.score-container {
    background-color: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.5);
}

.level-container {
    background-color: rgba(13, 202, 240, 0.2);
    border: 1px solid rgba(13, 202, 240, 0.5);
}

.lives-container {
    background-color: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.5);
}

.stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-svg {
    width: 100%;
    height: 100%;
}

.trophy {
    color: var(--bs-warning);
}

.star-path {
    fill: var(--bs-warning);
}

.level-up {
    color: var(--bs-info);
}

.heart {
    color: var(--bs-danger);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Animation for score increase */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.score-pulse {
    animation: pulse 0.3s ease-in-out;
}

/* Animation for level up */
@keyframes levelUp {
    0% { transform: translateY(0); }
    25% { transform: translateY(-10px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

.level-bump {
    animation: levelUp 0.5s ease-in-out;
}

/* Animation for lives change */
@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

.life-change {
    animation: heartBeat 0.8s ease-in-out;
}

/* Last life warning animation */
@keyframes lastLifeWarning {
    0% { 
        transform: scale(1); 
        box-shadow: 0 0 5px rgba(220, 53, 69, 0.7);
        background-color: rgba(220, 53, 69, 0.2);
    }
    25% { 
        transform: scale(1.15); 
        box-shadow: 0 0 15px rgba(220, 53, 69, 0.9);
        background-color: rgba(220, 53, 69, 0.6);
    }
    50% { 
        transform: scale(1); 
        box-shadow: 0 0 5px rgba(220, 53, 69, 0.7);
        background-color: rgba(220, 53, 69, 0.2);
    }
    75% { 
        transform: scale(1.15); 
        box-shadow: 0 0 15px rgba(220, 53, 69, 0.9);
        background-color: rgba(220, 53, 69, 0.6);
    }
    100% { 
        transform: scale(1); 
        box-shadow: 0 0 5px rgba(220, 53, 69, 0.7);
        background-color: rgba(220, 53, 69, 0.2);
    }
}

.last-life-warning {
    animation: lastLifeWarning 1.5s ease-in-out infinite;
    border: 1px solid rgba(220, 53, 69, 0.9) !important;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .dashboard-container {
        gap: 0.75rem;
        padding: 0.5rem;
    }
    
    .stat-container {
        padding: 0.3rem 0.6rem;
    }
    
    .stat-icon {
        width: 2rem;
        height: 2rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
}

.game-over {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bs-dark);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    color: #fff;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    border: 2px solid var(--bs-primary);
    z-index: 1000; /* Ensure it's above pause button */
}

.game-key {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #000000;
    border-radius: 5px;
    border: 1px solid var(--bs-secondary);
    z-index: 40; /* Lowered to be below pause button and other modals */
    transition: all 0.3s ease;
    max-width: 350px; /* Increased from 300px to 350px to show more text */
    overflow: hidden;
}

.key-toggle {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid var(--bs-secondary);
    transition: background-color 0.3s ease;
}

.key-toggle:hover {
    background-color: var(--bs-dark);
}

.key-toggle i {
    margin-right: 8px;
    font-size: 16px;
    color: var(--bs-light);
}

.key-label {
    color: var(--bs-light);
    font-size: 14px;
    font-weight: bold;
}

.key-content {
    padding: 15px; /* Increased from 10px to 15px for more space */
    max-height: 400px; /* Increased from 300px to 400px for more content visible */
    overflow-y: auto;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

/* Collapsed state */
.game-key.collapsed .key-content {
    max-height: 0;
    padding: 0 10px;
    opacity: 0;
    overflow: hidden;
}

.game-key.collapsed {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.game-key:not(.collapsed) {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.key-item {
    display: flex;
    align-items: center;
    margin: 8px 0; /* Increased from 5px to 8px for more vertical space */
    padding: 8px 0; /* Increased from 6px to 8px for more vertical space */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: normal; /* Changed from nowrap to normal to allow text wrapping */
}

.key-item:last-child {
    border-bottom: none;
}

.key-item img {
    margin-right: 12px; /* Increased from 10px to 12px for more spacing */
    flex-shrink: 0; /* Prevent images from shrinking */
}

.key-item span {
    color: var(--bs-light);
    font-size: 13px;
    line-height: 1.4; /* Increased from 1.3 to 1.4 for better text spacing */
    font-weight: 400; /* Added slightly bolder text for better readability */
}

.parking-space-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    position: relative;
    background: transparent;
}

.parking-space-icon:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #ffff00;
}

.parking-space-icon::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ffff00;
    left: 0;
}

.parking-space-icon > div {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 2px;
    background: #ffff00;
}

/* Trivia modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000; /* Higher z-index to ensure it's above all game elements */
    display: flex;
    /* Default modals are centered for trivia, etc. */
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

/* Override for the pause and game over modals - align to top instead of center */
#pauseModal.modal-overlay,
#gameOver {
    align-items: flex-start;
    padding-top: 50px;
    padding-bottom: 50px;
}

.trivia-modal {
    background-color: var(--bs-dark);
    padding: 2rem;
    border-radius: 10px;
    border: 2px solid var(--bs-primary);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

#textAFriendBtn {
    margin-top: 10px;
    padding: 8px 15px;
    background-color: var(--bs-secondary);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(100, 100, 255, 0.3);
}

#textAFriendBtn:hover {
    background-color: var(--bs-info);
    transform: scale(1.05);
}

/* Pulse animations for trivia feedback */
.correct-pulse {
    animation: correctPulse 0.5s ease;
}

.incorrect-pulse {
    animation: incorrectPulse 0.5s ease;
}

@keyframes correctPulse {
    0% { box-shadow: 0 0 20px rgba(255, 255, 0, 0.7); }
    50% { box-shadow: 0 0 40px rgba(0, 255, 0, 0.9); border-color: #00ff00; transform: scale(1.05); }
    100% { box-shadow: 0 0 20px rgba(255, 255, 0, 0.7); }
}

@keyframes incorrectPulse {
    0% { box-shadow: 0 0 20px rgba(255, 255, 0, 0.7); }
    50% { box-shadow: 0 0 40px rgba(255, 0, 0, 0.9); border-color: #ff0000; transform: scale(1.05); }
    100% { box-shadow: 0 0 20px rgba(255, 255, 0, 0.7); }
}

.pause-modal {
    background-color: var(--bs-dark);
    padding: 2rem;
    border-radius: 10px;
    border: 2px solid var(--bs-primary);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.trivia-option {
    display: block;
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid var(--bs-secondary);
    border-radius: 5px;
    background-color: var(--bs-dark);
    color: var(--bs-light);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.trivia-option:hover {
    background-color: var(--bs-secondary);
}

.trivia-option.correct {
    background-color: var(--bs-success);
    color: var(--bs-light);
}

.trivia-option.incorrect {
    background-color: var(--bs-danger);
    color: var(--bs-light);
}

#triviaResult {
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
}

#triviaResult.correct {
    background-color: var(--bs-success);
    color: var(--bs-light);
}

#triviaResult.incorrect {
    background-color: var(--bs-danger);
    color: var(--bs-light);
}

/* Continue button styling */
#continueButton {
    display: block;
    margin: 20px auto 0;
    padding: 8px 20px;
    background-color: var(--bs-secondary);
    color: var(--bs-light);
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Session scores panel styles */
.card-header h4 {
    margin-bottom: 0;
    font-size: 1.25rem;
}

#sessionScoresList tr:last-child {
    font-weight: bold;
    background-color: rgba(255, 255, 0, 0.1);
}

.session-scores {
    margin-top: 15px;
}

.session-scores table {
    width: 100%;
}

.session-scores th {
    text-align: center;
    padding: 8px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.session-scores td {
    text-align: center;
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.score-row, .high-score-row {
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.score-row:hover, .high-score-row:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.score-row:active, .high-score-row:active {
    transform: translateY(0);
    box-shadow: none;
}

.score-row::after, .high-score-row::after {
    content: "👁️";
    position: absolute;
    right: 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.score-row:hover::after, .high-score-row:hover::after {
    opacity: 0.7;
}

/* Game stats modal styling */
#gameStatsModal .modal-content {
    border: none;
    border-radius: 10px;
    background-color: var(--bs-dark);
}

#gameStatsModal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#gameStatsModal .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#gameStatsContent {
    font-size: 16px;
}

#gameStatsContent h4 {
    margin-bottom: 20px;
    text-align: center;
    color: #ffc107;
}

#gameStatsContent .row {
    padding: 6px 0;
}

#gameStatsContent .row:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

.text-end {
    font-weight: bold;
    color: #ffc107;
}

/* Share button styling */
#shareStatsButton {
    padding: 10px 20px;
    background-color: #0d6efd;
    border: none;
    border-radius: 5px;
    color: #fff;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

#shareStatsButton:hover {
    background-color: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#shareStatsButton:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#shareStatsButton i,
#playAgainButton i,
#viewStatsButton i {
    margin-right: 8px;
    font-size: 1.2em;
}

/* Game over buttons styling */
#viewStatsButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#viewStatsButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#viewStatsButton:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Pause button styling */
#pauseButton {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--bs-primary);
    color: var(--bs-light);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 50; /* Lowered to ensure modals appear above */
    transition: all 0.3s ease;
}

#pauseButton:hover {
    transform: scale(1.1);
    background-color: var(--bs-primary);
}

#pauseButton:active {
    transform: scale(0.95);
}

/* Car Customization Styles */
.color-picker {
    margin: 0 auto;
    max-width: 200px;
}

#carPreview {
    background-color: #333;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#carColorPicker {
    width: 100%;
    height: 40px;
    padding: 5px;
    border-radius: 5px;
    cursor: pointer;
}

#applyCarColorButton {
    transition: all 0.3s ease;
}

#applyCarColorButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#applyCarColorButton:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Emoji selector styling */
.emoji-picker {
    padding: 5px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.emoji-btn {
    width: 42px;
    height: 42px;
    font-size: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.emoji-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
    border-color: var(--bs-warning);
}

.emoji-btn.active {
    background-color: rgba(255, 255, 0, 0.2);
    border-color: var(--bs-warning);
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.3);
}

.emoji-btn:active {
    transform: scale(0.95);
}

/* Emoji Category Styling */
.emoji-category {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 15px;
}

.emoji-category-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--bs-warning);
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

/* Streak bonus message - moved to bottom of screen */
.streak-bonus-message {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 128, 0, 0.9);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 22px;
    font-weight: bold;
    z-index: 1000;
    animation: fadeInOut 2.5s forwards;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Inactivity warning message */
.inactivity-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(220, 53, 69, 0.9); /* Bootstrap danger color with opacity */
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 24px;
    font-weight: bold;
    z-index: 2000;
    text-align: center;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    animation: pulseWarning 1s infinite alternate;
    max-width: 90%;
}

@keyframes pulseWarning {
    from { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 20px rgba(255, 255, 255, 0.4); }
    to { transform: translate(-50%, -50%) scale(1.05); box-shadow: 0 0 30px rgba(255, 255, 255, 0.6); }
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) scale(0.8); bottom: 30px; }
    20% { opacity: 1; transform: translateX(-50%) scale(1.1); bottom: 50px; }
    30% { transform: translateX(-50%) scale(1); bottom: 50px; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* Introduction Modal Styles */
.intro-modal {
    background-color: var(--bs-dark);
    padding: 2rem;
    border-radius: 10px;
    border: 2px solid var(--bs-primary);
    width: 90%;
    max-width: 700px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.intro-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.intro-progress {
    margin-top: 15px;
}

.intro-progress .progress {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
}

.intro-progress .progress-bar {
    background-color: var(--bs-primary);
    transition: width 0.3s ease-in-out;
}

.intro-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 10px;
    margin-bottom: 1.5rem;
}

.intro-step {
    animation: fadeInStep 0.5s ease-in-out;
}

.intro-step-content {
    padding: 10px 0;
}

.intro-step-content h4 {
    margin-bottom: 15px;
    color: var(--bs-warning);
    text-align: center;
}

.intro-footer {
    display: flex;
    justify-content: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.intro-footer .btn-group {
    display: flex;
    gap: 10px;
}

.intro-image {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.parking-space-example {
    position: relative;
    width: 180px;
    height: 180px;
    background-color: #000;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.example-space {
    position: absolute;
    top: 0;
    width: 33.33%;
    height: 90px;
    background-color: #000;
    border-left: 2px solid #ffff00;
    border-right: 2px solid #ffff00;
    z-index: 5;
}

.example-spaces-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 90px;
    background-color: #333;
    z-index: 4;
}

.example-space-1 {
    left: 0;
}

.example-space-2 {
    left: 33.33%;
}

.example-space-3 {
    left: 66.66%;
}

.space-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    z-index: 6;
}

.space-item.lightning {
    width: 26px;  /* Increased by 30% from 20px */
    height: 46px; /* Increased by 30% from 35px */
    background-image: url('/static/images/lightning.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.space-item.question {
    width: 25px;
    height: 25px;
    background-image: url('/static/images/question.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.space-item.parked-car {
    width: 30px;
    height: 45px;
    background-image: url('/static/images/parked_car.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.example-road {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background-color: #333;
}

.example-road:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: repeating-linear-gradient(to right, #fff, #fff 10px, transparent 10px, transparent 20px);
}

.example-car {
    position: absolute;
    width: 70px;
    height: 110px;
    border-radius: 10px;
    z-index: 10;
    /* Using SVG car representation instead of simple rectangle */
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.car-initial {
    bottom: 30px;
    left: 70px;
    width: 40px;
    height: 60px;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='120' viewBox='0 0 80 120' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='0' width='80' height='120' rx='12' fill='%23ffff00'/%3E%3Crect x='10' y='10' width='60' height='20' rx='5' fill='%23333333'/%3E%3Crect x='10' y='90' width='15' height='15' rx='3' fill='%23333333'/%3E%3Crect x='55' y='90' width='15' height='15' rx='3' fill='%23333333'/%3E%3Crect x='10' y='40' width='10' height='5' rx='2' fill='%23ffcc00'/%3E%3Crect x='60' y='40' width='10' height='5' rx='2' fill='%23ffcc00'/%3E%3Crect x='30' y='45' width='20' height='5' rx='2' fill='%23333333'/%3E%3C/svg%3E");
}

.car-success {
    top: 15px;
    left: 70px;
    width: 40px;
    height: 60px;
    opacity: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='120' viewBox='0 0 80 120' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='0' width='80' height='120' rx='12' fill='%2300ff4c'/%3E%3Crect x='10' y='10' width='60' height='20' rx='5' fill='%23333333'/%3E%3Crect x='10' y='90' width='15' height='15' rx='3' fill='%23333333'/%3E%3Crect x='55' y='90' width='15' height='15' rx='3' fill='%23333333'/%3E%3Crect x='10' y='40' width='10' height='5' rx='2' fill='%23ffcc00'/%3E%3Crect x='60' y='40' width='10' height='5' rx='2' fill='%23ffcc00'/%3E%3Crect x='30' y='45' width='20' height='5' rx='2' fill='%23333333'/%3E%3C/svg%3E");
}

.btn-close-tutorial {
    position: absolute;
    top: 10px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffff00;
    font-size: 22px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.btn-close-tutorial:hover {
    background-color: rgba(50, 50, 50, 0.8);
    border-color: #ffff00;
    transform: scale(1.1);
}

/* Animation classes */
@keyframes parkCar {
    0% { transform: translateY(0); }
    100% { transform: translateY(-80px); }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.parking-animation-running .car-initial {
    animation: parkCar 1.2s ease-in-out forwards, fadeOut 0.3s 1.2s forwards;
}

.parking-animation-running .car-success {
    animation: fadeIn 0.3s 1.5s forwards;
}

.btn-replay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    font-size: 14px;
    padding: 0;
    transition: all 0.2s ease;
}

.btn-replay:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.intro-special-spaces {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.special-space-item {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: 5px;
}

.special-space-item img {
    margin-right: 12px;
}

.help-link {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 10px;
    margin-top: 10px;
}

.help-link i {
    color: var(--bs-info);
    margin-right: 10px;
}

.help-link a {
    color: var(--bs-info);
    text-decoration: none;
    transition: color 0.2s ease;
}

.help-link a:hover {
    color: var(--bs-light);
    text-decoration: underline;
}

/* Global Rank Info Styling */
#globalRankInfo {
    width: 100%;
    max-width: 400px;
}

#globalRankInfo .card-body {
    font-size: 0.95rem;
}

#globalRankInfo .card-header {
    font-weight: bold;
}

#scorePercentile, #globalRank, #globalAverage {
    font-weight: bold;
    color: var(--bs-warning);
}

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

@media (max-width: 767px) {
    /* Mobile responsive styles */
    .card {
        margin-top: 1.5rem;
    }
    
    #pauseButton {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .streak-bonus-message {
        font-size: 16px;
        padding: 8px 16px;
        bottom: 30px;
    }
    
    .intro-modal {
        padding: 1rem;
        width: 95%;
    }
    
    .intro-step-content h4 {
        font-size: 1.2rem;
    }
    
    .intro-step-content p {
        font-size: 0.9rem;
    }
    
    .special-space-item {
        padding: 6px 8px;
        font-size: 0.9rem;
    }
}
