:root {
    --primary-blue: linear-gradient(135deg, #4f90ff, #2e58ff);
    --gold-color: gold;
    --dark-bg: rgba(0, 0, 50, 0.95);
    --success-green: linear-gradient(135deg, #00ff00, #00cc00);
    --success-green-solid: #00dd00;
    --success-green-border: #00aa00;
    --error-red: linear-gradient(135deg, #ff3333, #cc0000);
    --light-gray-gradient: linear-gradient(135deg, #e0e0e0, #c0c0c0);
    --money-tree-width: 280px;
    --money-tree-margin: 20px;
    --game-container-expanded-width: 1400px;
    --game-container-narrow-width: 1100px;
}

body {
    background-color: black; /* fallback */
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    background-size: cover;
    color: white;
    font-family: 'Tahoma', 'Verdana', 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    position: relative;
}
    body::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        z-index: -1;
        pointer-events: none;
    }

/* =================== ANIMATIONS =================== */
@keyframes modalAppear {
    from { opacity: 0; transform: scale(0.8) translateY(-50px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
@keyframes pointerPulse {
    from { transform: translateX(-50%) rotate(180deg) scale(1); background: gold; }
    to { transform: translateX(-50%) rotate(180deg) scale(1.1); background: #ffed4e; box-shadow: 0 0 15px rgba(255,215,0,0.8); }
}
.fade-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: black;
    opacity: 0;
    z-index: 9999;
    pointer-events: none;
    transition: opacity 0.5s ease;
}
.fade-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* =================== START MENU =================== */
.start-menu {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('/images/StaniBogatStartMenu.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    z-index: 2000;
    padding-bottom: 150px;
}
.start-buttons-container {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
    margin-bottom: 50px;
    flex-wrap: wrap;
    margin-left: 2%;
}
.start-button, .tutorial-button, .spinning-wheel-button {
    background: var(--primary-blue);
    color: white;
    border: 4px solid var(--gold-color);
    padding: 20px 40px;
    font-size: 24px;
    font-weight: bold;
    border-radius: 15px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(255,215,0,0.5);
    min-width: 200px;
}
.start-button:hover, .tutorial-button:hover, .spinning-wheel-button:hover {
    background: linear-gradient(135deg, #2e58ff, #4f90ff);
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255,215,0,0.8);
}
.start-button {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255,215,0,0.7);
}
.start-button:hover {
    transform: scale(1.15);
}

/* =================== CATEGORY SELECTION =================== */
.category-selection-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('/images/StaniBogatBackground.jpg') no-repeat center center;
    background-size: cover;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    padding: 20px;
    box-sizing: border-box;
}
.category-selection-screen::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
}
.category-selection-content {
    background: var(--dark-bg);
    padding: 40px;
    border: 5px solid var(--gold-color);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    color: white;
    text-align: center;
    box-shadow: 0 0 40px rgba(255,215,0,0.6);
    animation: slideInLeft 0.5s ease-out;
    z-index: 2;
}
.category-selection-title {
    color: var(--gold-color);
    font-size: 32px;
    margin-bottom: 30px;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.category-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}
.category-btn {
    background: var(--primary-blue);
    color: white;
    border: 3px solid var(--gold-color);
    padding: 18px 25px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(255,215,0,0.5);
}
.category-btn:hover {
    background: linear-gradient(135deg, #2e58ff, #4f90ff);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255,215,0,0.7);
}
#backFromCategoryButton {
    background: var(--primary-blue);
    color: white;
    border: 3px solid var(--gold-color);
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    width: 100%;
    box-shadow: 0 0 15px rgba(255,215,0,0.5);
}
#backFromCategoryButton:hover {
    background: linear-gradient(135deg, #2e58ff, #4f90ff);
    transform: scale(1.05);
}

/* =================== THEME SELECTION =================== */
.theme-selection-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('/images/StaniBogatBackground.jpg') no-repeat center center;
    background-size: cover;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    padding: 20px;
    box-sizing: border-box;
}
.theme-selection-screen::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
}
.theme-selection-content {
    background: var(--dark-bg);
    padding: 40px;
    border: 5px solid var(--gold-color);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    color: white;
    text-align: center;
    box-shadow: 0 0 40px rgba(255,215,0,0.6);
    animation: slideInLeft 0.5s ease-out;
    z-index: 2;
}
.theme-selection-title {
    color: var(--gold-color);
    font-size: 32px;
    margin-bottom: 30px;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.theme-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}
.theme-btn {
    background: var(--primary-blue);
    color: white;
    border: 3px solid var(--gold-color);
    padding: 18px 25px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(255,215,0,0.5);
}
.theme-btn:hover {
    background: linear-gradient(135deg, #2e58ff, #4f90ff);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255,215,0,0.7);
}
#backFromThemeButton {
    background: var(--primary-blue);
    color: white;
    border: 3px solid var(--gold-color);
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    width: 100%;
    box-shadow: 0 0 15px rgba(255,215,0,0.5);
}
#backFromThemeButton:hover {
    background: linear-gradient(135deg, #2e58ff, #4f90ff);
    transform: scale(1.05);
}

/* =================== SETTINGS =================== */
.settings-button {
    position: fixed;
    top: 25px; left: 110px;
    background: var(--primary-blue);
    color: white;
    border: 4px solid var(--gold-color);
    border-radius: 50%;
    width: 80px; height: 80px;
    font-size: 40px;
    cursor: pointer;
    z-index: 4000;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255,215,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.settings-button:hover {
    background: linear-gradient(135deg, #2e58ff, #4f90ff);
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 0 30px rgba(255,215,0,0.9);
}
.settings-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}
.settings-content {
    background: url('/images/StaniBogatBackground.jpg') no-repeat center center;
    background-size: cover;
    border: 5px solid var(--gold-color);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    color: white;
    text-align: center;
    box-shadow: 0 0 50px rgba(255,215,0,0.7);
    animation: modalAppear 0.5s ease-out;
    position: relative;
}
.settings-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 50, 0.9);
    border-radius: 15px;
    z-index: -1;
}
.settings-content h2 {
    color: var(--gold-color);
    font-size: 32px;
    margin-bottom: 30px;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.setting-group {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255,215,0,0.3);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
}
.setting-group h3 {
    color: var(--gold-color);
    margin-bottom: 15px;
    font-size: 20px;
    text-align: center;
}
.volume-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 15px;
}
.volume-control label {
    font-weight: bold;
    color: #f0f0f0;
    min-width: 150px;
}
.volume-slider {
    flex: 1;
    height: 8px;
    border-radius: 5px;
    background: #4f90ff;
    outline: none;
    -webkit-appearance: none;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--gold-color);
    cursor: pointer;
    border: 2px solid #000066;
}
.music-toggle {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}
.music-toggle-btn {
    background: var(--primary-blue);
    color: white;
    border: 2px solid var(--gold-color);
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    font-size: 14px;
}
.music-toggle-btn:hover {
    background: linear-gradient(135deg, #2e58ff, #4f90ff);
    transform: scale(1.05);
}
.music-toggle-btn.active {
    background: var(--success-green);
    border-color: #00ff00;
}
.settings-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}
.close-settings-btn {
    background: var(--primary-blue);
    color: white;
    border: 3px solid var(--gold-color);
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}
.reset-settings-btn {
    background: var(--error-red);
    color: white;
    border: 3px solid var(--gold-color);
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

/* =================== TUTORIAL =================== */
.tutorial-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('/images/StaniBogatTutorial.png') no-repeat center center;
    background-size: cover;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    z-index: 3000;
    padding: 20px;
    box-sizing: border-box;
}
.tutorial-screen::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}
.tutorial-content {
    background: var(--dark-bg);
    padding: 40px;
    border: 5px solid var(--gold-color);
    border-radius: 20px;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    color: white;
    text-align: left;
    margin-left: 50px;
    box-shadow: 0 0 40px rgba(255,215,0,0.6);
    animation: slideInLeft 0.5s ease-out;
}
.tutorial-title {
    color: var(--gold-color);
    font-size: 32px;
    text-align: center;
    margin-bottom: 25px;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.tutorial-text {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #f0f0f0;
}
.tutorial-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255,215,0,0.3);
}
.tutorial-section h3 {
    color: var(--gold-color);
    margin-bottom: 10px;
    font-size: 22px;
}
.tutorial-section ul { padding-left: 20px; }
.tutorial-section li { margin-bottom: 8px; color: #f0f0f0; }
.tutorial-section strong { color: var(--gold-color); }
#backButton {
    background: var(--primary-blue);
    color: white;
    border: 3px solid var(--gold-color);
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
    display: block;
    width: 100%;
    text-align: center;
    box-shadow: 0 0 15px rgba(255,215,0,0.5);
}

