html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', Courier, monospace;
    background: #f0ece3;
    color: #1a1a1a;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 24px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-title {
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #8a7a6a;
    margin-bottom: 32px;
    border-bottom: 1px solid #c4b9a8;
    padding-bottom: 12px;
    width: 100%;
    text-align: center;
}

.score-block {
    text-align: center;
    margin-bottom: 20px;
}

.score-label {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #8a7a6a;
}

.score-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

#score {
    display: inline;
    font-size: 48px;
    font-weight: bold;
    color: #4a3728;
    line-height: 1;
    margin-top: 4px;
    transition: transform 0.05s;
}

#score.pop {
    transform: scale(1.08);
}

.score-max {
    font-size: 13px;
    color: #8a7a6a;
}

#target {
    cursor: pointer;
    width: 300px;
    height: 300px;
    object-fit: contain;
    display: block;
    margin: 0 auto 28px;
    transition: transform 0.08s;
    user-select: none;
}

#target:active {
    transform: scale(0.93);
}

.shop {
    width: 100%;
    border: 1px solid #c4b9a8;
    padding: 18px 20px;
    margin-top: 4px;
}

.shop-title {
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #8a7a6a;
    margin-bottom: 14px;
}

.shop-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

#auto-btn {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    background: #e0d8cc;
    border: 1px solid #c4b9a8;
    color: #1a1a1a;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.15s;
    flex: 1;
    min-width: 180px;
    text-align: left;
}

#auto-btn:hover {
    background: #ccc3b5;
}

#auto-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.auto-count {
    font-size: 11px;
    color: #8a7a6a;
    white-space: nowrap;
}

.auto-count span {
    color: #4a3728;
    font-weight: bold;
}

.hint {
    font-size: 10px;
    color: #8a7a6a;
    margin-top: 24px;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

#win-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0,0,0,0.85);
    z-index: 100;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 12px;
}

#win-overlay.show {
    display: flex;
    animation: fadeIn 0.6s ease forwards;
}

#win-overlay p {
    font-family: 'Courier New', Courier, monospace;
    color: #fff;
    font-size: 32px;
    text-align: center;
    padding: 0 20px;
    line-height: 1.5;
}

#win-overlay .sub {
    font-size: 16px;
    color: #aaa;
}

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

/* CURSED SCREEN */
body.cursed {
    background: #000;
}

#cursed-screen {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: #000;
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

body.cursed #cursed-screen {
    display: flex;
}

#cursed-img {
    width: 300px;
    max-width: 80vw;
    opacity: 0;
    transition: opacity 3s ease;
    cursor: default;
}

#cursed-img.visible {
    opacity: 1;
}

#cursed-img.clickable {
    cursor: pointer;
}

#cursed-text {
    text-align: center;
    min-height: 80px;
}

.line1 {
    font-family: 'Courier New', Courier, monospace;
    color: #ccc;
    font-size: 22px;
    display: block;
    margin-bottom: 14px;
    min-height: 1.2em;
}

.line2 {
    font-family: 'Courier New', Courier, monospace;
    color: #666;
    font-size: 16px;
    display: block;
    min-height: 1.2em;
}