/* CSS Variables for the new color palette */
:root {
    --bg-primary: #1A1033; /* Dark Purple */
    --bg-secondary: #2C1F50; /* Slightly lighter purple */
    --header-bg: #1F143D;
    --text-color: #E6E6FA; /* Light Lavender */
    --ui-bg: #3F2B66; /* UI elements, inputs */
    --border-color: #584180;
    --accent-color: #FF1493; /* Bright Pink/Magenta */
    --success-color: #7CFC00; /* Lime Green */
    --danger-color: #FF4500; /* Fiery Orange-Red */
    --shadow-dark: rgba(0, 0, 0, 0.7);
    --shadow-light: rgba(255, 255, 255, 0.1);
}

/* General Styling and Font */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent; /* Remove default tap highlight on mobile */
    touch-action: manipulation; /* Prevent double-tap zoom on mobile */
}

/* Main Game Container */
.game-container {
    width: 1400px;
    max-width: 95vw;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-dark);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Header */
header {
    background-color: var(--header-bg);
    padding: 15px 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 10px;
}

.back-button {
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px;
    font-size: 1rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.back-button:active {
    background-color: var(--ui-bg);
    color: #fff;
    border-radius: 8px;
}

.back-button::before {
    content: '←';
    font-size: 1.2em;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
}

.logo img {
    height: 36px;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1.2px;
}

nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

nav button {
    background: linear-gradient(145deg, #2c1f50, #211840);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 80px;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3), inset 0 1px 2px var(--shadow-light);
    touch-action: manipulation;
}

nav button:active {
    background: linear-gradient(145deg, #3f2b66, #2c1f50);
    transform: scale(0.95);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2), inset 0 0 1px rgba(255,255,255,0.05);
}

.balance {
    font-size: 1rem;
    font-weight: 700;
    background-color: var(--ui-bg);
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--success-color);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.balance-icon {
    font-size: 1.1rem;
    color: var(--text-color);
}

.header-icons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.header-icon {
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.header-icon:active {
    background-color: var(--ui-bg);
    color: #fff;
    border-radius: 50%;
}

/* Live Info Bar and Notifications */
.live-info-bar {
    background-color: var(--bg-secondary);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    flex-wrap: wrap;
}

.live-info-bar span {
    color: #fff;
    font-weight: 700;
}

.live-info-bar .online-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success-color);
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

/* Notifications Panel */
.notification-panel {
    position: absolute;
    left: 15px;
    width: 220px;
    max-height: 180px;
    overflow: hidden;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 20;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(44, 31, 80, 0.8);
    backdrop-filter: blur(5px);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.notification-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.notification-item.fading-out {
    opacity: 0;
    transform: translateY(-20px);
}

.notification-item .win-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--success-color);
    border: 2px solid var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--header-bg);
    font-size: 0.65rem;
}

.notification-item .win-amount {
    color: var(--success-color);
    font-weight: 700;
    margin-left: auto;
}

/* Game Area */
.game-area {
    position: relative;
    height: 500px;
    background-color: #2F2154;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 20px;
}

.road-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.road-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(to right, rgba(255,255,255,0.2) 0, rgba(255,255,255,0.2) 2px, transparent 2px, transparent calc(100% / var(--levels-on-page) - 2px));
    background-size: calc(100% / var(--levels-on-page)) 100%;
    background-position: center top;
}

/* House Image Container */
.house-container {
    position: absolute;
    bottom: 20px;
    left: 15px;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 10;
    transition: opacity 0.5s ease;
}

.house-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Chicken Character */
.chicken-character {
    position: absolute;
    bottom: 40px;
    left: 60px;
    width: 70px;
    height: 70px;
    transition: left 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55), bottom 0.5s ease-out;
    z-index: 11;
}

.chicken-character img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease-out;
}

.chicken-character.moving img {
    animation: bounce 0.3s infinite alternate;
}

.chicken-character.dead img {
    animation: none;
    transform: rotate(90deg) scale(1.1);
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-5px); }
}

