:root {
    --bg-color: #05070f;
    --card-bg: rgba(13, 17, 30, 0.7);
    --gold-color: #fbbf24;
    --gold-glow: rgba(251, 191, 36, 0.3);
    --blue-color: #06b6d4;
    --blue-glow: rgba(6, 182, 212, 0.3);
    --pink-color: #f43f5e;
    --pink-glow: rgba(244, 63, 94, 0.3);
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.08);
    --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    --font-accent: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    font-family: var(--font-sans);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* 배경 우주 별빛 효과 및 백그라운드 오라 */
body::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    top: -200px;
    left: -200px;
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    bottom: -200px;
    right: -200px;
    z-index: -1;
    pointer-events: none;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px),
        radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 40px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
    opacity: 0.25;
    z-index: -1;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 프리미엄 글래스모피즘 카드 */
.card {
    width: 100%;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 36px 28px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
}

/* 공통 뷰 컨트롤 */
.view {
    display: flex;
    flex-direction: column;
    width: 100%;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 1. 랜딩 화면 */
.badge {
    align-self: center;
    background: rgba(251, 191, 36, 0.1);
    color: var(--gold-color);
    border: 1px solid rgba(251, 191, 36, 0.2);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: -0.2px;
}

.logo-title {
    font-family: var(--font-accent);
    font-size: 38px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.logo-title span {
    color: var(--gold-color);
    text-shadow: 0 0 15px var(--gold-glow);
}

.subtitle {
    font-size: 18px;
    text-align: center;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.subtitle strong {
    color: var(--text-primary);
}

/* 랜딩 비교표 */
.comparison-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-bottom: 32px;
}

.comp-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 14px 18px;
}

.comp-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.comp-value {
    font-size: 15px;
    font-weight: 700;
}

.text-gold {
    color: var(--gold-color);
    text-shadow: 0 0 10px var(--gold-glow);
}

.text-blue {
    color: var(--blue-color);
    text-shadow: 0 0 10px var(--blue-glow);
}

.text-pink {
    color: var(--pink-color);
    text-shadow: 0 0 10px var(--pink-glow);
}

/* 2. 버튼 양식 */
.btn {
    width: 100%;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.primary-btn {
    background: linear-gradient(135deg, var(--gold-color), #f59e0b);
    color: #0b0d19;
    box-shadow: 0 4px 20px var(--gold-glow);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--gold-glow);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.text-btn {
    background: transparent;
    color: var(--text-secondary);
}

.text-btn:hover {
    color: var(--text-primary);
}

.anonymous-note {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 16px;
}

/* 3. 입력 폼 */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    margin-bottom: 28px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gold-color);
    border-radius: 100px;
    transition: width 0.3s ease;
}

.form-step {
    display: none;
    flex-direction: column;
}

.form-step.active {
    display: flex;
}

h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.form-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.input-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-sans);
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

select:focus {
    border-color: var(--gold-color);
    box-shadow: 0 0 10px var(--gold-glow);
}

select option {
    background-color: #0d111e;
    color: var(--text-primary);
}

.money-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 28px;
}

input[type="number"] {
    width: 100%;
    padding: 16px 64px 16px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 700;
    outline: none;
    font-family: var(--font-accent);
    transition: all 0.2s ease;
}

input[type="number"]:focus {
    border-color: var(--gold-color);
    box-shadow: 0 0 10px var(--gold-glow);
}

/* 스피너 제거 */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.unit {
    position: absolute;
    right: 20px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
}

.btn-group {
    display: flex;
    gap: 12px;
}

.btn-group .btn {
    flex: 1;
}

/* 4. 로딩 화면 */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px stroke var(--gold-color);
    border: 4px solid rgba(255, 255, 255, 0.05);
    border-top-color: var(--gold-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-text {
    font-size: 15px;
    color: var(--text-secondary);
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* 5. 결과 화면 */
.result-title {
    font-size: 22px;
    text-align: center;
    margin-bottom: 24px;
}

.gauge-container {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.gauge-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px;
}

.gauge-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.gauge-visual {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 12px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.6s ease-in-out;
    stroke-linecap: round;
}



.gauge-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.gauge-subtitle strong {
    font-size: 15px;
    color: var(--text-primary);
    font-family: var(--font-accent);
}

.gauge-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-accent);
    font-size: 19px;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.gauge-number span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    margin-bottom: -1px;
}

/* 피어그룹 비교 카드 */
.peer-card {
    margin-bottom: 20px;
}

.peer-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: block;
}

.peer-grid {
    display: flex;
    gap: 12px;
}

.peer-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 12px;
    align-items: center;
    gap: 4px;
}

.peer-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.peer-val {
    font-family: var(--font-accent);
    font-size: 16px;
    font-weight: 800;
}

/* 성과급 계급 영웅(Hero) 카드 */
.hero-tier-card {
    margin-bottom: 28px;
    border-width: 2.5px !important;
    padding: 32px 24px;
    text-align: center;
    position: relative;
    background: rgba(13, 17, 30, 0.95);
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
    animation: popIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popIn {
    from {
        transform: scale(0.94);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.tier-badge-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.hero-tier-card .tier-name {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
    font-family: var(--font-accent), var(--font-sans);
    transition: color 0.5s ease, text-shadow 0.5s ease;
    word-break: keep-all;
}

.hero-tier-card .tier-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #e2e8f0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 16px;
    border-left: 4px solid var(--gold-color);
    text-align: left;
    transition: border-color 0.5s ease;
    word-break: keep-all;
}

.hero-tier-card .tier-tip {
    font-size: 12.5px;
    line-height: 1.5;
    color: #a3a3a3;
    background: rgba(255, 255, 255, 0.015);
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.06);
    text-align: left;
    display: block;
    word-break: keep-all;
    transition: border-color 0.5s ease;
}

.validation-note {
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-secondary);
    margin-bottom: 24px;
    text-align: center;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-btn {
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.2);
    background: linear-gradient(135deg, var(--blue-color), #2563eb);
    color: #fff;
}

.share-btn:hover {
    box-shadow: 0 6px 24px rgba(6, 182, 212, 0.35);
}

/* 푸터 */
.footer {
    margin-top: 24px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.2);
    text-align: center;
}

/* 반응형 모바일 조정 */
@media (max-width: 480px) {
    .card {
        padding: 28px 20px;
    }
    
    .gauge-container {
        flex-direction: column;
        gap: 16px;
    }
    
    .gauge-box {
        padding: 16px;
    }
}
