/* Splash Screen */
#splashScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #0f0f1a 0%, #1a1a2e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
    pointer-events: auto;
}

#splashScreen.hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-content {
    text-align: center;
    animation: fadeIn 0.5s ease;
    pointer-events: auto;
    user-select: none;
}

.splash-tap {
    pointer-events: auto;
    cursor: pointer;
}

.splash-title {
    font-size: 48px;
    color: #4ecdc4;
    text-transform: uppercase;
    letter-spacing: 8px;
    margin: 0 0 10px 0;
    text-shadow: 0 0 20px rgba(78, 205, 196, 0.5);
    animation: pulse 2s infinite ease-in-out;
}

.splash-version {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 40px 0;
    letter-spacing: 2px;
}

.splash-loading {
    width: 200px;
    margin: 0 auto 30px;
}

.loading-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4ecdc4, #ff6b6b);
    border-radius: 2px;
    animation: loadProgress 2s ease-out forwards;
}

.splash-tap {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    animation: blink 1.5s infinite ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); text-shadow: 0 0 20px rgba(78, 205, 196, 0.5); }
    50% { transform: scale(1.05); text-shadow: 0 0 30px rgba(78, 205, 196, 0.8); }
}

@keyframes loadProgress {
    from { width: 0%; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Prevent scroll during splash */
body.splash-active {
    overflow: hidden;
}

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

html, body {
    font-family: 'Arial', sans-serif;
    background: #1a1a2e;
    margin: 0;
    padding: 0;
    overflow: hidden;
    width: 100%;
    height: 100%;
    position: fixed;
    -webkit-tap-highlight-color: transparent;
}

#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    background: #0f0f1a;
    overflow: hidden;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    user-select: none;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

#ui {
    position: absolute;
    top: calc(10px + env(safe-area-inset-top));
    left: calc(10px + env(safe-area-inset-left));
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

#ui > div {
    margin-bottom: 5px;
}

#gems {
    color: #f39c12;
    font-size: 18px;
}

#waveUI {
    position: absolute;
    top: calc(75px + env(safe-area-inset-top));
    left: calc(10px + env(safe-area-inset-left));
    font-size: 20px;
    color: #f39c12;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.25s ease;
    pointer-events: auto;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.hidden:not(.overlay) {
    display: none;
}

.overlay h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ff6b6b;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.8);
}

.overlay p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #4ecdc4;
}

.overlay button {
    padding: 15px 40px;
    font-size: 20px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    touch-action: manipulation;
}

.overlay button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
}

.overlay button:active {
    transform: scale(0.98);
}

#pauseBtn {
    position: absolute;
    top: calc(10px + env(safe-area-inset-top));
    right: calc(10px + env(safe-area-inset-right));
    width: 50px;
    height: 50px;
    font-size: 24px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 100;
    pointer-events: auto;
}

#pauseBtn:active {
    background: rgba(255, 255, 255, 0.4);
}

#soundBtn, #musicBtn {
    position: absolute;
    top: calc(10px + env(safe-area-inset-top));
    width: 50px;
    height: 50px;
    font-size: 24px;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
}

#soundBtn { right: 70px; }
#musicBtn { right: 130px; }

#soundBtn:active, #musicBtn:active {
    background: rgba(255, 255, 255, 0.4);
}

.bomb-btn {
    position: absolute;
    bottom: calc(20px + env(safe-area-inset-bottom));
    right: calc(10px + env(safe-area-inset-right));
    width: 70px;
    height: 70px;
    font-size: 32px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: 3px solid #ff6b6b;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.5);
    transition: transform 0.1s, box-shadow 0.1s;
}

.bomb-btn:active {
    transform: scale(0.9);
    box-shadow: 0 0 25px rgba(231, 76, 60, 0.8);
}

.bomb-btn.empty {
    background: rgba(100, 100, 100, 0.5);
    border-color: #666;
    box-shadow: none;
}

.bomb-count {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #f39c12;
    color: #000;
    font-size: 14px;
    font-weight: bold;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#pauseMenu {
    background: rgba(0, 0, 0, 0.9);
}

.pause-content {
    text-align: center;
}

.pause-content h2 {
    font-size: 48px;
    color: #f39c12;
    margin-bottom: 30px;
}

.pause-content button {
    display: block;
    width: 200px;
    margin: 10px auto;
    padding: 15px 30px;
    font-size: 18px;
    background: linear-gradient(180deg, #3498db, #2980b9);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pause-content button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.5);
}

.pause-content button:active {
    transform: scale(0.95);
}

@media (max-width: 600px) {
    #ui {
        font-size: 14px;
    }
    
    .overlay h1 {
        font-size: 36px;
    }
    
    .overlay p {
        font-size: 16px;
    }
    
    .overlay button {
        padding: 12px 30px;
        font-size: 18px;
    }
}


