/* css/style.css */

/* ============= CSS Variables ============= */
:root {
    --bg: #f8fafc;
    --ink: #1e293b;
    --card: #ffffff;
    --accent: #0ea5e9;
    --btn: #e2e8f0;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --purple: #8b5cf6;
    --stat-color-fitness: #10b981;
    --stat-color-speed: #fbbf24;
    --stat-color-fullness: #10b981;
    --stat-color-health: #10b981;	
}

/* ============= Base Styles ============= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: var(--ink);
    height: 100vh;
    overflow: hidden;
}

/* ============= Loading Screen ============= */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-bunny {
    font-size: 80px;
    animation: bounce 1s infinite;
}

.loading-text {
    margin-top: 20px;
    font-size: 18px;
    color: var(--accent);
}

/* ============= Main Container ============= */
.game-container {
    display: flex;
    height: 100vh;
    position: relative;
}

/* ============= HUD Sidebar ============= */
.hud {
    width: 320px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-right: 2px solid var(--accent);
    padding: 20px;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.bunny-card {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(14, 165, 233, 0.05) 100%);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.bunny-avatar {
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    border: 4px solid var(--accent);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.2);
    position: relative;
    overflow: hidden;
}

.bunny-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

.bunny-name {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--accent);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.bunny-age {
    text-align: center;
    font-size: 14px;
    color: var(--purple);
    margin-bottom: 20px;
}

/* ============= Stats ============= */


.stat-group {
    margin-bottom: 18px;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-value {
    font-size: 11px;
    color: var(--purple);
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: none;	
}

.stat-bar {
    height: 24px;
    background: #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.stat-progress.boosted {
    animation: pulse-boost 2s ease-in-out infinite;
}

@keyframes pulse-boost {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.stat-fill {
    height: 100%;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.stat-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        rgba(255, 255, 255, 0) 100%);
    animation: shimmer 2s infinite;
}

.stat-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ============= Wallet Section ============= */
.wallet-section {
    background: #f1f5f9;
    border-radius: 15px;
    padding: 15px;
    margin-top: 20px;
    border: 1px solid #e2e8f0;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.balance-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

.balance-amount {
    font-size: 18px;
    font-weight: bold;
    color: var(--accent);
}

/* ============= Buttons ============= */
.btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid var(--accent);
    border-radius: 10px;
    color: var(--accent);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    background: linear-gradient(135deg, var(--accent) 0%, #0284c7 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(14, 165, 233, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #0284c7 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    border-color: var(--success);
    color: white;
}

/* ============= Game Map ============= */
.game-map {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg, #87ceeb 0%, #98d8c8 50%, #b8e6b8 100%);
    overflow: hidden;
}

.map-background {
    width: 100%;
    height: 100%;
    position: relative;
    background-image: url('../map.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Path system connecting locations */
.map-paths {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.map-path {
    position: absolute;
    background: #d4a574;
    border: 2px solid #b8935f;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

/* ============= Clouds ============= */
.cloud {
    position: absolute;
    background: white;
    border-radius: 100px;
    opacity: 0.8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 100px;
}

.cloud1 {
    width: 100px;
    height: 40px;
    top: 20%;
    animation: float 20s infinite;
}

.cloud1::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 10px;
}

.cloud1::after {
    width: 60px;
    height: 40px;
    top: -15px;
    right: 10px;
}

.cloud2 {
    width: 80px;
    height: 35px;
    top: 40%;
    animation: float 25s infinite;
}

.cloud2::before {
    width: 40px;
    height: 40px;
    top: -20px;
    left: 15px;
}

.cloud2::after {
    width: 50px;
    height: 35px;
    top: -10px;
    right: 15px;
}

/* ============= Map Stations - Illustrated Placeholders ============= */
/* Base station styles */
.station {
    position: absolute;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    z-index: 10;
}

.station:hover {
    transform: translateY(-5px) scale(1.05);
    filter: brightness(1.1) drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

/* Station image styles */
.station-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: auto;
}

/* Individual station positions - ONLY DEFINE ONCE */
/* Adjust these values based on where you want each building on your map */

.stats-station {
    /* Position on the map - adjust these */
    bottom: 20%;    /* Vertical position (0% = top, 100% = bottom) */
    left: 25%;   /* Horizontal position (0% = left, 100% = right) */
    
    /* Size of the clickable area - adjust to match your image */
    width: 150px;
    height: 150px;
}

.farm-station {
    /* Position on the map - adjust these */
    top: 70%;    /* Vertical position (0% = top, 100% = bottom) */
    left: 5%;   /* Horizontal position (0% = left, 100% = right) */
    
    /* Size of the clickable area - adjust to match your image */
    width: 390px;
    height: 250px;
}

.water-station {
    /* Position on the map - adjust these */
    top: 55%;    /* Vertical position (0% = top, 100% = bottom) */
    right: 63%;   /* Horizontal position (0% = left, 100% = right) */

    /* Size of the clickable area - adjust to match your image */
    width: 230px;
    height: 190px;
}

.training-station {
    /* Position on the map - adjust these */
    top: 70%;
    right: 0%;
    
    /* Size - adjust to match your image */
    width: 250px;
    height: 205px;
}

.race-station {
    /* Position on the map - adjust these */
    top: 64%;
    right: 30%;
   
    /* Size - adjust to match your image */
    width: 280px;
    height: 180px;
}

.raffle-station {
    /* Position on the map - adjust these */
    top: 65%;
    right: 50%;
 
    /* Size - adjust to match your image */
    width: 240px;
    height: 260px;
}

/* Fix race results box to accommodate text */
.race-results {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    display: none;
    border: 3px solid var(--accent);
    box-shadow: 0 20px 60px rgba(14, 165, 233, 0.3);
    min-width: 450px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.results-title {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--accent);
    word-wrap: break-word;
}

.results-list {
    text-align: left;
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin: 10px 0;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 10px;
    font-size: 15px;
}


/* ============= Map Bunny ============= */
.map-bunny {
    position: absolute;
    font-size: 60px;
    transition: all 3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
    animation: hop 4s infinite;
}

/* ============= Modal ============= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 2px solid var(--accent);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s;
    position: relative;
}

.modal-title {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--accent);
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--ink);
    cursor: pointer;
    transition: all 0.3s;
}

.close-btn:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

/* ============= Item Grid ============= */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.item-card {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.item-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent), var(--purple), var(--accent));
    border-radius: 15px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s;
}

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

.item-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.3);
}

.item-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.item-name {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--ink);
}

