@font-face {
    font-family: 'SVN-BonVoyage';
    src: url('Fonts/SVN-BonVoyage-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --gold-gradient: linear-gradient(135deg, #d4af37 0%, #f9e29c 50%, #b8860b 100%);
    --bronze-gradient: linear-gradient(180deg, #c58e58 0%, #8e5a2e 100%);
    --dark-blue: #0f172a;
    --text-white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

*,
:after,
:before {
    margin: 0;
    padding: 0;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

body,
html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'SVN-BonVoyage', serif;
    background-color: var(--dark-blue);
    color: var(--text-white);
}

.app-container {
    width: 100vw;
    height: 100vh;
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.app-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    z-index: -1;
}

.content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-left: 100vh;
}

.center-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.main-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.number-box {
    background: linear-gradient(135deg, #c58e58 0%, #eec19a 45%, #eec19a 55%, #8d592d 100%);
    padding: 1rem 12rem 0;
    border-radius: 6rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5rem;
    width: 1500px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    overflow: hidden;
}

.number-box:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 60px 120px rgba(0, 0, 0, 0.6);
}

.digit {
    font-size: 30rem;
    font-family: 'SVN-BonVoyage', serif;
    font-weight: 300;
    margin-bottom: -4rem;
    justify-content: center;
    color: #ffffff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.history-grid {
    margin-top: 12rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6rem 16rem;
    letter-spacing: 20px;
}

.history-item {
    border-radius: 12px;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    font-family: 'SVN-BonVoyage', serif;
    color: rgba(255, 255, 255, 1);
    transition: all 0.5s ease;
}

.history-item.new {
    animation: fadeInScale 0.5s forwards;
    background: linear-gradient(135deg, rgba(197, 142, 88, 0.2) 0%, rgba(249, 226, 156, 0.2) 100%);
    border-color: #f9e29c;
    color: #f9e29c;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animations for rolling numbers */
.spinning .digit {
    animation: roll 0.1s infinite linear;
    filter: blur(2px);
}

@keyframes roll {
    0% {
        transform: translateY(-5px);
    }

    50% {
        transform: translateY(5px);
    }

    100% {
        transform: translateY(-5px);
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10vh;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #1e293b;
    border: 1px solid rgba(197, 142, 88, 0.5);
    padding: 3rem;
    border-radius: 2rem;
    width: 100%;
    max-width: 500px;
    text-align: center;
    transform: translateY(-100px);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.8);
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    font-size: 2rem;
    color: #f9e29c;
    margin-bottom: 1.5rem;
    letter-spacing: 0.2rem;
}

.modal-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.modal-btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-confirm {
    background: linear-gradient(135deg, #c58e58 0%, #8d592d 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(197, 142, 88, 0.3);
}

.btn-confirm:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(197, 142, 88, 0.5);
}

.controls-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}