/* Wave Announcement Overlay Styles */
.wave-overlay {
    position: fixed;
    top: 150px;  /* Move higher to avoid player area */
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), transparent);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding-left: 0;
    z-index: 50;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
}

.wave-overlay:not(.hidden) {
    opacity: 1;
}

.wave-content {
    text-align: center;
    animation: wavePopIn 0.5s ease-out;
}

@keyframes wavePopIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.wave-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #4ecdc4;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin: 0;
    text-shadow: 0 0 20px rgba(78, 205, 196, 0.5);
}

.wave-number {
    font-size: 6rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ff6b6b 0%, #f39c12 50%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 10px 0;
    text-shadow: none;
    animation: waveNumberPulse 2s ease-in-out infinite;
    line-height: 1;
}

@keyframes waveNumberPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.wave-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Boss Health Bar Styles */
#bossHealthBar {
    position: fixed;
    top: calc(80px + env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 400px;
    text-align: center;
    z-index: 40;
}

#bossName {
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#bossHealthContainer {
    width: 100%;
    height: 20px;
    background: rgba(0,0,0,0.5);
    border: 2px solid #e74c3c;
    border-radius: 10px;
    overflow: hidden;
}

#bossHealthFill {
    height: 100%;
    background: linear-gradient(90deg, #e74c3c, #c0392b);
    width: 100%;
    transition: width 0.2s ease;
}

/* Boss wave announcement styling */
.boss-wave .wave-title {
    color: #e74c3c;
    text-shadow: 0 0 20px rgba(231, 76, 60, 0.5);
}

.boss-wave .wave-number {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 50%, #e74c3c 100%);
}

.boss-wave .wave-subtitle {
    color: rgba(231, 76, 60, 0.9);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .wave-title {
        font-size: 1.5rem;
    }
    
    .wave-number {
        font-size: 4rem;
    }
    
    .wave-subtitle {
        font-size: 1rem;
    }
    
    #bossHealthBar {
        width: 90%;
        max-width: 300px;
    }
}

@media (max-width: 400px) {
    .wave-title {
        font-size: 1.2rem;
    }
    
    .wave-number {
        font-size: 3rem;
    }
    
    .wave-subtitle {
        font-size: 0.9rem;
    }
    
    #bossHealthBar {
        width: 95%;
        max-width: 250px;
    }
}

#playerHighlight {
    position: fixed;
    bottom: 80px;
    left: 0;
    width: 100%;
    height: 70px;
    pointer-events: none;
    z-index: 45;
}

#playerHighlightBox {
    position: absolute;
    bottom: 0;
    width: 46px;
    height: 66px;
    border: 2px solid rgba(78, 205, 196, 0.8);
    border-radius: 6px;
    background: rgba(78, 205, 196, 0.2);
    transition: all 0.1s ease;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.4);
}

#playerHighlight.hidden {
    display: none;
}

#settingsBtn {
    position: absolute;
    top: calc(10px + env(safe-area-inset-top));
    right: calc(190px + env(safe-area-inset-right));
    width: 50px;
    height: 50px;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
}

#settingsBtn:active {
    transform: scale(0.95);
}

#dailyRewardsBtn {
    position: absolute;
    top: calc(10px + env(safe-area-inset-top));
    right: calc(130px + env(safe-area-inset-right));
    width: 50px;
    height: 50px;
    font-size: 24px;
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    animation: pulse 2s infinite;
}

#dailyRewardsBtn:active {
    transform: scale(0.95);
}

#settingsPanel {
    background: rgba(0, 0, 0, 0.9);
    z-index: 15;
}

.settings-content {
    text-align: center;
    padding: 20px;
}

.settings-content h2 {
    font-size: 32px;
    color: #4ecdc4;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.setting-row span {
    color: white;
    font-size: 18px;
}

.toggle-btn {
    padding: 14px 20px;
    font-size: 16px;
    font-weight: bold;
    background: #4ecdc4;
    border: none;
    border-radius: 20px;
    color: #0f0f1a;
    cursor: pointer;
    min-width: 80px;
    min-height: 44px;
}

.toggle-btn.off {
    background: #666;
    color: white;
}

.toggle-btn:active {
    transform: scale(0.95);
}

#privacyLink {
    color: #4ecdc4;
    text-decoration: none;
    font-size: 16px;
}

#privacyLink:hover {
    text-decoration: underline;
}

.close-btn {
    margin-top: 30px;
    padding: 12px 40px;
    font-size: 18px;
    background: transparent;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 10px;
    color: white;
    cursor: pointer;
}

.close-btn:hover {
    background: rgba(255,255,255,0.1);
}

/* How to Play Panel */
#howToPlayPanel {
    background: rgba(0, 0, 0, 0.9);
    z-index: 15;
}