.item-price {
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
}

.item-effect {
    font-size: 11px;
    color: var(--purple);
    margin-top: 5px;
}


.item-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.3);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(240, 248, 255, 0.9) 100%);  /* Very light blue-white gradient */
    border: 2px solid rgba(14, 165, 233, 0.3);  /* Light blue border */
}

.item-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.item-name {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--ink);
}

.item-price {
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
}

.item-effect {
    font-size: 11px;
    color: var(--purple);
    margin-top: 5px;
}

/* ============= Notifications ============= */
.notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    pointer-events: none;
}

.notification {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid var(--accent);
    border-radius: 15px;
    padding: 15px 20px;
    margin-bottom: 15px;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    pointer-events: all;
    cursor: pointer;
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.removing {
    animation: slideOutRight 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--accent);
}

.notification-message {
    font-size: 14px;
    color: var(--ink);
}

/* ============= Race Track ============= */
.race-track {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.race-track.active {
    display: flex;
}

.track-container {
    width: 90%;
    max-width: 1400px;
    height: 700px;
    background: linear-gradient(90deg, #34d399 0%, #22c55e 100%);
    border-radius: 30px;
    position: relative;
    border: 5px solid #fff;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(34, 197, 94, 0.4);
}

.race-info {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    z-index: 10;
}

.race-info h2 {
    font-size: 32px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.countdown {
    font-size: 60px;
    font-weight: bold;
    color: #fef3c7;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-top: 20px;
}

.race-lanes {
    position: absolute;
    top: 120px;
    left: 120px;
    right: 120px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.race-lane {
    height: 65px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 35px;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.4);
    overflow: visible;
}

.lane-number {
    position: absolute;
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    color: var(--ink);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid var(--accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.race-bunny {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 45px;
    transition: left 3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.bunny-name-tag {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

.finish-line {
    position: absolute;
    right: 30px;
    top: 120px;
    bottom: 80px;
    width: 10px;
    background: repeating-linear-gradient(
        0deg,
        #000 0px,
        #000 20px,
        #fff 20px,
        #fff 40px
    );
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.race-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.race-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--accent) 0%, #0284c7 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(14, 165, 233, 0.3);
}

.race-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(14, 165, 233, 0.5);
}

.race-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.race-results.active {
    display: block;
    animation: zoomIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-position {
    font-size: 20px;
    margin-right: 15px;
    min-width: 30px;
}

.result-name {
    flex: 1;
}

.result-prize {
    color: var(--success);
    font-weight: bold;
}

/* ============= Training Modal ============= */
.training-info {
    background: rgba(14, 165, 233, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.training-limit {
    color: var(--warning);
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
}

.training-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
}

.training-stat {
    text-align: center;
}

.training-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent);
}

.training-stat-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
}

/* ============= Raffle Modal ============= */
.raffle-list {
    margin: 20px 0;
}

.raffle-item {
    background: rgba(14, 165, 233, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.raffle-time {
    font-size: 18px;
    font-weight: bold;
    color: var(--accent);
}

.raffle-prize {
    font-size: 14px;
    color: var(--success);
}

.raffle-entries {
    font-size: 14px;
    color: var(--purple);
}

/* ============= Footer ============= */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.95) 100%);
    padding: 12px;
    text-align: center;
    font-size: 13px;
    border-top: 1px solid var(--accent);
    color: #64748b;
}

/* ============= Animations ============= */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes float {
    from { transform: translateX(-100px); }
    to { transform: translateX(calc(100vw + 100px)); }
}

@keyframes hop {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(-5deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(-10px) rotate(5deg); }
}

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

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

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes zoomIn {
    from {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* ============= Responsive Design ============= */
@media (max-width: 768px) {
    .hud {
        width: 100%;
        position: fixed;
        bottom: 0;
        height: 50%;
        z-index: 100;
        border-right: none;
        border-top: 2px solid var(--accent);
    }

    .game-map {
        height: 50%;
    }

    .station {
        font-size: 11px;
        padding: 10px;
    }

    .station::before {
        font-size: 24px;
    }

    .modal-content {
        padding: 20px;
        margin: 10px;
    }

    .track-container {
        height: 400px;
    }

    .race-lanes {
        left: 60px;
        right: 60px;
    }
}

/* Confirmation Modal */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.confirm-modal, .settings-modal {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    border: 2px solid var(--accent);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s;
}

.confirm-header, .modal-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.confirm-header h3, .modal-header h2 {
    margin: 0;
    color: var(--accent);
}

.confirm-body, .modal-body {
    padding: 20px;
    font-size: 15px;
    line-height: 1.6;
    max-height: 60vh;
    overflow-y: auto;
    color: var(--ink);
}

.confirm-footer {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.confirm-footer .btn {
    width: auto;
    padding: 10px 20px;
    margin: 0;
}

/* Connected button state */
.btn.connected {
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    border-color: var(--success);
    cursor: not-allowed;
    opacity: 0.9;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
}

.btn.connected:hover {
    transform: none;
    box-shadow: none;
}

/* Claimed button state */
.btn.claimed {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    border-color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
    color: white;
}

.btn.claimed:hover {
    transform: none;
    box-shadow: none;
}

/* Settings button */
.btn-settings {
    background: linear-gradient(135deg, var(--purple) 0%, #7c3aed 100%);
    border-color: var(--purple);
    margin-top: 10px;
    color: white;
}

/* Settings modal styles */
.settings-modal {
    max-width: 600px;
}

.settings-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.settings-section h3 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 18px;
}

.settings-info {
    background: #f1f5f9;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
}

.settings-info p {
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--ink);
}

.settings-checkbox {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #e2e8f0;
}

.settings-checkbox:hover {
    background: #f1f5f9;
    border-color: var(--accent);
}

.settings-checkbox input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.settings-checkbox span {
    flex: 1;
    color: var(--ink);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    border-color: var(--danger);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    border-color: #94a3b8;
    color: white;
}

/* Critical Notification Modal */
.notification-modal.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s;
}

.notification-modal.show {
    opacity: 1;
}

.notification-modal .modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    transform: scale(0.8);
    transition: transform 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.notification-modal.show .modal-content {
    transform: scale(1);
}

.notification-modal .modal-content.critical {
    border: 3px solid #ff0000;
    background: linear-gradient(135deg, #fff5f5 0%, #ffeeee 100%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 20px rgba(255, 0, 0, 0.5); }
    50% { box-shadow: 0 0 40px rgba(255, 0, 0, 0.8); }
    100% { box-shadow: 0 0 20px rgba(255, 0, 0, 0.5); }
}

.skull-icon {
    font-size: 60px;
    text-align: center;
    margin: 20px 0;
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px) rotate(-5deg); }
    75% { transform: translateX(5px) rotate(5deg); }
}

.modal-header h2 {
    margin: 0 0 20px 0;
    color: #333;
    text-align: center;
    font-size: 24px;
}

.modal-body {
    margin: 20px 0;
    text-align: center;
}

.modal-body p {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
}

.notification-modal .modal-content.critical .modal-body p {
    color: #cc0000;
    font-weight: 500;
}

.modal-footer {
    text-align: center;
    margin-top: 25px;
}

.modal-footer button {
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 10px;
    cursor: pointer;
    background: #ff4444;
    color: white;
    border: none;
    font-weight: bold;
}

.modal-footer button:hover {
    background: #cc0000;
}

/* Sound Toggle Button */
.sound-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #0ea5e9;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
}

.sound-toggle:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.sound-toggle:active {
    transform: scale(0.95);
}

/* Optional: Add a muted state style */
.sound-toggle.muted {
    opacity: 0.5;
    background: rgba(200, 200, 200, 0.9);
}

/* Optional: Pulse animation when music is playing */
.sound-toggle.playing {
    animation: pulse-music 2s infinite;
}

@keyframes pulse-music {
    0% { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); }
    50% { box-shadow: 0 2px 20px rgba(139, 69, 19, 0.4); }
    100% { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); }
}

