:root {
    --bg: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.75);
    --panel-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #f97316;
    --accent-hover: #ea6c0a;
    --font-family: 'Inter', sans-serif;
}

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

body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg);
    font-family: var(--font-family);
    color: var(--text-primary);
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: default;
}

#ui-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 240px;
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent);
}

h1 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

hr {
    border: none;
    height: 1px;
    background-color: var(--panel-border);
    width: 100%;
}

.section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

#total-display {
    font-size: 48px;
    font-weight: 600;
    line-height: 1;
    color: var(--accent);
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.degree-symbol {
    font-size: 28px;
    font-weight: 400;
    color: var(--accent);
    opacity: 0.8;
}

#special-msg {
    font-size: 13px;
    font-weight: 500;
    color: #34d399;
    min-height: 18px;
    transition: opacity 0.3s;
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.text-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 9px 14px;
    color: var(--text-primary);
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    font-size: 14px;
    width: 100%;
    text-align: center;
}

.text-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.2);
}

.text-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.text-btn.primary {
    background: linear-gradient(135deg, var(--accent), #f43f5e);
    border-color: transparent;
    color: white;
    font-weight: 600;
}

.text-btn.primary:hover:not(:disabled) {
    box-shadow: 0 0 16px 4px rgba(249, 115, 22, 0.4);
    background: linear-gradient(135deg, var(--accent-hover), #e11d48);
}

.hint {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    min-height: 18px;
}

/* Scrollbar */
#ui-panel::-webkit-scrollbar {
    width: 4px;
}

#ui-panel::-webkit-scrollbar-track {
    background: transparent;
}

#ui-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
