* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.main-table {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    max-width: 100%;
    overflow-x: auto;
}

.history-section {
    margin-top: 2px;
    text-align: center;
    order: 2;
    margin-left: 48px;
}

.history-section h3 {
    color: white;
    margin-bottom: min(10px, 2vw);
    font-size: min(18px, 3.6vw);
}

.history-display {
    display: grid;
    grid-template-columns: repeat(15, min(35px, 7vw));
    grid-template-rows: repeat(2, min(35px, 7vw));
    gap: min(8px, 1.6vw);
    margin-top: 20px;
    background: rgba(2, 65, 0, 0.938);
    padding: 15px;
    border-radius: 10px;
    justify-content: center;
}

.history-number {
    width: min(35px, 7vw);
    height: min(35px, 7vw);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    font-size: min(16px, 3.2vw);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.count-button {
    width: min(40px, 8vw);
    height: min(40px, 8vw);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    font-weight: bold;
    font-size: min(16px, 3.2vw);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-left: min(10px, 2vw);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.count-button:hover {
    transform: translateZ(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background-color: rgba(0, 0, 0, 0.4);
}

.count-button:active {
    transform: translateZ(0) scale(0.95);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.import-section {
    margin-bottom: min(10px, 2vw);
    display: flex;
    justify-content: center;
}

body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    background-color: #1a1a1a;
    font-family: Arial, sans-serif;
    padding-top: 20px;
}

.roulette-table {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-color: #006400;
    padding: min(20px, 4vw);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    max-width: 100%;
    overflow-x: auto;
    transform-origin: top center;
    transform: scale(var(--table-scale, 1));
    margin: 0 auto;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.numbers-grid {
    display: grid;
    grid-template-columns: minmax(24px, 48px) repeat(12, minmax(30px, 60px));
    gap: min(2px, 0.5vw);
    margin-bottom: min(-16px, 2vw);
}

.number-cell {
    height: min(40px, 8vw);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: min(18px, 3.6vw);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    background-color: #000;
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.number-cell:hover {
    transform: translateZ(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.number-cell.red {
    background-color: #c41e3a;
}

.number-cell.black {
    background-color: #000;
}

.number-cell.zero {
    grid-row: span 3;
    height: min(126px, 25vw);
    background-color: rgba(0, 0, 0, 0.3);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.dozen-bets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: min(2px, 0.5vw);
    margin-bottom: min(-15px, 1vw);
    position: relative;
    width: calc(100% - 48px);
    margin-left: 48px;
}

.other-bets {
    display: grid;
    grid-template-columns: repeat(2, 1fr) repeat(2, 1fr) repeat(2, 1fr);
    gap: min(2px, 0.5vw);
    margin-left: 48px;
    width: calc(100% - 48px);
}

.betting-option {
    padding: min(10px, 2vw);
    text-align: center;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: min(16px, 3.2vw);
    font-weight: bold;
    transform: translateZ(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.absent-numbers-display {
    margin-top: 5px;
    padding: 15px;
    background-color: #033306a4;
    color: white;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-line;
    max-width: 100%;
    overflow-x: auto;
    margin-left: 48px;
    width: calc(100% - 48px);
    text-align: center;
}

.betting-option:hover {
    transform: translateZ(8px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    background-color: rgba(0, 0, 0, 0.4);
}

.number-cell:active,
.betting-option:active {
    transform: translateZ(0) scale(1.05);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

@media (max-width: 768px) {
    :root {
        --table-scale: 0.75;
    }
}

@media (max-width: 480px) {
    :root {
        --table-scale: 0.5;
    }
}