/* Make sure it stays within game bounds on mobile */
@media (max-width: 768px) {
    .sound-toggle {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* Stat bar animation when increased */
.stat-increased {
    animation: statPulse 1s ease;
}

@keyframes statPulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 rgba(0, 255, 0, 0);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.6);
        filter: brightness(1.2);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 0 rgba(0, 255, 0, 0);
    }
}

/* Success notification enhancement */
.notification.success {
    animation: slideInBounce 0.5s ease;
}

@keyframes slideInBounce {
    0% {
        transform: translateX(100%) scale(0.8);
        opacity: 0;
    }
    60% {
        transform: translateX(-10px) scale(1.02);
        opacity: 1;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* Money spending effect */
.wallet-balance.spending {
    animation: spendMoney 0.5s ease;
    color: #ff4444;
}

@keyframes spendMoney {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); color: #ff0000; }
    100% { transform: scale(1); }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: white;
    margin-top: 20px;
    font-size: 18px;
}

.raffle-reminder {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 9999;
    animation: slideIn 0.5s ease;
    text-align: center;
    font-size: 14px;
}

.raffle-reminder:hover {
    transform: scale(1.05);
}

.raffle-reminder.live {
    animation: pulse 1s infinite;
    background: linear-gradient(135deg, #ff4444, #ff6666);
}

@keyframes slideIn {
    from { transform: translateX(400px); }
    to { transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-tabs {
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Mini-game Modal */
.minigame-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.minigame-modal-content {
    width: 90%;
    max-width: 700px;
    height: 90vh;
    max-height: 800px;
    background: white;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.minigame-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.minigame-close-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: rotate(90deg);
}

/*****************************************************************************/
/* 									stats	 								 */
/*****************************************************************************/

/* Stats Modal Styles - Gaming UI Light Mode */
.stats-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85vw;
    max-width: 1200px;
    height: 85vh;
    max-height: 800px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 250, 252, 0.92) 50%,
        rgba(241, 245, 249, 0.9) 100%);
    border-radius: 30px;
    padding: 0;
    border: 2px solid rgba(14, 165, 233, 0.3);
    box-shadow: 
        0 0 60px rgba(14, 165, 233, 0.15),
        0 0 30px rgba(139, 92, 246, 0.1),
        0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: statsGlow 3s ease-in-out infinite alternate;
    overflow: hidden;
}

/* Soften the glow animation */
@keyframes statsGlow {
    0% {
        box-shadow: 
            0 0 40px rgba(14, 165, 233, 0.15),
            0 0 20px rgba(139, 92, 246, 0.1),
            0 20px 40px rgba(0, 0, 0, 0.1);
    }
    100% {
        box-shadow: 
            0 0 60px rgba(14, 165, 233, 0.2),
            0 0 30px rgba(139, 92, 246, 0.12),
            0 20px 40px rgba(0, 0, 0, 0.12);
    }
}

/* Stats Header */
.stats-header {
    background: linear-gradient(90deg, 
        rgba(14, 165, 233, 0.1) 0%, 
        rgba(139, 92, 246, 0.1) 100%);
    border-bottom: 2px solid rgba(14, 165, 233, 0.2);
    position: relative;
    padding: 25px 30px;
}


.stats-header .close-btn {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: #ef4444;
    font-size: 24px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    line-height: 1;
}

.stats-header .close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-50%) rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

/* Make sure close button is properly positioned */
#statsModalContainer .stats-modal .close-btn {
    position: static;
    top: 25px;
    right: 30px;
    z-index: 100;
}

