/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a2a3a 0%, #0f1419 100%);
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
}

#app {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
}

/* Header */
.game-header {
    position: relative;
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.header-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.3) 0%, rgba(76, 175, 80, 0.1) 100%);
    transition: width 0.5s ease;
    z-index: 0;
}

.header-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-header h1 {
    font-size: 24px;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.player-level {
    font-size: 16px;
    color: #87CEEB;
    font-weight: normal;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.upgrade-multiplier {
    display: flex;
    gap: 8px;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 6px;
}

.upgrade-multiplier label {
    font-size: 14px;
    color: #a0a0a0;
    margin-right: 4px;
}

.multiplier-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #4a5568;
    color: #e0e0e0;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.multiplier-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #FFD700;
}

.multiplier-btn.active {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-color: #FFD700;
    color: #1a2a3a;
}

.score-display {
    font-size: 20px;
    font-weight: bold;
    color: #FFD700;
}

/* Main Content */
.main-content {
    min-height: 500px;
}

/* Milestone Modal */
.milestone-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.milestone-modal-content {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    border: 3px solid #FFD700;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

.milestone-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #4a5568;
}

.milestone-modal-header h2 {
    color: #FFD700;
    margin: 0;
}

.milestone-close-btn {
    background: none;
    border: none;
    color: #FFD700;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.milestone-close-btn:hover {
    color: #FFA500;
    transform: scale(1.2);
}

.milestone-modal-body {
    padding: 20px;
}

/* Quest Styles - Compact Layout */
.quests-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.quest-card {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    border: 2px solid #4a5568;
    border-radius: 8px;
    padding: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.quest-card:hover {
    border-color: #FFD700;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

/* Rarity Styles */
.quest-card.rarity-common {
    border-color: #6b7280;
}

.quest-card.rarity-uncommon {
    border-color: #059669;
    box-shadow: 0 0 15px rgba(5, 150, 105, 0.4);
}

.quest-card.rarity-rare {
    border-color: #2563eb;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
    animation: rareGlow 2s ease-in-out infinite;
}

.quest-card.rarity-epic {
    border-color: #9333ea;
    box-shadow: 0 0 25px rgba(147, 51, 234, 0.6);
    animation: epicGlow 1.5s ease-in-out infinite;
}

.quest-card.rarity-legendary {
    border: 3px solid;
    border-image: linear-gradient(45deg, #f59e0b, #d97706) 1;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.8);
    animation: legendaryGlow 1s ease-in-out infinite;
}

.quest-card.rarity-mythic {
    border: 3px solid;
    border-image: linear-gradient(45deg, #ef4444, #dc2626, #ef4444) 1;
    box-shadow: 0 0 40px rgba(239, 68, 68, 1);
    animation: mythicGlow 0.8s ease-in-out infinite;
}

@keyframes rareGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
    }
    50% {
        box-shadow: 0 0 25px rgba(37, 99, 235, 0.7);
    }
}

@keyframes epicGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(147, 51, 234, 0.5);
    }
    50% {
        box-shadow: 0 0 35px rgba(147, 51, 234, 0.8);
    }
}

@keyframes legendaryGlow {
    0%, 100% {
        box-shadow: 0 0 25px rgba(245, 158, 11, 0.7);
    }
    50% {
        box-shadow: 0 0 40px rgba(245, 158, 11, 1);
    }
}

@keyframes mythicGlow {
    0%, 100% {
        box-shadow: 0 0 35px rgba(239, 68, 68, 0.8);
    }
    50% {
        box-shadow: 0 0 50px rgba(239, 68, 68, 1);
    }
}

.quest-rarity {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    margin-right: 5px;
}

.quest-completion-count {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 6px;
    text-align: right;
}

.quest-evolution {
    margin-top: 5px;
}

.evolution-requirements {
    font-size: 10px;
    color: #ef4444;
    text-align: center;
    margin-top: 3px;
    padding: 2px 5px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 3px;
}

.quest-card.unlock-card {
    background: rgba(0, 0, 0, 0.3);
    border-style: dashed;
    border-color: #6a7568;
}

.quest-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.quest-name {
    font-size: 16px;
    font-weight: bold;
    color: #FFD700;
}

.quest-level {
    font-size: 14px;
    color: #87CEEB;
    font-weight: bold;
}

/* Progress Bar */
.quest-bar-container {
    position: relative;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #4a5568;
    cursor: pointer;
    margin-bottom: 6px;
    transition: all 0.2s ease;
}

.quest-bar-container:hover {
    border-color: #FFD700;
}

.quest-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    transition: width 0.1s linear;
}

