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

:root {
    --bg-color: #ffffff; /* Pure white to match logo */
    --stone-color: #94a3b8;
    --accent-color: #b59a5d;
    --text-color: #0f172a;
    --glass-bg: rgba(0, 0, 0, 0.05);
    --glass-border: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas {
    display: block;
    cursor: crosshair;
}

#logo-container {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 10;
    pointer-events: none;
}

#logo-container img {
    height: 200px;
    display: block;
    mix-blend-mode: multiply;
}

@media (max-width: 768px) {
    #logo-container {
        top: 1rem;
        right: 1rem;
    }
    #logo-container img {
        height: 100px;
    }
    #ui {
        bottom: 4rem;
        left: 1rem;
    }
    footer {
        left: 1rem;
        bottom: 1rem;
    }
    #ui {
        top: 0.5rem;
        left: 50%;
        transform: translateX(-50%);
        bottom: auto;
        text-align: center;
    }
    footer {
        left: 1.5rem;
        top: 1rem;
        bottom: auto;
    }
    .score-card {
        padding: 0;
        background: none !important;
        backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
        border-top: none !important;
    }
    .score-label {
        display: none;
    }
    .score-value {
        font-size: 2rem;
        opacity: 0.2; /* Very subtle water-mark style */
        font-weight: 300;
    }
    #game-over {
        width: 100%;
        height: 100%;
        border-radius: 0;
        padding: 2rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}

#ui {
    position: absolute;
    bottom: 4.5rem; /* Above the impressum link */
    left: 2rem;
    pointer-events: none;
    z-index: 10;
}

.score-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border-top: 2px solid var(--accent-color); /* Added gold accent top border */
}

.score-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
    margin-bottom: 0.25rem;
}

.score-value {
    font-size: 2.5rem;
    font-weight: 600;
}

#game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 2rem;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100;
}

#game-over.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.final-score {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

button {
    background: var(--text-color);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

button:hover {
    transform: translateY(-2px);
    background: var(--accent-color);
}

/* Animations & Surprises */
.hint {
    position: absolute;
    top: 40%; /* Slightly above center to not be behind the first stone */
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.25rem;
    text-align: center;
    width: 80%;
    opacity: 0.6;
    animation: pulse 2s infinite;
    color: var(--text-color);
    z-index: 100;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

body.surprise {
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%) !important;
    transition: background 2s;
}

/* Footer & Modal */
footer {
    position: absolute;
    bottom: 1.5rem;
    left: 2rem;
    z-index: 100;
}

#impressum-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.8rem;
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    transition: all 0.2s;
}

#impressum-link:hover {
    opacity: 1;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#impressum-link:hover {
    opacity: 1;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 1.5rem;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    color: #0f172a;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
}

.close-modal:hover {
    opacity: 1;
}

#surprise-msg {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    font-weight: 600;
    color: #b59a5d;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.5s;
}

#surprise-msg.visible {
    opacity: 1;
}