.stats-header h2 {
    color: #1e293b;
    font-size: 32px;
    margin: 0;
    text-align: center;
    text-shadow: 
        0 0 20px rgba(14, 165, 233, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 700;
    letter-spacing: 2px;
}

/* Tab Navigation - Gaming Style Light */
.stats-tabs {
    display: flex;
    gap: 5px;
    padding: 20px 30px 0;
    background: linear-gradient(180deg, 
        rgba(241, 245, 249, 0.5) 0%,
        rgba(248, 250, 252, 0.3) 100%);
    border-bottom: none;
    position: relative;
}

.stats-tabs::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30px;
    right: 30px;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(14, 165, 233, 0.2), 
        transparent);
}

.stats-tab {
    padding: 12px 25px;
    background: rgba(248, 250, 252, 0.6);
    border: 1px solid rgba(226, 232, 240, 0.4);
    color: #475569;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 0;
    backdrop-filter: blur(5px);
}

.stats-tab:hover:not(.active) {
    background: rgba(241, 245, 249, 0.8);    
    color: #475569;
    transform: translateY(-2px);
	border-color: rgba(14, 165, 233, 0.2);
}

.stats-tab.active {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 250, 252, 0.9) 100%);
    color: #0ea5e9;
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.1);
    transform: translateY(-3px);
    z-index: 10;
}

