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

:root {
    --joint-color: #ffffff;
    --limb-color: #ffffff;
    --joint-size: 12px;
    --limb-width: 4px;
}

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

body, html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior: none;
    touch-action: manipulation;
    user-select: none;
}

.font-geist-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

button {
    cursor: pointer;
}

/* Game area opacity transitions */
#level-info, #game-area {
    transition: opacity 0.5s ease-in-out;
}

/* Stickman joint styling */
.joint {
    width: var(--joint-size);
    height: var(--joint-size);
    border-radius: 50%;
    background-color: var(--joint-color);
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: move;
    z-index: 10;
    transition: background-color 0.15s, width 0.15s, height 0.15s;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.joint:hover {
    background-color: #4263eb;
    width: calc(var(--joint-size) + 4px);
    height: calc(var(--joint-size) + 4px);
}

.joint.dragging {
    background-color: #4263eb;
    width: calc(var(--joint-size) + 6px);
    height: calc(var(--joint-size) + 6px);
    box-shadow: 0 0 0 4px rgba(66, 99, 235, 0.2);
}

/* Stickman limb styling */
.limb {
    position: absolute;
    background-color: var(--limb-color);
    height: var(--limb-width);
    transform-origin: 0% 50%;
    border-radius: calc(var(--limb-width) / 2);
    z-index: 5;
}

/* Target stickman styling */
.target-stickman .joint {
    background-color: rgba(255, 255, 255, 0.4);
    cursor: default;
    box-shadow: none;
}

.target-stickman .joint:hover {
    background-color: rgba(255, 255, 255, 0.4);
    width: var(--joint-size);
    height: var(--joint-size);
}

.target-stickman .limb {
    background-color: rgba(255, 255, 255, 0.4);
}

/* Star rating styles */
.star {
    transition: all 0.3s ease;
    color: #6b7280;
}

.star-fill {
    color: #f59f00;
    transform: scale(1.2);
}

/* Timer animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.pulse-animation {
    animation: pulse 1s infinite;
    color: #ef4444;
}

/* Capture button animation */
@keyframes capture-pulse {
    0% { transform: translate(-50%, 0) scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5); }
    50% { transform: translate(-50%, 0) scale(1.05); box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.1); }
    100% { transform: translate(-50%, 0) scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
.capture-highlight {
    animation: capture-pulse 1.5s infinite;
}

/* Modals and overlays */
#level-complete, #game-over {
    display: flex;
    opacity: 0;
    transition: opacity 0.4s ease-out;
    pointer-events: none;
}

#level-complete.active, #game-over.active {
    opacity: 1;
    pointer-events: auto;
}
