/* Dash Game Styles */

.dash-game-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-lg);
    background: var(--color-bg);
}

/* Intro Screen */
.dash-game-intro {
    text-align: center;
    max-width: 400px;
}

.dash-game-title {
    font-size: var(--font-size-3xl);
    color: var(--color-primary);
    margin-bottom: var(--space-xl);
}

.dash-game-rewards-preview {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.dash-game-reward-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-md);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    min-width: 100px;
}

.dash-game-reward-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-bottom: var(--space-xs);
}

.dash-game-reward-value {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-primary);
}

.dash-game-instruction {
    font-size: var(--font-size-lg);
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.dash-game-hint {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
}

/* Tutorial Animation */
.dash-game-tutorial {
    position: relative;
    width: 200px;
    height: 100px;
    margin: var(--space-lg) auto;
    background: linear-gradient(180deg, #0a1628 0%, #0e1a30 60%, #141821 60%, #1a1f2e 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.dash-game-tutorial-ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: #1a1f2e;
    border-top: 1px solid var(--color-primary-dark);
}

.dash-game-tutorial-player {
    position: absolute;
    left: 40px;
    bottom: 15px;
    width: 25px;
    height: 25px;
    background: var(--color-primary);
    border-radius: var(--radius-sm);
    animation: tutorial-jump 1.5s ease-in-out infinite;
}

.dash-game-tutorial-obstacle {
    position: absolute;
    right: 30px;
    bottom: 15px;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 20px solid var(--color-error);
}

.dash-game-tutorial-hand {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 32px;
    animation: tutorial-tap 1.5s ease-in-out infinite;
}

@keyframes tutorial-jump {
    0%, 100% { transform: translateY(0); }
    30%, 50% { transform: translateY(-40px); }
}

@keyframes tutorial-tap {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
    20% { transform: translateX(-50%) scale(0.8); opacity: 0.7; }
    30%, 50% { transform: translateX(-50%) scale(1); opacity: 1; }
}

.dash-game-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

/* Game Container */
.dash-game-container {
    width: 100%;
    max-width: 500px;
    height: 300px;
    background: linear-gradient(180deg, #0a1628 0%, #0e1a30 60%, #141821 60%, #1a1f2e 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    touch-action: none;
    user-select: none;
}

.dash-game-hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--space-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.dash-game-progress {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-right: var(--space-md);
}

.dash-game-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-success));
    border-radius: var(--radius-sm);
    transition: width 0.1s linear;
    width: 0%;
}

.dash-game-quit {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-sm);
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    z-index: 20;
    position: relative;
}

/* Tap hint during gameplay */
.dash-game-tap-hint {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    animation: tap-hint-pulse 1s ease-in-out infinite;
    pointer-events: none;
    z-index: 15;
}

.dash-game-tap-icon {
    font-size: 32px;
    animation: tap-hint-bounce 0.6s ease-in-out infinite;
}

@keyframes tap-hint-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes tap-hint-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Active game screen */
.dash-game-screen-active {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    user-select: none;
}

/* Game World */
.dash-game-world {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
}

.dash-game-ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: #1a1f2e;
    border-top: 2px solid;
    border-image: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-secondary)) 1;
}

/* Player */
.dash-game-player {
    position: absolute;
    left: 60px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-sm);
    z-index: 5;
    box-shadow: var(--glow-primary), var(--glow-accent);
}

/* Obstacles Container */
.dash-game-obstacles {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    height: 100px;
}

/* Obstacles */
.dash-game-obstacle {
    position: absolute;
    bottom: 0;
}

.dash-game-obstacle-spike {
    width: 0;
    height: 0;
    background: transparent;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 30px solid var(--color-error);
}

.dash-game-obstacle-block {
    background: #2a3040;
    border-radius: var(--radius-sm);
    border: 1px solid #3a4050;
}

/* Result Screens */
.dash-game-result {
    text-align: center;
    padding: var(--space-xl);
}

.dash-game-result-icon {
    font-size: 80px;
    margin-bottom: var(--space-lg);
    animation: bounce 0.5s ease-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.dash-game-result h1 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-md);
}

.dash-game-result-success h1 {
    background: linear-gradient(135deg, var(--color-success), var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dash-game-result-failure h1 {
    background: linear-gradient(135deg, var(--color-error), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dash-game-result-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
}

.dash-game-rewards-final {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.dash-game-reward-doubled {
    background: var(--color-primary-bg);
    border-color: var(--color-primary);
    animation: pulse 1s ease-in-out infinite;
}

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

.dash-game-reward-doubled .dash-game-reward-value {
    color: var(--color-success);
}

/* Level Badge */
.dash-game-level-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-primary);
}

.dash-game-level-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    text-transform: uppercase;
}

.dash-game-level-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-primary);
}

/* HUD Level Display */
.dash-game-hud-level {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    margin-right: var(--space-sm);
}

.dash-game-hud-level-label {
    font-size: var(--font-size-xs);
    opacity: 0.8;
}

.dash-game-hud-level-value {
    font-size: var(--font-size-md);
    font-weight: 700;
}

/* Ceiling Obstacles */
.dash-game-ceiling-obstacles {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    height: 60px;
}

.dash-game-obstacle-spike-down {
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid var(--color-error);
    border-bottom: none;
}

/* Level Up Notification */
.dash-game-level-up {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    background: linear-gradient(135deg, var(--color-primary-bg), var(--color-accent-bg));
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-md);
    font-weight: 700;
    color: var(--color-accent);
    animation: level-up-pulse 0.5s ease-out;
    box-shadow: var(--glow-accent);
}

.dash-game-level-up-icon {
    font-size: var(--font-size-lg);
}

@keyframes level-up-pulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
