/* INNOPARD Snake - Footer Game Styles */

/* Canvas overlay in footer */
.snake-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.snake-canvas.active {
    pointer-events: auto;
    opacity: 1;
}

/* Footer modifications for game */
.footer {
    position: relative;
}

.footer.snake-active {
    min-height: 400px;
}

/* Hide footer content during game */
.footer-content.snake-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Snake UI overlay */
.snake-ui {
    position: absolute;
    top: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.snake-ui.active {
    opacity: 1;
}

.snake-score-display {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.snake-score-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.snake-score-value {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    min-width: 40px;
}

.snake-hint {
    font-size: 0.7rem;
    color: rgba(236, 72, 153, 0.6);
    background: none;
    border: none;
    padding: 0;
}

/* Preview canvas inside footer (behind content) */
.snake-preview-canvas {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: 400px;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.snake-preview-canvas.visible {
    opacity: 1;
}

/* Footer as container during pull */
.footer {
    overflow: hidden;
    position: relative;
}

.footer.pull-active {
    /* Keep same background as normal footer */
}

/* Footer content transition for curtain effect */
.footer-content {
    position: relative;
    z-index: 5;
    transition: transform 0.1s ease-out;
}

.footer.pull-active .footer-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background: var(--color-surface);
    z-index: -1;
}

/* Pull-to-play indicator */
.snake-pull-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 100;
}

.snake-pull-indicator.visible {
    opacity: 1;
}

/* Progress bar */
.snake-pull-progress-bar {
    width: 120px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.snake-pull-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 2px;
    transition: width 0.1s ease-out;
}

.snake-pull-indicator.ready .snake-pull-progress-fill {
    background: var(--color-secondary);
    box-shadow: 0 0 10px var(--color-secondary);
}

.snake-pull-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-align: center;
    transition: color 0.2s ease;
}

.snake-pull-indicator.ready .snake-pull-text {
    color: var(--color-secondary);
}

.snake-pull-indicator.triggered {
    animation: pullTrigger 0.3s ease forwards;
}

@keyframes pullTrigger {
    0% { transform: translateX(-50%) scale(1); opacity: 1; }
    100% { transform: translateX(-50%) scale(1.5); opacity: 0; }
}

/* Responsive */
@media (max-width: 640px) {
    .snake-ui {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .footer.snake-active {
        min-height: 300px;
    }
}