.how-to-play-content {
    text-align: center;
    padding: 20px;
    max-width: 320px;
    max-height: 90vh;
    overflow-y: auto;
}

.how-to-play-content h2 {
    font-size: 32px;
    color: #4ecdc4;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.htp-section {
    margin-bottom: 18px;
}

.htp-section h3 {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.htp-section p {
    font-size: 14px;
    margin-bottom: 4px;
}

.htp-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.htp-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.htp-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.htp-box {
    background: #888;
    border-radius: 4px;
}

.htp-spike {
    background: transparent;
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-bottom: 28px solid #e67e22;
    border-radius: 0;
}

#howToPlayBtn,
#pauseHowToPlayBtn {
    margin-top: 10px;
}

/* Daily Rewards Panel */
#dailyRewardsPanel {
    background: rgba(0, 0, 0, 0.9);
    z-index: 15;
}

.daily-rewards-content {
    text-align: center;
    padding: 20px;
}

.daily-rewards-content h2 {
    font-size: 32px;
    color: #f39c12;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.streak-display {
    font-size: 24px;
    color: #ff6b6b;
    margin-bottom: 30px;
}

#streakCount {
    font-size: 32px;
    font-weight: bold;
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.reward-day {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px 10px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.reward-day.claimed {
    opacity: 0.5;
    border-color: #4ecdc4;
}

.reward-day.available {
    border-color: #f39c12;
    background: rgba(243, 156, 18, 0.2);
    animation: pulse 2s infinite;
}

.reward-day.locked {
    opacity: 0.3;
}

.reward-icon {
    font-size: 28px;
    margin-bottom: 5px;
}

.reward-amount {
    font-size: 18px;
    font-weight: bold;
    color: #4ecdc4;
}

.reward-label {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    margin-top: 5px;
}

.reward-day-large {
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.reward-day-large .reward-icon {
    font-size: 40px;
}

.reward-day-large .reward-amount {
    font-size: 28px;
    color: white;
}

.reward-day-large .reward-label {
    font-size: 16px;
    color: rgba(255,255,255,0.9);
    font-weight: bold;
}

.next-reward-info {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    margin: 20px 0;
}

.claim-btn {
    display: block;
    width: 200px;
    margin: 10px auto;
    padding: 15px 30px;
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(180deg, #f39c12, #e67e22);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    animation: pulse 2s infinite;
}

.claim-btn:active {
    transform: scale(0.95);
}

.claim-btn:disabled {
    background: #666;
    animation: none;
    cursor: not-allowed;
}

/* Daily Reward Notification */
#dailyRewardNotification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
}

.notification-content {
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    padding: 15px 25px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.5s ease;
}

.notification-icon {
    font-size: 24px;
}

.notification-text {
    font-size: 16px;
    font-weight: bold;
    color: white;
}

@keyframes slideIn {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Achievement Notification */
.achievement-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 300;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.achievement-notification.show {
    opacity: 1;
}

.achievement-notif-content {
    background: linear-gradient(135deg, #1a1a2e, #2d2d44);
    border: 3px solid #f39c12;
    border-radius: 20px;
    padding: 25px 40px;
    text-align: center;
    box-shadow: 0 0 40px rgba(243, 156, 18, 0.5);
    animation: achievementPop 0.5s ease;
}

@keyframes achievementPop {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.achievement-notif-label {
    display: block;
    font-size: 12px;
    color: #f39c12;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.achievement-notif-icon {
    display: block;
    font-size: 48px;
    margin: 10px 0;
}

.achievement-notif-name {
    display: block;
    font-size: 22px;
    color: #fff;
    font-weight: bold;
    margin-bottom: 5px;
}

.achievement-notif-desc {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* Achievements Panel */
#achievementsPanel {
    background: rgba(0, 0, 0, 0.95);
    z-index: 15;
}

.achievements-content {
    text-align: center;
    padding: 20px;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.achievements-content h2 {
    font-size: 32px;
    color: #f39c12;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.achievements-progress {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.achievement-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
    transition: all 0.3s ease;
}

.achievement-item.unlocked {
    border-color: #f39c12;
    background: rgba(243, 156, 18, 0.1);
}

.achievement-item.locked {
    opacity: 0.5;
}

.achievement-item-icon {
    font-size: 32px;
    width: 50px;
    text-align: center;
}

.achievement-item-info {
    flex: 1;
}

.achievement-item-name {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 3px;
}

.achievement-item-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.achievement-item-progress {
    font-size: 11px;
    color: #4ecdc4;
    margin-top: 5px;
}

.achievements-open-btn {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 12px 25px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 10px;
    transition: transform 0.1s;
}

.achievements-open-btn:active {
    transform: scale(0.95);
}

/* Tutorial Overlay */
#tutorialOverlay {
    background: rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

.tutorial-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.tutorial-step {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 100px;
}

.tutorial-highlight {
    position: absolute;
    border: 3px solid #4ecdc4;
    border-radius: 15px;
    background: rgba(78, 205, 196, 0.2);
    box-shadow: 0 0 30px rgba(78, 205, 196, 0.5);
    pointer-events: none;
    transition: all 0.3s ease;
}

.tutorial-text {
    background: rgba(0, 0, 0, 0.9);
    padding: 20px 30px;
    border-radius: 15px;
    border: 2px solid #4ecdc4;
    max-width: 80%;
    text-align: center;
    margin-bottom: 20px;
    pointer-events: auto;
}

.tutorial-text h3 {
    color: #4ecdc4;
    margin: 0 0 10px 0;
    font-size: 24px;
}

.tutorial-text p {
    color: white;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.tutorial-progress {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.tutorial-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4, #ff6b6b);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.skip-btn {
    position: absolute;
    top: calc(80px + env(safe-area-inset-top));
    right: calc(20px + env(safe-area-inset-right));
    padding: 10px 20px;
    font-size: 14px;
    background: transparent;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 20px;
    color: white;
    cursor: pointer;
    pointer-events: auto;
}

.skip-btn:hover {
    background: rgba(255,255,255,0.1);
}

/* Tutorial Hint */
#tutorialHint {
    position: fixed;
    bottom: 150px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 15px 25px;
    border-radius: 25px;
    border: 2px solid #4ecdc4;
    z-index: 150;
    pointer-events: none;
    animation: fadeIn 0.3s ease;
}

#hintText {
    color: #4ecdc4;
    font-size: 16px;
    font-weight: bold;
}

#tutorialUI {
    position: absolute;
    top: calc(60px + env(safe-area-inset-top));
    right: calc(10px + env(safe-area-inset-right));
    background: #4ecdc4;
    color: #0f0f1a;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

/* Shop Panel */
.shop-open-btn {
    margin-top: 10px;
    padding: 12px 30px;
    font-size: 18px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

#shopPanel {
    background: rgba(0, 0, 0, 0.95);
}

.shop-content {
    text-align: center;
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
}

.shop-content h2 {
    font-size: 32px;
    color: #f39c12;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.shop-gems-display {
    font-size: 22px;
    color: #4ecdc4;
    margin-bottom: 20px;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 500px;
    margin: 0 auto 20px;
}

.shop-item {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.shop-icon {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
}

.shop-name {
    font-size: 14px;
    font-weight: bold;
    color: white;
    margin-bottom: 4px;
}

.shop-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}

.shop-owned {
    font-size: 11px;
    color: #4ecdc4;
    margin-bottom: 8px;
}

.shop-buy-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    min-height: 44px;
}

.shop-buy-btn:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
}

.shop-buy-btn.equipped {
    background: #4ecdc4;
    color: #0f0f1a;
}

.shop-buy-btn.owned {
    background: #555;
    color: #aaa;
}

/* Revive Prompt */
#revivePrompt {
    background: rgba(0, 0, 0, 0.9);
    z-index: 20;
}

.revive-content {
    text-align: center;
}

.revive-content h2 {
    font-size: 48px;
    color: #e74c3c;
    margin-bottom: 10px;
}

.revive-desc {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.revive-timer {
    font-size: 64px;
    font-weight: 900;
    color: #f39c12;
    margin-bottom: 20px;
}

.revive-btn {
    display: block;
    width: 220px;
    margin: 10px auto;
    padding: 15px 30px;
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
}

.revive-btn:active {
    transform: scale(0.95);
}

.new-high-score {
    font-size: 28px;
    font-weight: bold;
    color: #f39c12;
    text-shadow: 0 0 20px rgba(243,156,18,0.8);
    animation: highScorePulse 0.8s ease-in-out infinite alternate;
    margin-bottom: 10px;
}

@keyframes highScorePulse {
    from { transform: scale(1); text-shadow: 0 0 20px rgba(243,156,18,0.5); }
    to { transform: scale(1.1); text-shadow: 0 0 40px rgba(243,156,18,1); }
}

/* Eliminate 300ms tap delay on Android for all interactive elements */
#pauseBtn,
#soundBtn,
#musicBtn,
#settingsBtn,
#dailyRewardsBtn,
.toggle-btn,
.close-btn,
.claim-btn,
.shop-buy-btn,
.shop-open-btn,
.revive-btn,
.skip-btn,
.splash-tap {
    touch-action: manipulation;
}

/* Ammo regen flash */
@keyframes ammo-regen-flash {
    0% { color: #fff; text-shadow: 0 0 8px rgba(255,255,255,0.8); }
    100% { color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }
}

.ammo-flash {
    animation: ammo-regen-flash 0.4s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