.stats-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        rgba(14, 165, 233, 0.6), 
        rgba(139, 92, 246, 0.6));
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.4);
    animation: tabPulse 2s ease-in-out infinite;
}

@keyframes tabPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Stats Content Area */
.stats-content {
    height: calc(100% - 140px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 30px;
    position: relative;
}

/* Tab content container with overflow protection */
.stats-tab-content {
    animation: fadeInUp 0.4s ease;
    position: relative;
    overflow: visible; /* Allow glow effects */
    padding: 5px; /* Padding to contain hover effects */
}

/* Custom Scrollbar for Stats */
.stats-content::-webkit-scrollbar {
    width: 10px;
}

.stats-content::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.3);
    border-radius: 5px;
}

.stats-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        rgba(14, 165, 233, 0.4), 
        rgba(139, 92, 246, 0.4));
    border-radius: 5px;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.stats-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        rgba(14, 165, 233, 0.6), 
        rgba(139, 92, 246, 0.6));
}

/* Stats Grid - Gaming Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
	font-size: 26px;
    padding: 0 5px;
}

.stat-card {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 250, 252, 0.9) 100%);
    border: 1px solid rgba(14, 165, 233, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    border-radius: 15px;
	font-size: 26px;
    padding: 0px 5px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(5px);
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent, 
        rgba(14, 165, 233, 0.08), 
        transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.stat-card:hover {
    border-color: rgba(14, 165, 233, 0.4);
    z-index: 10; /* Ensure it appears above siblings */
	transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(14, 165, 233, 0.15),
        0 4px 10px rgba(0, 0, 0, 0.05);
}

