:root {
    --bg-paper: #FDFBF7;
    --color-ink: #2C3E50;
    --color-gold: #FFD700;
    --color-accent: #FF6B6B;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-paper);
    /* Simple paper texture pattern */
    background-image: radial-gradient(#E5E5E5 1px, transparent 1px);
    background-size: 20px 20px;
    font-family: 'Fredoka', sans-serif;
    user-select: none;
    touch-action: none;
}

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

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    text-decoration: none;
    font-size: 1.5rem;
    background: white;
    padding: 10px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.ui-layer {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 15px;
}

.action-btn {
    background: white;
    border: 2px solid #EEE;
    padding: 10px 20px;
    border-radius: 20px;
    font-family: inherit;
    font-size: 1.2rem;
    color: var(--color-ink);
    cursor: pointer;
    box-shadow: 0 4px 0 #EEE;
    transition: all 0.1s;
}

.action-btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #EEE;
}

#next-btn {
    background: var(--color-accent);
    color: white;
    border-color: #EE5A5A;
    box-shadow: 0 4px 0 #D64545;
}

#next-btn:active {
    box-shadow: 0 0 0 #D64545;
}

#canvas-wrapper {
    position: relative;
    width: 90vmin;
    height: 90vmin;
    max-width: 600px;
    max-height: 600px;
}

#target-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#draw-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    cursor: crosshair;
}

/* Success Animation */
@keyframes fillUp {
    from { fill-opacity: 0; stroke-dashoffset: 1000; }
    to { fill-opacity: 1; stroke-dashoffset: 0; }
}

.filled {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0.5; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

#feedback-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s;
}

#feedback-overlay.show {
    opacity: 1;
}

#star-burst {
    font-size: 8rem;
    animation: rotate 3s infinite linear;
}

#item-name {
    font-size: 3rem;
    color: var(--color-ink);
    text-shadow: 2px 2px 0 white;
    font-weight: bold;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