/* Fast-filling bar animation */
.quest-bar-container.fast-fill .quest-bar-fill {
    background: repeating-linear-gradient(
        45deg,
        #3498db,
        #3498db 10px,
        #2980b9 10px,
        #2980b9 20px
    );
    background-size: 28px 28px;
    animation: barberpole 0.5s linear infinite;
}

@keyframes barberpole {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 28px 0;
    }
}

.quest-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    z-index: 1;
}

/* Quest Info */
.quest-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
    color: #a0a0a0;
}

.quest-rewards {
    color: #4CAF50;
    font-weight: bold;
}

.quest-stats {
    display: flex;
    gap: 8px;
    align-items: center;
}

.milestone-bonus {
    font-size: 10px;
    color: #FFD700;
    font-weight: bold;
    background: rgba(255, 215, 0, 0.1);
    padding: 2px 5px;
    border-radius: 3px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.quest-auto-status {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4CAF50;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    color: #4CAF50;
    text-align: center;
    margin-bottom: 8px;
}

/* Floating Score Animation */
.floating-score {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    opacity: 0;
    z-index: 100;
}

.floating-score.animate {
    animation: floatUp 2s ease-out forwards;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -150px);
    }
}

/* Quest Actions */
.quest-actions {
    display: flex;
    gap: 5px;
}

.quest-actions .btn {
    flex: 1;
    font-size: 12px;
    padding: 7px 8px;
}

/* Unlock Card */
.unlock-info {
    text-align: center;
    padding: 20px;
}

.unlock-info div {
    margin-bottom: 10px;
    color: #a0a0a0;
}

/* Buttons */
.btn {
    background: linear-gradient(135deg, #4a5568 0%, #2c3e50 100%);
    color: #e0e0e0;
    border: 2px solid #4a5568;
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6578 0%, #3c4e60 100%);
    border-color: #FFD700;
    transform: translateY(-1px);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-color: #3498db;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #4aa8eb 0%, #3990c9 100%);
}

.btn-success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-color: #4CAF50;
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #5cbf60 0%, #55b059 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    border-color: #FFA500;
}

.btn-warning:hover:not(:disabled) {
    background: linear-gradient(135deg, #FFB520 0%, #FF9C10 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-color: #e74c3c;
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #f75c4c 0%, #d0493b 100%);
}

.btn-small {
    padding: 8px 12px;
    font-size: 13px;
}

.btn.glow {
    animation: btnGlow 2s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

@keyframes btnGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }
}

/* Milestones Tab */
.milestones-container {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 8px;
}

.milestones-container h2 {
    color: #FFD700;
    margin-bottom: 15px;
}

.info-text {
    color: #a0a0a0;
    margin-bottom: 20px;
    line-height: 1.5;
}

.milestone-summary {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #4a5568;
}

.milestone-summary p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.milestone-reference {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #4a5568;
}

.milestone-reference h3 {
    color: #FFD700;
    margin-bottom: 15px;
}

.milestone-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border-left: 3px solid #3498db;
}

.milestone-level {
    font-weight: bold;
    color: #87CEEB;
}

.milestone-bonus {
    color: #4CAF50;
    font-weight: bold;
}

