@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700&display=swap');

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

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    font-family: 'Outfit', 'Segoe UI', sans-serif;
    overflow: hidden;
}

/* Subtle animated background particles */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.15), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(255,255,255,0.1),  transparent),
        radial-gradient(1px 1px at 60% 20%, rgba(255,255,255,0.12), transparent),
        radial-gradient(1px 1px at 80% 50%, rgba(255,255,255,0.08), transparent),
        radial-gradient(2px 2px at 10% 80%, rgba(255,255,255,0.1),  transparent),
        radial-gradient(1px 1px at 90% 10%, rgba(255,255,255,0.12), transparent);
    animation: drift 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes drift {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-40px); }
}

#game-container {
    position: relative;
    z-index: 1;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 0 40px rgba(100, 120, 255, 0.25),
        0 20px 60px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#game-container:hover {
    transform: translateY(-4px);
    box-shadow:
        0 0 60px rgba(100, 120, 255, 0.35),
        0 30px 80px rgba(0, 0, 0, 0.7),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

canvas {
    display: block;
    touch-action: manipulation;
    cursor: pointer;
}

/* ── Score Sync Modal (Google OAuth style) ── */
#score-sync {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sc-card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 40px 36px 28px;
    width: 360px;
    max-width: 90vw;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    animation: slideUp 0.35s ease;
}

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

.sc-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    color: #5f6368;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.sc-close:hover {
    background: #f1f3f4;
}

.sc-logo {
    text-align: center;
    margin-bottom: 16px;
}

.sc-title {
    text-align: center;
    font-size: 24px;
    font-weight: 400;
    color: #202124;
    margin: 0 0 4px;
}

.sc-subtitle {
    text-align: center;
    font-size: 14px;
    color: #5f6368;
    margin: 0 0 24px;
}

.sc-field {
    margin-bottom: 16px;
}

.sc-field input {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 1px solid #dadce0;
    border-radius: 6px;
    outline: none;
    color: #202124;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.sc-field input:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.sc-btn {
    width: 100%;
    padding: 12px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 8px;
    font-family: inherit;
    transition: background 0.2s, box-shadow 0.2s;
}

.sc-btn:hover {
    background: #1557b0;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.sc-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: #5f6368;
}

.sc-footer a {
    color: #5f6368;
    text-decoration: none;
}

.sc-footer a:hover {
    color: #202124;
}

.sc-footer span {
    margin: 0 6px;
}

