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

body {
    font-family: 'Oswald', sans-serif;
    background-color: #1a1a1a;
    color: #333;
    height: 100vh;
    overflow: hidden;
}

#game-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Dashboard */
#dashboard {
    background-color: #b10f1d;
    /* Nice red */
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.stat span:nth-child(2) {
    font-weight: bold;
    margin-left: 10px;
}

.money {
    color: #ffd700;
}

/* Desk */
#desk {
    flex-grow: 1;
    background: url('https://www.transparenttextures.com/patterns/wood-pattern.png'), #4a331c;
    /* Wooden desk look */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

/* Contract Wrapper */
#contract-wrapper {
    position: absolute;
    width: 400px;
    height: 550px;
    transition: transform 0.3s ease;
}

.contract-sliding-in {
    animation: slideIn 0.5s ease-out forwards;
}

.contract-sliding-out-right {
    animation: slideOutRight 0.5s ease-in forwards;
}

.contract-sliding-out-left {
    animation: slideOutLeft 0.5s ease-in forwards;
}

@keyframes slideIn {
    0% {
        transform: translateY(-800px) rotate(-10deg);
        opacity: 0;
    }

    100% {
        transform: translateY(0) rotate(2deg);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    0% {
        transform: translateY(0) rotate(2deg);
        opacity: 1;
    }

    100% {
        transform: translateX(800px) translateY(100px) rotate(45deg);
        opacity: 0;
    }
}

@keyframes slideOutLeft {
    0% {
        transform: translateY(0) rotate(2deg);
        opacity: 1;
    }

    100% {
        transform: translateX(-800px) translateY(100px) rotate(-45deg);
        opacity: 0;
    }
}

/* Paper */
.paper {
    background-color: #f4ecd8;
    width: 100%;
    height: 100%;
    padding: 30px;
    box-shadow: 2px 5px 15px rgba(0, 0, 0, 0.5);
    font-family: 'Courier Prime', monospace;
    position: relative;
    border-radius: 2px;
}

.paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://www.transparenttextures.com/patterns/paper.png');
    opacity: 0.5;
    pointer-events: none;
}

.hidden {
    display: none !important;
}

.contract-title {
    text-align: center;
    font-size: 1.5rem;
    font-family: 'Oswald', sans-serif;
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.club-name {
    text-align: center;
    font-size: 1rem;
    font-family: 'Oswald', sans-serif;
    color: #555;
    margin-bottom: 15px;
}

hr {
    border: 0;
    border-top: 1px dashed #999;
    margin: 15px 0;
}

.player-info {
    font-size: 1.1rem;
    line-height: 1.6;
}

.highlight {
    background-color: rgba(255, 255, 0, 0.4);
    padding: 2px 5px;
    font-weight: bold;
}

.contract-body h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    margin-top: 20px;
    font-family: 'Oswald', sans-serif;
}

.salary-field {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.salary-field label {
    font-weight: bold;
}

.salary-field input {
    font-family: 'Courier Prime', monospace;
    font-size: 1.1rem;
    padding: 5px;
    width: 50%;
    text-align: right;
    border: 1px solid #ccc;
    background-color: #fff;
    cursor: default;
}

.signatures {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
}

.sig {
    border-top: 1px dashed #999;
    padding-top: 5px;
    width: 40%;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Stamps UI */
#controls {
    position: absolute;
    bottom: 30px;
    display: flex;
    gap: 150px;
}

.stamp-btn {
    font-family: 'Oswald', sans-serif;
    padding: 15px 30px;
    font-size: 1.5rem;
    cursor: pointer;
    border: 5px solid;
    border-radius: 10px;
    background-color: #222;
    color: #fff;
    text-transform: uppercase;
    font-weight: bold;
    transition: transform 0.1s, box-shadow 0.1s;
    box-shadow: 0 10px 0px #111;
}

.stamp-btn:active {
    transform: translateY(10px);
    box-shadow: 0 0px 0px #111;
}

.stamp-red {
    border-color: #e74c3c;
    color: #e74c3c;
}

.stamp-green {
    border-color: #2ecc71;
    color: #2ecc71;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    background-color: #fff;
    padding: 40px;
    max-width: 600px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

.modal-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #b10f1d;
}

.modal-content h2 {
    color: #555;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.modal-content p,
.modal-content ul {
    text-align: left;
    margin-bottom: 15px;
    font-size: 1.1rem;
    line-height: 1.5;
}

.modal-content ul {
    padding-left: 20px;
    background-color: #f9f9f9;
    padding: 20px 20px 20px 40px;
    border-left: 5px solid #b10f1d;
}

#anecdote-box {
    background-color: #ecf0f1;
    border: 2px solid #bdc3c7;
    padding: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
    font-family: serif;
}

#anecdote-box h3 {
    margin-bottom: 10px;
    text-decoration: underline;
    font-family: sans-serif;
    font-size: 1rem;
}

button#btn-start,
button#btn-restart {
    margin-top: 20px;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-family: 'Oswald', sans-serif;
    color: white;
    background-color: #b10f1d;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button#btn-start:hover,
button#btn-restart:hover {
    background-color: #8f0b17;
}

/* On-paper Stamp overlay */
.stamp-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-size: 5rem;
    font-weight: bold;
    border: 8px solid;
    padding: 10px 30px;
    border-radius: 10px;
    opacity: 0;
    pointer-events: none;
    font-family: 'Oswald', sans-serif;
    z-index: 5;
}

.stamp-mark.green {
    color: rgba(46, 204, 113, 0.8);
    border-color: rgba(46, 204, 113, 0.8);
    animation: stampBang 0.2s ease-in forwards;
}

.stamp-mark.red {
    color: rgba(231, 76, 60, 0.8);
    border-color: rgba(231, 76, 60, 0.8);
    animation: stampBang 0.2s ease-in forwards;
}

@keyframes stampBang {
    0% {
        transform: translate(-50%, -50%) rotate(-15deg) scale(3);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, -50%) rotate(-15deg) scale(1);
        opacity: 1;
    }
}

/* Shake animation for budget hit */
.shake-money {
    animation: moneyShake 0.5s;
    color: #e74c3c !important;
}

@keyframes moneyShake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

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

    75% {
        transform: translateX(-5px);
    }

    100% {
        transform: translateX(0);
    }
}