/* Footer */
.game-footer {
    margin-top: 30px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.last-save {
    margin-left: auto;
    font-size: 13px;
    color: #a0a0a0;
}

/* Notifications */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.notification {
    background: rgba(0, 0, 0, 0.9);
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 8px;
    border: 2px solid #4a5568;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    max-width: 300px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    border-color: #4CAF50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
}

.notification-error {
    border-color: #e74c3c;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
}

.notification-info {
    border-color: #3498db;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
}

.notification-milestone {
    border-color: #FFD700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
}

/* Inventory System */
.inventory-container {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 2px solid #4a5568;
}

.inventory-container h3 {
    color: #FFD700;
    font-size: 16px;
    margin-bottom: 10px;
}

.inventory-items {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
    min-height: 70px;
}

.inventory-empty {
    color: #a0a0a0;
    font-size: 14px;
    text-align: center;
    padding: 15px;
    width: 100%;
}

.inventory-item {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    border: 2px solid #4a5568;
    border-radius: 8px;
    padding: 10px;
    min-width: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.inventory-item:hover {
    border-color: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

.inventory-item.selected {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #2c5e50 0%, #1a3f2f 100%);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
}

.inventory-item.new-item {
    animation: newItemGlow 2s ease-in-out;
}

@keyframes newItemGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
        border-color: #4a5568;
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.9);
        border-color: #FFD700;
    }
}

.item-icon {
    font-size: 28px;
    line-height: 1;
}

.item-name {
    font-size: 12px;
    color: #e0e0e0;
    text-align: center;
    white-space: nowrap;
}

/* Selection Prompt */
.selection-prompt {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #4CAF50;
    border-radius: 12px;
    padding: 20px 30px;
    z-index: 999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
    animation: promptPulse 2s ease-in-out infinite;
}

@keyframes promptPulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(76, 175, 80, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(76, 175, 80, 0.8);
    }
}

.prompt-content {
    color: #ffffff;
    font-size: 16px;
    text-align: center;
}

/* Quest Selection State */
.quest-card.selectable {
    cursor: pointer;
    border-color: #4CAF50;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
    animation: questSelectable 1.5s ease-in-out infinite;
}

@keyframes questSelectable {
    0%, 100% {
        box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
    }
}

/* Item Applied Animation */
.quest-card.item-applied {
    animation: itemApplied 1s ease-out;
}

@keyframes itemApplied {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 215, 0, 0);
    }
    25% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    }
    50% {
        transform: scale(0.98);
    }
    75% {
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 215, 0, 0);
    }
}

/* Buff Indicators */
.buff-indicator {
    font-size: 11px;
    font-weight: bold;
    padding: 3px 6px;
    margin-bottom: 6px;
    border-radius: 4px;
    text-align: center;
}

.buff-indicator.speed {
    background: linear-gradient(135deg, rgba(255, 100, 0, 0.3) 0%, rgba(255, 50, 0, 0.2) 100%);
    border: 1px solid rgba(255, 100, 0, 0.5);
    color: #ffaa66;
    animation: fireFlicker 1s ease-in-out infinite;
}

.buff-indicator.output {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.3) 0%, rgba(75, 0, 130, 0.2) 100%);
    border: 1px solid rgba(138, 43, 226, 0.5);
    color: #da70d6;
}

.buff-indicator.turbo {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3) 0%, rgba(0, 100, 255, 0.2) 100%);
    border: 1px solid rgba(0, 255, 255, 0.6);
    color: #00ffff;
    animation: turboGlow 0.5s ease-in-out infinite;
}

@keyframes fireFlicker {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 100, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 100, 0, 0.8);
    }
}

@keyframes turboGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 255, 255, 1);
    }
}

/* New Item Buff Indicators */
.buff-indicator.rr-pause {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.3) 0%, rgba(80, 0, 0, 0.2) 100%);
    border: 1px solid rgba(139, 0, 0, 0.6);
    color: #ff6666;
    animation: skullPulse 1s ease-in-out infinite;
}