.stat-card:hover::before {
    animation: cardShine 0.5s ease;
    opacity: 1;
}

@keyframes cardShine {
    0% { transform: rotate(45deg) translateX(-100%); }
    100% { transform: rotate(45deg) translateX(100%); }
}

.stat-icon {
    font-size: 42px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(14, 165, 233, 0.3));
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.stat-value {
    font-size: 26px;
    font-weight: bold;
    background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* Stats Sections */
.stats-section {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(248, 250, 252, 0.6) 100%);
    border: 1px solid rgba(14, 165, 233, 0.15);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stats-section h3 {
    margin-bottom: 20px;
    color: #1e293b;
    text-shadow: none;
    font-size: 18px;
    font-weight: 600;    
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(14, 165, 233, 0.2);
}

.stats-section h4 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #475569;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Stat Rows */
.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.3);
    transition: all 0.2s;
}

.stat-row:hover {
    background: rgba(14, 165, 233, 0.05);
    padding-left: 15px;
    border-radius: 8px;
}

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

.stat-row span {
    color: #64748b;
    font-size: 14px;
}

.stat-row strong {
    color: #1e293b;
    font-size: 15px;
    font-weight: 600;
}

/* Favorite Activity */
.favorite-activity {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, 
        rgba(14, 165, 233, 0.08) 0%, 
        rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 15px;
    margin-top: 25px;
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.1);
}

/* Achievements Grid */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.achievement {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(248, 250, 252, 0.6) 100%);
    border: 2px solid rgba(226, 232, 240, 0.5);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.achievement.achieved {
    background: linear-gradient(135deg, 
        rgba(34, 197, 94, 0.1) 0%, 
        rgba(34, 197, 94, 0.05) 100%);
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 
        0 0 30px rgba(34, 197, 94, 0.2),
        inset 0 0 15px rgba(34, 197, 94, 0.05);
}

.achievement.achieved::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    color: #22c55e;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.achievement.locked {
    opacity: 0.5;
    filter: grayscale(1);
}

.achievement:hover:not(.locked) {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.2);
    border-color: rgba(14, 165, 233, 0.3);
}

.achievement-icon {
    font-size: 48px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(14, 165, 233, 0.2));
}

.achievement-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.achievement-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

/* Text color utilities */
.text-success { 
    color: #22c55e; 
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}
.text-warning { 
    color: #f59e0b; 
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}
.text-danger { 
    color: #ef4444; 
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

/* Tab content animations */
.stats-tab-content {
    animation: fadeInUp 0.4s ease;
}

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

/* Close button for stats modal */
.stats-modal .close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: #ef4444;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.stats-modal .close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Stats Modal Container - ensures proper fullscreen overlay */
#statsModalContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
	background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.3s;
}

/* Stats modal is centered by flexbox, no additional positioning needed */
#statsModalContainer .stats-modal {
    /* Position relative is already set in the main stats-modal CSS */
    /* Flexbox handles the centering */
}

/* Make sure close button is properly positioned */
#statsModalContainer .stats-modal .close-btn {
    position: absolute;
    top: 25px;
    right: 30px;
    z-index: 100;
}

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

/************** Remove all scrollbars from all modals ******************/
.modal-content,
.modal-body,
.confirm-body,
#modalContent,
.race-results,
.results-list,
.raffle-modal-content,
.participants-grid,
.settings-modal,
.notification-modal .modal-content,
.minigame-modal-content,
.stats-modal-content,
.stats-tab-content,
.confirm-modal {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-content::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.confirm-body::-webkit-scrollbar,
#modalContent::-webkit-scrollbar,
.race-results::-webkit-scrollbar,
.results-list::-webkit-scrollbar,
.raffle-modal-content::-webkit-scrollbar,
.participants-grid::-webkit-scrollbar,
.settings-modal::-webkit-scrollbar,
.notification-modal .modal-content::-webkit-scrollbar,
.minigame-modal-content::-webkit-scrollbar,
.stats-modal-content::-webkit-scrollbar,
.stats-tab-content::-webkit-scrollbar,
.confirm-modal::-webkit-scrollbar {
    display: none;
}
*/

/* Ensure content doesn't get cut off - adjust modal sizing instead */
.modal-content {
    max-width: 90vw !important;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
}

#modalContent {
    flex: 1 !important;
    min-height: 0 !important;
}

