/* Mobile-first styles for Duet Clone */

:root {
    --color-bg: #1a1a2e;
    --color-bg-dark: #0f0f1a;
    --color-ball-red: #E74C3C;
    --color-ball-blue: #3498DB;
    --color-obstacle: #ECF0F1;
    --color-trail-red: rgba(231, 76, 60, 0.3);
    --color-trail-blue: rgba(52, 152, 219, 0.3);
    --color-text: #FFFFFF;
    --color-overlay: rgba(0, 0, 0, 0.7);
}

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

html, body {
    width: 100%;
    height: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--color-bg-dark);
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}

/* Share button */
.share-btn {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 160px;
    min-height: 48px;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    background: linear-gradient(135deg, var(--color-ball-red), var(--color-ball-blue));
    border: none;
    border-radius: 24px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    z-index: 100;
    transition: transform 0.2s, opacity 0.2s;
}

.share-btn:active {
    transform: translateX(-50%) scale(0.95);
}

.share-btn.hidden {
    display: none;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a2e;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 200;
    animation: fadeInOut 2s ease-in-out forwards;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    15% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    85% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Prevent pull-to-refresh and bounce */
body {
    overscroll-behavior: none;
}

/* Tablet and desktop adjustments */
@media (min-width: 768px) {
    .share-btn {
        bottom: 100px;
        min-width: 200px;
        font-size: 18px;
    }
}