.buff-indicator.broken {
    background: linear-gradient(135deg, rgba(255, 69, 0, 0.3) 0%, rgba(178, 34, 34, 0.2) 100%);
    border: 1px solid rgba(255, 69, 0, 0.6);
    color: #ff8c00;
    animation: brokenPulse 0.8s ease-in-out infinite;
}

.buff-indicator.overdrive {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.3) 0%, rgba(255, 0, 0, 0.2) 100%);
    border: 1px solid rgba(255, 140, 0, 0.6);
    color: #ffa500;
    animation: overdrivePulse 0.5s ease-in-out infinite;
}

.buff-indicator.rr-speed {
    background: linear-gradient(135deg, rgba(0, 128, 0, 0.3) 0%, rgba(0, 100, 0, 0.2) 100%);
    border: 1px solid rgba(0, 200, 0, 0.6);
    color: #00ff00;
    animation: greenGlow 0.7s ease-in-out infinite;
}

.buff-indicator.jackpot {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 165, 0, 0.2) 100%);
    border: 1px solid rgba(255, 215, 0, 0.6);
    color: #ffd700;
    animation: jackpotSpin 1.5s ease-in-out infinite;
}

.buff-indicator.lucky {
    background: linear-gradient(135deg, rgba(0, 255, 127, 0.3) 0%, rgba(34, 139, 34, 0.2) 100%);
    border: 1px solid rgba(0, 255, 127, 0.6);
    color: #00ff7f;
}

.buff-indicator.dice {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(200, 200, 200, 0.2) 100%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #ffffff;
}

.buff-indicator.mystery {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.3) 0%, rgba(75, 0, 130, 0.2) 100%);
    border: 1px solid rgba(138, 43, 226, 0.6);
    color: #9370db;
    animation: mysteryGlow 1.2s ease-in-out infinite;
}

@keyframes skullPulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(139, 0, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 18px rgba(139, 0, 0, 0.8);
    }
}

@keyframes brokenPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 69, 0, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 69, 0, 0.8);
        transform: scale(1.05);
    }
}

@keyframes overdrivePulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(255, 140, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 0, 0, 0.9);
    }
}

@keyframes greenGlow {
    0%, 100% {
        box-shadow: 0 0 8px rgba(0, 200, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 16px rgba(0, 200, 0, 0.8);
    }
}

@keyframes jackpotSpin {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
        transform: rotate(0deg);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.9);
    }
}

@keyframes mysteryGlow {
    0%, 100% {
        box-shadow: 0 0 8px rgba(138, 43, 226, 0.4);
    }
    50% {
        box-shadow: 0 0 18px rgba(138, 43, 226, 0.9);
    }
}

/* Speed Buff Animation (Fire Effect) */
.quest-card.speed-buff {
    border-color: #ff6400 !important;
    box-shadow: 0 0 20px rgba(255, 100, 0, 0.6);
    animation: fireCard 1s ease-in-out infinite;
}

.quest-card.speed-buff .quest-bar-fill {
    background: linear-gradient(90deg, #ff6400 0%, #ff3300 50%, #ff6400 100%) !important;
    background-size: 200% 100%;
    animation: fireFlow 2s linear infinite !important;
}

@keyframes fireCard {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 100, 0, 0.4), 0 0 30px rgba(255, 50, 0, 0.2);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 100, 0, 0.8), 0 0 50px rgba(255, 50, 0, 0.4);
    }
}

@keyframes fireFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* Turbo Mode Animation */
.quest-card.turbo-active {
    border-color: #00ffff !important;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.8);
    animation: turboCard 0.5s ease-in-out infinite;
}

.quest-card.turbo-active .quest-bar-fill {
    background: linear-gradient(90deg, #00ffff 0%, #0080ff 25%, #00ffff 50%, #0080ff 75%, #00ffff 100%) !important;
    background-size: 400% 100%;
    animation: turboFlow 1s linear infinite !important;
}

@keyframes turboCard {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.6), 0 0 40px rgba(0, 150, 255, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 255, 255, 1), 0 0 60px rgba(0, 150, 255, 0.6);
        transform: scale(1.02);
    }
}