/* =================== SPINNING WHEEL =================== */
.spinning-wheel-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('/images/StaniBogatBackground.jpg') no-repeat center center;
    background-size: cover;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    padding: 20px;
    box-sizing: border-box;
}
.spinning-wheel-screen::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
}
.spinning-wheel-title {
    color: var(--gold-color);
    font-size: 36px;
    text-align: center;
    margin-bottom: 10px;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    z-index: 2;
}
.spinning-wheel-text {
    font-size: 20px;
    margin-bottom: 20px;
    color: #f0f0f0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    z-index: 2;
}
.wheel-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 20px auto;
    z-index: 2;
}
.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    /* gradient set dynamically */
    transition: transform 4s cubic-bezier(0.2, 0.8, 0.3, 1);
    box-shadow: 0 0 30px rgba(255,215,0,0.5);
    border: 8px solid var(--gold-color);
    transform: rotate(0deg);
}
.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%) rotate(180deg);
    width: 40px; height: 40px;
    background: var(--gold-color);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    z-index: 10;
    border: 3px solid #000066;
    transition: all 0.3s ease;
}
.wheel-pointer.spinning {
    animation: pointerPulse 0.5s infinite alternate;
}
.spin-button-container { margin: 20px 0; z-index: 2; }
.spin-button {
    background: var(--primary-blue);
    color: white;
    border: 3px solid var(--gold-color);
    padding: 15px 40px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(255,215,0,0.5);
}
.spin-button:disabled {
    background: #666666;
    border-color: #333333;
    cursor: not-allowed;
}
.result-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}
.result-modal-content {
    background: linear-gradient(135deg, #000066, #0000cc);
    border: 5px solid var(--gold-color);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    color: white;
    box-shadow: 0 0 50px rgba(255,215,0,0.7);
    max-width: 500px;
    width: 90%;
    animation: modalAppear 0.5s ease-out;
}
.selected-name {
    font-size: 32px;
    font-weight: bold;
    color: #f0f0f0;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    border: 2px solid rgba(255,215,0,0.3);
}
.spin-again-button {
    background: var(--success-green);
    color: white;
    border: 3px solid var(--gold-color);
    padding: 12px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s;
}
.back-button-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}
.back-button {
    background: var(--primary-blue);
    color: white;
    border: 3px solid var(--gold-color);
    padding: 15px 30px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(255,215,0,0.5);
}