/* Make sure close buttons stay visible */
.close-btn,
.raffle-close-btn,
.minigame-close-btn {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
}

/*
.mini-stat-card {
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.mini-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #0ea5e9;
}

.mini-stat-label {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
    text-transform: uppercase;
}

.podium-display {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 20px 0;
    min-height: 150px;
    position: relative;
}

.podium-item {
    flex: 1;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.podium-medal {
    font-size: 26px;
    margin-bottom: 8px;
}

.podium-count {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 4px;
}

.podium-item.gold .podium-count { color: #fbbf24; }
.podium-item.silver .podium-count { color: #cbd5e1; }
.podium-item.bronze .podium-count { color: #fb923c; }

.podium-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}

.podium-bar {
    width: 60px;
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.6), rgba(14, 165, 233, 0.2));
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 10px;
    transition: height 0.3s ease;
}

.podium-item.gold .podium-bar {
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.6), rgba(251, 191, 36, 0.2));
}

.podium-item.silver .podium-bar {
    background: linear-gradient(180deg, rgba(203, 213, 225, 0.6), rgba(203, 213, 225, 0.2));
}

.podium-item.bronze .podium-bar {
    background: linear-gradient(180deg, rgba(251, 146, 60, 0.6), rgba(251, 146, 60, 0.2));
}

.race-types-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.race-type-card {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.race-type-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.race-type-name {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.race-type-count {
    font-size: 20px;
    font-weight: bold;
    color: #6366f1;
}

.recent-results {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.position-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

.position-badge.gold {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.position-badge.silver {
    background: rgba(203, 213, 225, 0.2);
    color: #e2e8f0;
}

.position-badge.bronze {
    background: rgba(251, 146, 60, 0.2);
    color: #fb923c;
}

.stat-speed.boosted .stat-progress {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(168, 85, 247, 0.5); }
    50% { box-shadow: 0 0 15px rgba(168, 85, 247, 0.8); }
}

/********************* Raffle win badge ***************************/

.raffle-win-badge {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    animation: floatIn 0.5s ease, float 3s ease-in-out infinite;
}

.raffle-win-badge .badge-content {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border: 3px solid #fff;
    border-radius: 20px;
    padding: 15px 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 50px rgba(255, 215, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.raffle-win-badge .badge-icon {
    font-size: 48px;
    animation: bounce 1s ease-in-out infinite;
}

.raffle-win-badge .badge-text {
    color: #333;
}

.raffle-win-badge .badge-title {
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.raffle-win-badge .badge-prizes {
    font-size: 16px;
    font-weight: 600;
    color: #d4380d;
}

.raffle-win-badge .badge-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff4444;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.raffle-win-badge .badge-close:hover {
    background: #cc0000;
    transform: scale(1.1);
}

.raffle-win-badge.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-50px) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
    }
    75% {
        transform: scale(1.1) rotate(5deg);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(-50%) scale(0.8);
    }
}

/* Special modal style for raffle wins */
.notification-modal .modal-content.raffle-win {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border: 3px solid #fff;
    animation: winPulse 2s infinite;
}

.notification-modal .modal-content.raffle-win .modal-body p {
    color: #d4380d;
    font-weight: bold;
    font-size: 18px;
}

@keyframes winPulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 50px rgba(255, 215, 0, 0.8);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .raffle-win-badge {
        top: 60px; /* Below header on mobile */
        width: 90%;
        left: 5%;
        transform: none;
    }
    
    .raffle-win-badge .badge-content {
        padding: 10px 15px;
        gap: 10px;
    }
    
    .raffle-win-badge .badge-icon {
        font-size: 32px;
    }
    
    .raffle-win-badge .badge-title {
        font-size: 14px;
    }
    
    .raffle-win-badge .badge-prizes {
        font-size: 14px;
    }
}