@keyframes turboFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 400% 50%;
    }
}

/* Russian Roulette Paused Quest */
.quest-card.rr-paused {
    border-color: #8b0000 !important;
    box-shadow: 0 0 25px rgba(139, 0, 0, 0.8);
    animation: rrPausedCard 1s ease-in-out infinite;
    opacity: 0.7;
}

.quest-card.rr-paused .quest-bar-fill {
    background: linear-gradient(90deg, #8b0000 0%, #dc143c 50%, #8b0000 100%) !important;
    animation: none !important;
}

@keyframes rrPausedCard {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 0, 0, 0.6);
    }
    50% {
        box-shadow: 0 0 30px rgba(139, 0, 0, 1);
    }
}

/* Broken Quest */
.quest-card.broken {
    border-color: #ff4500 !important;
    box-shadow: 0 0 25px rgba(255, 69, 0, 0.8);
    animation: brokenCard 0.8s ease-in-out infinite;
    opacity: 0.6;
}

.quest-card.broken .quest-bar-fill {
    background: repeating-linear-gradient(
        45deg,
        #ff4500,
        #ff4500 10px,
        #000000 10px,
        #000000 20px
    ) !important;
    animation: none !important;
}

@keyframes brokenCard {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 69, 0, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 35px rgba(255, 69, 0, 1);
        transform: scale(1.02);
    }
}

/* Overdrive Quest */
.quest-card.overdrive {
    border-color: #ff8c00 !important;
    box-shadow: 0 0 30px rgba(255, 140, 0, 0.9);
    animation: overdriveCard 0.5s ease-in-out infinite;
}

.quest-card.overdrive .quest-bar-fill {
    background: linear-gradient(90deg, #ff8c00 0%, #ff0000 25%, #ff8c00 50%, #ff0000 75%, #ff8c00 100%) !important;
    background-size: 400% 100%;
    animation: overdriveFlow 0.8s linear infinite !important;
}

@keyframes overdriveCard {
    0%, 100% {
        box-shadow: 0 0 25px rgba(255, 140, 0, 0.7), 0 0 50px rgba(255, 0, 0, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 140, 0, 1), 0 0 70px rgba(255, 0, 0, 0.6);
        transform: scale(1.03);
    }
}

@keyframes overdriveFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 400% 50%;
    }
}

/* Russian Roulette Speed Quest */
.quest-card.rr-speed {
    border-color: #00ff00 !important;
    box-shadow: 0 0 25px rgba(0, 255, 0, 0.8);
    animation: rrSpeedCard 0.7s ease-in-out infinite;
}

.quest-card.rr-speed .quest-bar-fill {
    background: linear-gradient(90deg, #00ff00 0%, #00c800 50%, #00ff00 100%) !important;
    background-size: 200% 100%;
    animation: rrSpeedFlow 1s linear infinite !important;
}

@keyframes rrSpeedCard {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.6);
    }
    50% {
        box-shadow: 0 0 35px rgba(0, 255, 0, 1);
    }
}

@keyframes rrSpeedFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        gap: 10px;
    }

    .header-center {
        order: 3;
    }

    .upgrade-multiplier {
        width: 100%;
        justify-content: center;
    }

    .quests-container {
        grid-template-columns: 1fr;
    }

    .game-header h1 {
        font-size: 20px;
    }

    .score-display {
        font-size: 16px;
    }

    .quest-card {
        padding: 10px;
    }

    .quest-actions {
        flex-direction: column;
    }

    .quest-actions .btn {
        width: 100%;
    }

    .inventory-items {
        flex-wrap: wrap;
    }

    .inventory-item {
        min-width: 100px;
    }

    .selection-prompt {
        max-width: 90%;
        padding: 15px 20px;
    }

    .prompt-content {
        font-size: 14px;
    }
}