/* =================== GAME CONTAINER =================== */
.game-container {
    max-width: 1400px;
    width: calc(100% - 40px);
    margin: 140px auto 0 auto;
    padding: 35px;
    text-align: center;
    background: var(--dark-bg);
    border: 5px solid;
    border-image: linear-gradient(135deg, #c0c0c0, #e8e8e8, #a0a0a0) 1;
    border-radius: 20px;
    box-shadow: 0 0 60px rgba(255,215,0,0.4);
    display: none;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    position: relative;
    z-index: 1000;
    box-sizing: border-box;
}
.game-container.narrow {
    max-width: 1100px;
    margin: 140px 20px 0 20px;
    margin-right: calc(var(--money-tree-width) + var(--money-tree-margin) + 20px);
    padding: 25px;
}
h1 {
    color: var(--gold-color);
    font-size: 48px;
    text-transform: uppercase;
    text-shadow: 3px 3px 5px black;
    margin-bottom: 30px;
    font-weight: bold;
    letter-spacing: 2px;
}
.question {
    font-size: 32px;
    background: rgba(0, 0, 100, 0.9);
    padding: 30px;
    margin: 40px 0;
    border: 3px solid;
    border-image: linear-gradient(135deg, #c0c0c0, #e8e8e8, #a0a0a0) 1;
    border-radius: 10px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.game-container.narrow .question {
    font-size: 28px;
    padding: 25px;
    margin: 30px 0;
}
.answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 50px 0;
}
.game-container.narrow .answers {
    gap: 20px;
    margin: 40px 0;
}
.answer-btn {
    padding: 25px 20px;
    font-size: 22px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    border: 3px solid;
    border-image: linear-gradient(135deg, #c0c0c0, #e8e8e8, #a0a0a0) 1;
}
.game-container.narrow .answer-btn {
    font-size: 20px;
    padding: 20px 15px;
}
.answer-btn:hover {
    background: linear-gradient(135deg, #ffed4e, #ffd700);
    color: #000066;
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--gold-color);
}
.answer-btn.correct {
    background: var(--success-green) !important;
    color: #000066 !important;
    border: 3px solid #00aa00 !important;
    transform: scale(1.1);
}
.answer-btn.wrong {
    background: linear-gradient(135deg, #ffed4e, #ffd700) !important;
    color: #000066 !important;
    border: 3px solid #cc9900 !important;
}
.answer-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: scale(1) !important;
}

/* =================== MONEY TREE =================== */
.money-tree {
    position: fixed;
    right: calc(var(--money-tree-width) * -1 - 20px);
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, rgba(0, 0, 80, 0.95), rgba(0, 0, 50, 0.95));
    padding: 20px 15px;
    border: 4px solid;
    border-image: var(--light-gray-gradient) 1;
    border-radius: 15px;
    width: var(--money-tree-width);
    max-height: 88vh;
    text-align: center;
    z-index: 1001;
    transition: right 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 0 0 40px rgba(192,192,192,0.5), inset 0 0 20px rgba(192,192,192,0.2);
    display: block !important;
    font-family: 'Arial', sans-serif;
    overflow-y: auto;
}
.money-tree.visible {
    right: var(--money-tree-margin);
}
.jokers {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #c0c0c0;
    width: 100%;
}
.joker-btn {
    padding: 10px 6px;
    font-size: 12px;
    background: linear-gradient(135deg, #000044, #000088);
    color: white;
    border: 2px solid #c0c0c0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    min-width: 80px;
    text-align: center;
    flex: 1;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 8px rgba(0,0,0,0.5);
}
.joker-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #000088, #000044);
    transform: scale(1.07);
    box-shadow: 0 0 15px rgba(255,215,0,0.8);
    border-color: var(--gold-color);
}
.joker-btn:disabled {
    background: #555555;
    border-color: #333333;
    cursor: not-allowed;
    opacity: 0.7;
}
.joker-btn.used::after {
    content: "✖";
    position: absolute;
    top: 3px; right: 3px;
    color: red;
    font-size: 10px;
    font-weight: bold;
    background: rgba(0,0,0,0.8);
    border-radius: 50%;
    width: 14px; height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.joker-text {
    color: white;
    font-weight: bold;
    font-size: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.9);
    text-align: center;
    line-height: 1.2;
    z-index: 1;
}
.money-item {
    padding: 8px 6px;
    margin: 4px 0;
    font-size: 14px;
    font-weight: bold;
    color: white !important;
    background: rgba(0, 0, 80, 0.8);
    border: 2px solid #c0c0c0;
    border-radius: 5px;
    text-align: left;
    position: relative;
    transition: all 0.3s ease;
    min-height: 28px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}
.money-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: linear-gradient(to bottom, #c0c0c0, #a0a0a0);
    opacity: 0.5;
}
.money-item.won {
    background: var(--success-green-solid) !important;
    border-color: var(--success-green-border) !important;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.8);
    box-shadow: 0 0 8px rgba(0,255,0,0.4);
}
.money-item.current {
    background: linear-gradient(135deg, rgba(255,215,0,0.9), rgba(255,200,0,0.9));
    border-color: var(--gold-color);
    color: #000044 !important;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.5);
    box-shadow: 0 0 15px rgba(255,215,0,0.8);
    transform: scale(1.03);
    z-index: 1;
}
.money-tree-toggle {
    position: fixed;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-blue);
    color: white;
    border: 3px solid var(--gold-color);
    border-radius: 50%;
    width: 55px; height: 55px;
    font-size: 25px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1002;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255,215,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    display: none;
}
.money-tree-toggle:hover {
    background: linear-gradient(135deg, #2e58ff, #4f90ff);
    transform: translateY(-50%) scale(1.15);
}
.money-tree.visible + .money-tree-toggle {
    right: calc(var(--money-tree-width) + var(--money-tree-margin) + 15px);
}

/* =================== LEVEL INDICATOR & BACK BUTTON =================== */
.level-indicator {
    position: fixed !important;
    top: 100px; left: 20px;
    background: linear-gradient(135deg, rgba(255,215,0,0.3), rgba(255,200,0,0.3));
    color: var(--gold-color);
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid var(--gold-color);
    z-index: 1002;
    min-width: 220px;
    display: none;
    box-shadow: 0 0 20px rgba(255,215,0,0.5);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}
.game-back-button-container {
    position: fixed;
    top: 20px; left: 20px;
    z-index: 1002;
    display: none;
}
.game-back-button {
    background: var(--primary-blue);
    color: white;
    border: 3px solid var(--gold-color);
    border-radius: 50%;
    width: 90px; height: 90px;
    font-size: 48px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255,215,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =================== MODALS =================== */
.phone-modal {
    position: fixed;
    z-index: 10000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}
.phone-modal-content {
    background: linear-gradient(135deg, #000066, #0000cc);
    margin: 15% auto;
    padding: 30px;
    border: 5px solid var(--gold-color);
    border-radius: 15px;
    width: 400px;
    text-align: center;
    color: white;
    box-shadow: 0 0 50px rgba(255,215,0,0.5);
    animation: modalAppear 0.5s ease-out;
}
.phone-timer {
    font-size: 72px;
    color: var(--gold-color);
    font-weight: bold;
    margin: 20px 0;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
    animation: pulse 1s infinite;
}
.audience-modal {
    position: fixed;
    z-index: 10000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
}
.audience-modal-content {
    background: linear-gradient(135deg, #1a1a5d, #0d0d3d);
    padding: 40px;
    border: 5px solid var(--gold-color);
    border-radius: 20px;
    width: 500px;
    max-width: 90%;
    text-align: center;
    color: white;
}
.audience-title {
    color: var(--gold-color);
    font-size: 32px;
    margin-bottom: 30px;
}
.audience-vote-text {
    font-size: 28px;
    color: white;
    font-weight: bold;
    margin: 30px 0 40px 0;
}
.close-phone-modal, .close-audience-modal {
    background: var(--primary-blue);
    color: white;
    border: 3px solid var(--gold-color);
    padding: 12px 40px;
    font-size: 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}
.language-buttons-vertical {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
    max-height: 300px;
    overflow-y: auto;
}
.language-btn {
    background: var(--primary-blue);
    color: white;
    border: 2px solid var(--gold-color);
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    font-size: 14px;
    text-align: left;
}
.language-btn.active {
    background: var(--success-green);
    border-color: #00ff00;
}

/* =================== RESPONSIVE =================== */
html {
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
}
body {
    overflow-x: hidden;
}
@media (max-width: 1200px) {
    :root {
        --money-tree-width: 250px;
        --money-tree-margin: 15px;
    }
    .game-container {
        max-width: 1200px;
        padding: 30px;
    }
    .game-container.narrow {
        max-width: 1000px;
        margin-right: calc(var(--money-tree-width) + var(--money-tree-margin) + 15px);
    }
}
@media (max-width: 992px) {
    .game-container {
        max-width: 90%;
        margin: 140px auto 0 auto !important;
        padding: 25px !important;
    }
    .game-container.narrow {
        max-width: 90%;
        margin: 140px auto 0 auto !important;
        padding: 25px !important;
    }
    .question { font-size: 26px !important; padding: 20px !important; }
    .answer-btn { font-size: 18px !important; padding: 18px 15px !important; }
}
@media (max-width: 768px) {
    .money-tree {
        width: 90%;
        max-width: 300px;
        right: -100%;
    }
    .money-tree.visible { right: 5px; }
    .game-container { max-width: 95% !important; margin: 140px auto 0 auto !important; padding: 15px !important; }
    .start-buttons-container { flex-direction: column; gap: 20px; }
    h1 { font-size: 36px; }
    .question { font-size: 22px !important; padding: 15px !important; margin: 20px 0 !important; }
    .answers { grid-template-columns: 1fr; gap: 15px !important; margin: 30px 0 !important; }
    .answer-btn { font-size: 18px !important; padding: 15px 10px !important; }
    .wheel-container { width: 300px; height: 300px; }
    .spinning-wheel-title { font-size: 28px; }
    .tutorial-title { font-size: 28px; }
}

/* =================== MINECRAFT THEME =================== */
.game-container.minecraft-theme {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-top: 60px !important;
}
.game-container.minecraft-theme h1 {
    margin-top: 0 !important;
    margin-bottom: 15px !important;
}

/* =================== BACKGROUND WRAPPER & ZOOM =================== */
.background-wrapper {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2;
    background-image: url('/images/StaniBogatBackground.jpg');
    background-size: cover;
    background-position: center;
    transition: none;
    transform: scale(1.8) rotate(0deg);
    transform-origin: center center;
}
.minecraft-bg {
    background-image: url('/images/StaniBogatMinecraftWallpaper1.jpg') !important;
}
.background-wrapper.death-zoom {
    transition: transform 60s linear !important;
    transform: scale(2.5) rotate(45deg) !important;
}
.game-container.death-zoom {
    transition: transform 60s linear !important;
    transform: scale(1.5) rotate(45deg) !important;
}
.death-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.death-red-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(255, 0, 0, 0.7);
    z-index: 1;
}
.death-image {
    position: relative;
    max-width: 80%;
    max-height: 80%;
    z-index: 2;
    background: transparent;
}
.death-buttons {
    position: absolute;
    bottom: 15%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
    z-index: 3;
}
.death-buttons button {
    background: black;
    color: white;
    border: 2px solid white;
    padding: 12px 24px;
    font-size: 20px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: 0.2s;
}
.death-buttons button:hover {
    background: #333;
    transform: scale(1.05);
}
body {
    background-image: none !important;
}