/* Grates at the bottom */
.grate-row {
    position: absolute;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding: 0 20px;
    box-sizing: border-box;
    gap: 10px;
    transition: opacity 0.5s ease;
}

.grate {
    width: 120px;
    height: 40px;
    background-color: #211840;
    border-radius: 8px 8px 0 0;
    border: 2px solid var(--border-color);
    border-bottom: none;
    box-shadow: inset 0 -5px 10px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
}

.grate::before, .grate::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 32px;
    background-color: var(--border-color);
    border-radius: 3px;
    top: 4px;
}

.grate::before { left: 20px; }
.grate::after { right: 20px; }

/* Multiplier Track and Dynamic Elements */
.multiplier-track {
    position: absolute;
    top: 40px;
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding: 0 30px;
    box-sizing: border-box;
    z-index: 5;
    transition: opacity 0.5s ease;
}

.multiplier-step-container {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

.multiplier-step {
    background: linear-gradient(145deg, #3f2b66, #2c1f50);
    border-radius: 50%;
    width: 90px;
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    border: 2px solid var(--border-color);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4), inset 0 4px 10px rgba(255,255,255,0.05), inset 0 -4px 10px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    opacity: 1;
    touch-action: manipulation;
}

.multiplier-step:active {
    background: linear-gradient(145deg, #3f2b66, #2c1f50);
    transform: scale(0.95);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.multiplier-step.active {
    background: var(--accent-color);
    color: #fff;
    border-color: #ff5cbe;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.6), inset 0 0 10px rgba(255,255,255,0.5);
    transform: scale(1.1);
}

.multiplier-step.passed {
    background-color: transparent;
    box-shadow: none;
    border: none;
    pointer-events: none;
    transform: none !important;
}

.multiplier-step.mine {
    background: var(--danger-color);
    color: #fff;
    border-color: #c0392b;
    animation: flashRed 0.5s ease-out forwards;
    box-shadow: 0 0 20px rgba(255, 69, 0, 0.6);
}

/* Control Panel */
.control-panel {
    background-color: var(--header-bg);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 15px;
}

.bet-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.bet-section-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bet-section .min-max {
    font-size: 0.8rem;
    color: #b0c4de;
    font-weight: 500;
    margin-left: 5px;
    margin-bottom: 5px;
}

.bet-input-wrapper {
    position: relative;
    background-color: var(--ui-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
}

.bet-input-wrapper::before {
    content: '৳';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
    font-weight: 600;
}

.bet-section input[type="number"] {
    background: none;
    border: none;
    color: white;
    padding: 10px 12px 10px 30px;
    width: 90px;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    -moz-appearance: textfield;
}

.bet-section input[type="number"]::-webkit-outer-spin-button,
.bet-section input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bet-section .bet-buttons {
    display: flex;
    gap: 8px;
}

.bet-section .bet-buttons button {
    background: linear-gradient(145deg, #2c1f50, #211840);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 60px;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3), inset 0 1px 2px var(--shadow-light);
    touch-action: manipulation;
}

.bet-section .bet-buttons button:active {
    background: linear-gradient(145deg, #3f2b66, #2c1f50);
    transform: scale(0.95);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2), inset 0 0 1px rgba(255,255,255,0.05);
}

.bet-button-icon {
    font-size: 0.85em;
    color: #b0c4de;
}

.difficulty-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.difficulty-section span {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.difficulty-buttons {
    display: flex;
    gap: 8px;
}

.difficulty-btn {
    background: linear-gradient(145deg, #2c1f50, #211840);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 60px;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3), inset 0 1px 2px var(--shadow-light);
    touch-action: manipulation;
}

.difficulty-btn:active {
    background: linear-gradient(145deg, #3f2b66, #2c1f50);
    transform: scale(0.95);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2), inset 0 0 1px rgba(255,255,255,0.05);
}

.difficulty-btn.active {
    background: linear-gradient(to bottom, var(--accent-color), #b8107c);
    border-color: #ff5cbe;
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 20, 147, 0.4);
}

.chance-of-collision {
    font-size: 0.9rem;
    color: #b0c4de;
    font-weight: 500;
    flex-grow: 1;
    text-align: right;
    padding-right: 10px;
}

.play-button {
    background: linear-gradient(to bottom, var(--success-color), #67c200);
    color: var(--header-bg);
    border: none;
    padding: 16px 30px;
    border-radius: 10px;
    font-size: 1.6rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    min-width: 250px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4), inset 0 -3px 5px rgba(0,0,0,0.3);
    border-bottom: 3px solid #589f00;
    touch-action: manipulation;
}

.play-button:active {
    background: linear-gradient(to bottom, #89f518, #71bf00);
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 -1px 3px rgba(0,0,0,0.2);
}

.play-button.cash-out {
    background: linear-gradient(to bottom, var(--accent-color), #b8107c);
    border-bottom: 3px solid #8f0d61;
    color: var(--text-color);
}

.play-button.retry {
    background: linear-gradient(to bottom, var(--danger-color), #cc3700);
    border-bottom: 3px solid #992900;
    color: var(--text-color);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    width: 450px;
    max-width: 90vw;
    box-shadow: 0 15px 40px var(--shadow-dark);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.modal-overlay.visible .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.6rem;
    color: var(--accent-color);
    font-weight: 700;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.close-modal-btn:active {
    color: #fff;
    transform: scale(0.9);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.log-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.log-item {
    background-color: #211840;
    border: 1px solid #3f2b66;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    transition: background-color 0.2s ease;
}

.log-item:active {
    background-color: #2c1f50;
}

.log-timestamp {
    font-size: 0.75rem;
    color: #b0c4de;
    margin-bottom: 4px;
}

.log-message {
    color: var(--text-color);
    font-weight: 600;
}

.log-message.success {
    color: var(--success-color);
}

.log-message.loss {
    color: var(--danger-color);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .game-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    header {
        align-items: center;
        padding: 12px 15px;
        gap: 8px;
    }

    .logo {
        margin: 0 auto 10px;
    }

    nav {
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }

    nav button {
        padding: 8px 16px;
        font-size: 0.85rem;
        min-width: 70px;
    }

    .balance {
        font-size: 0.9rem;
        padding: 6px 10px;
    }

    .header-icons {
        gap: 8px;
    }

    .header-icon {
        font-size: 1.1rem;
        padding: 6px;
    }

    .live-info-bar {
        align-items: flex-start;
        padding: 10px 15px;
        gap: 8px;
        font-size: 0.85rem;
    }

    .notification-panel {
        top: 120px;
        left: 10px;
        width: 200px;
        max-height: 150px;
        padding: 6px;
    }

    .notification-item {
        padding: 6px 10px;
        font-size: 0.8rem;
        gap: 5px;
    }

    .notification-item .win-icon {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }

    .game-area {
        height: 400px;
        padding-bottom: 15px;
    }

    .house-container {
        bottom: 15px;
        left: 10px;
        width: 100px;
        height: 100px;
    }

    .chicken-character {
        bottom: 30px;
        left: 40px;
        width: 60px;
        height: 60px;
    }

    .grate-row {
        padding: 0 15px;
        gap: 8px;
    }

    .grate {
        width: 80px;
        height: 30px;
    }

    .grate::before, .grate::after {
        width: 8px;
        height: 24px;
        top: 3px;
    }

    .grate::before { left: 15px; }
    .grate::after { right: 15px; }

    .multiplier-track {
        top: 30px;
        padding: 0 20px;
    }

    .multiplier-step-container {
        width: 80px;
        height: 80px;
    }

    .multiplier-step {
        width: 70px;
        height: 70px;
        font-size: 1.2rem;
    }

    .control-panel {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 15px;
    }

    .bet-section, .difficulty-section {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .bet-input-wrapper {
        width: 100%;
    }

    .bet-section input[type="number"] {
        width: 100%;
        padding: 8px 10px 8px 28px;
        font-size: 0.9rem;
    }

    .bet-section .bet-buttons {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }

    .bet-section .bet-buttons button {
        padding: 6px 12px;
        font-size: 0.85rem;
        min-width: 50px;
    }

    .difficulty-buttons {
       width: 100%; 
       justify-content: space-between;
       gap: 8px;
    }

    .difficulty-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
        min-width: 50px;
    }

    .chance-of-collision {
        text-align: center;
        padding-right: 0;
        font-size: 0.85rem;
    }

    .play-button {
        width: 100%;
        padding: 14px 20px;
        font-size: 1.4rem;
        min-width: 200px;
    }

    .modal-content {
        width: 90vw;
        max-height: 85vh;
    }

    .modal-header {
        padding: 12px 15px;
    }

    .modal-header h2 {
        font-size: 1.4rem;
    }

    .close-modal-btn {
        font-size: 1.6rem;
        padding: 6px;
    }

    .modal-body {
        padding: 15px;
    }

    .log-item {
        padding: 10px;
        font-size: 0.85rem;
    }

    .log-timestamp {
        font-size: 0.7rem;
    }
}

/* Additional Media Query for Smaller Mobile Devices (e.g., < 480px) */
@media (max-width: 480px) {
    body {
        font-size: 13px;
    }

    .game-container {
        max-width: 100vw;
    }

    header {
        padding: 10px 12px;
        gap: 6px;
    }

    .logo img {
        height: 30px;
    }

    .logo-text {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }

    nav button {
        padding: 6px 12px;
        font-size: 0.8rem;
        min-width: 60px;
    }

    .balance {
        font-size: 0.85rem;
        padding: 5px 8px;
    }

    .header-icon {
        font-size: 1rem;
        padding: 5px;
    }

    .live-info-bar {
        padding: 8px 12px;
        font-size: 0.8rem;
        gap: 6px;
    }

    .notification-panel {
        top: 100px;
        left: 8px;
        width: 180px;
        max-height: 120px;
        padding: 5px;
    }

    .notification-item {
        padding: 5px 8px;
        font-size: 0.75rem;
    }

    .notification-item .win-icon {
        width: 14px;
        height: 14px;
        font-size: 0.55rem;
    }

    .game-area {
        height: 350px;
        padding-bottom: 10px;
    }

    .house-container {
        bottom: 10px;
        left: 8px;
        width: 80px;
        height: 80px;
    }

    .chicken-character {
        bottom: 25px;
        left: 30px;
        width: 50px;
        height: 50px;
    }

    .grate-row {
        padding: 0 10px;
        gap: 6px;
    }

    .grate {
        width: 60px;
        height: 25px;
    }

    .grate::before, .grate::after {
        width: 6px;
        height: 20px;
        top: 2px;
    }

    .grate::before { left: 10px; }
    .grate::after { right: 10px; }

    .multiplier-track {
        top: 20px;
        padding: 0 15px;
    }

    .multiplier-step-container {
        width: 60px;
        height: 60px;
    }

    .multiplier-step {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }

    .control-panel {
        padding: 12px;
        gap: 10px;
    }

    .bet-section .min-max {
        font-size: 0.75rem;
    }

    .bet-section input[type="number"] {
        padding: 6px 8px 6px 24px;
        font-size: 0.85rem;
        width: 100%;
    }

    .bet-section .bet-buttons button {
        padding: 5px 10px;
        font-size: 0.8rem;
        min-width: 45px;
    }

    .difficulty-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
        min-width: 45px;
    }

    .chance-of-collision {
        font-size: 0.8rem;
    }

    .play-button {
        padding: 12px 15px;
        font-size: 1.2rem;
        min-width: 180px;
    }

    .modal-content {
        width: 95vw;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    .close-modal-btn {
        font-size: 1.4rem;
        padding: 5px;
    }

    .modal-body {
        padding: 12px;
    }

    .log-item {
        padding: 8px;
        font-size: 0.8rem;
    }

    .log-timestamp {
        font-size: 0.65rem;
    }
}