/* ==================== CSS Variables ==================== */
:root {
    --primary: #1a1a2e;
    --primary-light: #2d2d4a;
    --accent: #c9a96e;
    --accent-light: #e8d5a8;
    --accent-dark: #a88a4e;
    --text: #2c2c2c;
    --text-light: #666;
    --text-lighter: #999;
    --bg: #f8f6f1;
    --bg-card: #ffffff;
    --bg-dark: #1a1a2e;
    --border: #e8e4dc;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-lg: 20px;
    
    --wood: #2E7D32;
    --wood-bg: #e8f5e9;
    --fire: #C62828;
    --fire-bg: #ffebee;
    --earth: #E65100;
    --earth-bg: #fff3e0;
    --metal: #546E7A;
    --metal-bg: #eceff1;
    --water: #1565C0;
    --water-bg: #e3f2fd;
    
    --impact-red: #c62828;
    --impact-green: #2d5a27;
    --impact-bg: #f5f0e8;
    
    --transition: all 0.3s ease;
}

/* ==================== Reset & Base ==================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* iOS safe-area */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    /* iOS 터치 반응 개선 */
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ==================== Header ==================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(201, 169, 110, 0.3);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.logo-icon {
    font-size: 24px;
    animation: spin 8s linear infinite;
    flex-shrink: 0;
}

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

.logo-text {
    font-family: 'Noto Serif KR', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
    white-space: nowrap;
}

.logo-sub {
    font-size: 10px;
    color: var(--accent-light);
    opacity: 0.7;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.nav-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 8px 0;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

/* ==================== Hero Section ==================== */
.hero-section {
    position: relative;
    padding: 110px 0 50px;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 50%, #1a1a2e 100%);
    text-align: center;
    overflow: hidden;
}

.hero-bg-pattern {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(201, 169, 110, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(201, 169, 110, 0.06) 0%, transparent 50%);
    animation: subtleFloat 20s ease-in-out infinite;
}

@keyframes subtleFloat {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: 'Noto Serif KR', serif;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.4;
}

.hero-title em {
    color: var(--accent);
    font-style: normal;
}

.title-deco {
    color: var(--accent);
    font-size: 20px;
    vertical-align: middle;
    opacity: 0.6;
}

.hero-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    line-height: 1.8;
}

/* ==================== Form Section ==================== */
.form-section {
    margin-top: -24px;
    position: relative;
    z-index: 2;
    padding-bottom: 40px;
}

.form-card {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 28px 20px;
    border: 1px solid var(--border);
}

.form-header {
    text-align: center;
    margin-bottom: 24px;
}

.form-header h2 {
    font-family: 'Noto Serif KR', serif;
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 6px;
}

.form-header h2 i {
    color: var(--accent);
    margin-right: 6px;
}

.form-header p {
    color: var(--text-light);
    font-size: 13px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 6px;
}

.form-group label i {
    color: var(--accent);
    margin-right: 4px;
    width: 14px;
    text-align: center;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    /* iOS 자동 확대 방지: 최소 16px */
    font-size: 16px;
    font-family: 'Noto Sans KR', sans-serif;
    transition: var(--transition);
    background: #fafaf8;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input[type="text"]:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
    background: #fff;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.radio-btn {
    cursor: pointer;
    flex: 1;
    min-width: 0;
}

.radio-btn input {
    display: none;
}

.radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    background: #fafaf8;
    gap: 4px;
    white-space: nowrap;
    /* 터치 최소 크기 보장 */
    min-height: 44px;
}

.radio-btn input:checked + .radio-label {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(201, 169, 110, 0.1), rgba(201, 169, 110, 0.05));
    color: var(--accent-dark);
    font-weight: 600;
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.1);
}

/* Date Inputs */
.date-inputs {
    display: flex;
    gap: 8px;
}

.date-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
}

.date-field select {
    flex: 1;
    min-width: 0;
    padding: 10px 6px;
    border: 2px solid var(--border);
    border-radius: 8px;
    /* iOS 자동 확대 방지 */
    font-size: 16px;
    font-family: 'Noto Sans KR', sans-serif;
    background: #fafaf8;
    cursor: pointer;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 20px;
    min-height: 44px;
}

.date-field select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

.date-unit {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
    flex-shrink: 0;
}

.time-select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Noto Sans KR', sans-serif;
    background: #fafaf8;
    cursor: pointer;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    min-height: 44px;
}

.time-select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    font-family: 'Noto Sans KR', sans-serif;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #3d2d6e);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
    position: relative;
    overflow: hidden;
    min-height: 48px;
    -webkit-appearance: none;
    appearance: none;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    opacity: 0;
    transition: opacity 0.3s;
}

.submit-btn:hover::before {
    opacity: 1;
}

.submit-btn i {
    position: relative;
    z-index: 1;
}

.submit-btn:active {
    transform: scale(0.98);
}

/* ==================== Result Section ==================== */
.result-section {
    padding: 24px 0 40px;
    background: var(--impact-bg);
    animation: fadeInUp 0.6s ease;
}

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

.result-card {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 24px 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.oheng-result-card {
    text-align: center;
}

.result-user-info {
    text-align: center;
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.result-name {
    font-weight: 800;
    font-size: 18px;
    color: var(--primary);
}

/* My Oheng Banner */
.my-oheng-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 24px;
    text-align: left;
}

.my-oheng-banner.oheng-wood { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); }
.my-oheng-banner.oheng-fire { background: linear-gradient(135deg, #ffebee, #ffcdd2); }
.my-oheng-banner.oheng-earth { background: linear-gradient(135deg, #fff3e0, #ffe0b2); }
.my-oheng-banner.oheng-metal { background: linear-gradient(135deg, #eceff1, #cfd8dc); }
.my-oheng-banner.oheng-water { background: linear-gradient(135deg, #e3f2fd, #bbdefb); }

.my-oheng-icon {
    font-size: 40px;
    line-height: 1;
    flex-shrink: 0;
}

.my-oheng-text {
    min-width: 0;
}

.my-oheng-text h3 {
    font-family: 'Noto Serif KR', serif;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    word-break: keep-all;
    line-height: 1.4;
}

.my-oheng-text p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
    word-break: keep-all;
}

/* Oheng Chart */
.oheng-chart-section {
    margin-bottom: 20px;
    text-align: left;
}

.chart-title {
    font-family: 'Noto Serif KR', serif;
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 12px;
    text-align: center;
}

.oheng-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.oheng-bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.oheng-bar-label {
    min-width: 48px;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    white-space: nowrap;
}

.oheng-bar-track {
    flex: 1;
    height: 28px;
    background: #f0ede7;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    min-width: 0;
}

.oheng-bar-fill {
    height: 100%;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    transition: width 1s ease;
}

.oheng-bar-fill.wood { background: linear-gradient(90deg, #43a047, #2E7D32); }
.oheng-bar-fill.fire { background: linear-gradient(90deg, #ef5350, #C62828); }
.oheng-bar-fill.earth { background: linear-gradient(90deg, #ff9800, #E65100); }
.oheng-bar-fill.metal { background: linear-gradient(90deg, #78909c, #546E7A); }
.oheng-bar-fill.water { background: linear-gradient(90deg, #42a5f5, #1565C0); }

.oheng-bar-empty {
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #bbb;
    white-space: nowrap;
}

.oheng-bar-empty strong {
    color: #c62828;
    margin-left: 4px;
}

/* Oheng Detail Grid */
.oheng-detail-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: 0;
}

.oheng-detail-item {
    text-align: center;
    padding: 10px 4px;
    border-radius: 10px;
    border: 2px solid transparent;
    position: relative;
    min-width: 0;
    overflow: visible;
}

.oheng-detail-item.missing {
    border-color: #ff5252;
    background: #fff5f5 !important;
}

.oheng-detail-item.weak {
    border-color: #ffa726;
    background: #fff8f0 !important;
}

.state-badge {
    position: absolute;
    top: -7px;
    right: -2px;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 1;
}

.missing-badge { background: #ff5252; }
.weak-badge { background: #ffa726; }

.oheng-detail-emoji { font-size: 22px; margin-bottom: 1px; }
.oheng-detail-name { font-weight: 700; font-size: 12px; margin-bottom: 1px; }
.oheng-detail-percent { font-size: 15px; font-weight: 800; }
.oheng-detail-count { font-size: 10px; color: var(--text-lighter); }


/* ==================== 임팩트 섹션 ==================== */
.impact-headline {
    font-family: 'Noto Serif KR', serif;
    font-size: 22px;
    font-weight: 900;
    color: var(--impact-red);
    line-height: 1.4;
    margin: 28px 0 20px;
    padding-top: 24px;
    border-top: 2px solid var(--border);
    text-align: center;
    word-break: keep-all;
}

.impact-element {
    display: inline;
    color: var(--impact-red);
    border-bottom: 3px solid var(--impact-red);
    padding-bottom: 2px;
}

.impact-pill {
    display: inline-block;
    background: var(--impact-green);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 22px;
    border-radius: 24px;
    margin: 0 auto 20px;
    letter-spacing: 0.3px;
    text-align: center;
}

.impact-benefits {
    text-align: left;
    max-width: 500px;
    margin: 0 auto 24px;
    padding: 0 4px;
}

.benefit-item {
    font-size: 14px;
    color: var(--text);
    padding: 7px 0;
    line-height: 1.6;
    border-bottom: 1px solid #f0ede7;
    word-break: keep-all;
}

.benefit-item:last-child {
    border-bottom: none;
}


/* ==================== 운세 카드 ==================== */
.fortune-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
    text-align: left;
}

.fortune-card {
    background: #fafaf8;
    border-radius: 14px;
    padding: 20px 16px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.fortune-card:active {
    transform: scale(0.98);
}

.fortune-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.fortune-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.fortune-type {
    font-size: 12px;
    font-weight: 800;
    color: var(--impact-green);
    background: #e8f5e9;
    padding: 3px 12px;
    border-radius: 16px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.fortune-title {
    font-family: 'Noto Serif KR', serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.4;
    word-break: keep-all;
}

.fortune-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.7;
    word-break: keep-all;
}


/* ==================== 기타 부족 오행 박스 ==================== */
.other-missing-box {
    background: #fff8f0;
    border-radius: 14px;
    padding: 20px 16px;
    margin-bottom: 24px;
    text-align: center;
    border: 1px solid #ffe0b2;
}

.other-missing-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.other-missing-items {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.other-missing-tag {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 16px;
}

.other-missing-desc {
    font-size: 13px;
    color: var(--text-light);
    word-break: keep-all;
}


/* ==================== 다시 조회하기 ==================== */
.retry-section {
    text-align: center;
    margin: 20px 0 0;
}

.retry-btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    background: var(--impact-green);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Noto Sans KR', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    min-height: 48px;
    -webkit-appearance: none;
    appearance: none;
}

.retry-btn:active {
    background: #1e4520;
    transform: scale(0.98);
}


/* ==================== 하단 임팩트 문구 ==================== */
.bottom-impact {
    text-align: center;
    padding: 28px 12px 8px;
    margin: 20px 0 0;
    border-top: 2px solid var(--border);
}

.bottom-impact-text {
    font-family: 'Noto Serif KR', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.8;
    word-break: keep-all;
}

.bottom-impact-highlight {
    font-size: 24px;
    font-weight: 900;
    color: var(--impact-red);
    text-decoration: underline;
    -webkit-text-decoration-color: var(--impact-red);
    text-decoration-color: var(--impact-red);
    text-decoration-thickness: 3px;
    text-underline-offset: 5px;
}


/* ==================== About Section ==================== */
.about-section {
    padding: 60px 0;
    background: #fff;
}

.section-title {
    text-align: center;
    font-family: 'Noto Serif KR', serif;
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.title-line {
    display: inline-block;
    width: 30px;
    height: 2px;
    background: var(--accent);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 32px;
}

/* Oheng Intro Grid - 모바일 우선 2열 */
.oheng-intro-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.oheng-intro-card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 20px 12px;
    text-align: center;
    border: 2px solid var(--border);
    transition: var(--transition);
}

.oheng-intro-card:last-child {
    grid-column: 1 / -1;
    max-width: 280px;
    margin: 0 auto;
}

.oheng-intro-card.wood { border-top: 4px solid var(--wood); }
.oheng-intro-card.fire { border-top: 4px solid var(--fire); }
.oheng-intro-card.earth { border-top: 4px solid var(--earth); }
.oheng-intro-card.metal { border-top: 4px solid var(--metal); }
.oheng-intro-card.water { border-top: 4px solid var(--water); }

.oheng-symbol {
    font-size: 32px;
    margin-bottom: 6px;
}

.oheng-intro-card h3 {
    font-family: 'Noto Serif KR', serif;
    font-size: 16px;
    margin-bottom: 2px;
}

.oheng-intro-card h3 span {
    font-size: 11px;
    color: var(--text-lighter);
    font-weight: 400;
}

.oheng-hanja {
    font-family: 'Noto Serif KR', serif;
    font-size: 28px;
    font-weight: 900;
    opacity: 0.1;
    margin: 2px 0;
    line-height: 1;
}

.oheng-season {
    font-size: 11px;
    color: var(--text-lighter);
    margin-bottom: 6px;
}

.oheng-desc {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 8px;
    word-break: keep-all;
}

.oheng-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
}

.oheng-traits span {
    font-size: 10px;
    padding: 2px 6px;
    background: #f5f3ee;
    border-radius: 8px;
    color: var(--text-light);
}


/* ==================== Footer ==================== */
.site-footer {
    background: var(--bg-dark);
    padding: 36px 0 24px;
    color: rgba(255,255,255,0.6);
}

.footer-content {
    text-align: center;
}

.footer-logo {
    font-family: 'Noto Serif KR', serif;
    font-size: 18px;
    color: var(--accent);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.footer-text {
    font-size: 12px;
    line-height: 1.8;
    margin-bottom: 16px;
    word-break: keep-all;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}

.footer-links a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 12px;
    transition: var(--transition);
    padding: 8px 0;
}

.footer-links a:hover {
    color: var(--accent);
}

.copyright {
    font-size: 11px;
    opacity: 0.4;
}

.made-by {
    margin-top: 10px;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.3px;
}
.made-by span {
    color: var(--accent-light);
    font-weight: 600;
}


/* ==================== Loading ==================== */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26, 26, 46, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    font-size: 40px;
    animation: spin 2s linear infinite;
    margin-bottom: 16px;
}

.loading-text {
    color: var(--accent);
    font-size: 15px;
    font-weight: 500;
    animation: pulse 1.5s ease infinite;
}

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


/* ==================== 태블릿 (min-width: 600px) ==================== */
@media (min-width: 600px) {
    .site-header .container {
        height: 60px;
    }
    
    .hero-section {
        padding: 130px 0 60px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 15px;
    }
    
    .form-card {
        padding: 36px 32px;
    }
    
    .form-header h2 {
        font-size: 22px;
    }
    
    .result-card {
        padding: 32px 28px;
    }
    
    .result-name {
        font-size: 20px;
    }
    
    .my-oheng-text h3 {
        font-size: 17px;
    }
    
    .oheng-detail-emoji { font-size: 26px; }
    .oheng-detail-name { font-size: 14px; }
    .oheng-detail-percent { font-size: 18px; }
    .oheng-detail-count { font-size: 11px; }
    
    .oheng-detail-grid {
        gap: 10px;
    }
    
    .oheng-detail-item {
        padding: 14px 8px;
    }
    
    .state-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .impact-headline {
        font-size: 26px;
    }
    
    .impact-pill {
        font-size: 16px;
        padding: 10px 28px;
    }
    
    .fortune-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .fortune-card {
        padding: 24px 20px;
    }
    
    .fortune-title {
        font-size: 17px;
    }
    
    .bottom-impact-text {
        font-size: 22px;
    }
    
    .bottom-impact-highlight {
        font-size: 28px;
    }
    
    .oheng-intro-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .oheng-intro-card:nth-child(4),
    .oheng-intro-card:nth-child(5) {
        max-width: none;
    }
    .oheng-intro-card:last-child {
        grid-column: auto;
        max-width: none;
        margin: 0;
    }
}

/* ==================== PC (min-width: 960px) ==================== */
@media (min-width: 960px) {
    .site-header .container {
        height: 64px;
    }
    
    .logo-icon { font-size: 28px; }
    .logo-text { font-size: 20px; letter-spacing: 2px; }
    .nav-link { font-size: 14px; }
    
    .hero-section {
        padding: 150px 0 70px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .form-card {
        padding: 40px;
    }
    
    .form-header h2 {
        font-size: 24px;
    }
    
    .result-card {
        padding: 36px;
    }
    
    .my-oheng-icon { font-size: 48px; }
    .my-oheng-text h3 { font-size: 20px; }
    .my-oheng-text p { font-size: 14px; }
    
    .oheng-bar-label {
        min-width: 60px;
        font-size: 14px;
    }
    
    .oheng-bar-track { height: 32px; }
    .oheng-bar-fill { font-size: 13px; padding-right: 12px; }
    
    .fortune-card {
        padding: 28px 24px;
    }
    
    .fortune-title {
        font-size: 18px;
    }
    
    .fortune-desc {
        font-size: 14px;
    }
    
    .fortune-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
    }
    
    .retry-btn:hover {
        background: #1e4520;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(45, 90, 39, 0.3);
    }
    
    .oheng-intro-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 16px;
    }
    
    .oheng-intro-card {
        padding: 24px 16px;
    }
    
    .oheng-intro-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }
    
    .oheng-symbol { font-size: 40px; }
    .oheng-intro-card h3 { font-size: 18px; }
    .oheng-hanja { font-size: 36px; }
    .oheng-desc { font-size: 13px; }
    .oheng-traits span { font-size: 11px; }
    
    .about-section {
        padding: 80px 0;
    }
    
    .section-title {
        font-size: 28px;
    }
}

/* ==================== 아주 작은 화면 (max-width: 360px) ==================== */
@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }
    
    .logo-sub {
        display: none;
    }
    
    .hero-title {
        font-size: 22px;
    }
    
    .title-deco {
        display: none;
    }
    
    .form-card {
        padding: 20px 12px;
    }
    
    .radio-label {
        padding: 8px 8px;
        font-size: 13px;
    }
    
    .oheng-detail-grid {
        gap: 3px;
    }
    
    .oheng-detail-item {
        padding: 8px 2px;
    }
    
    .oheng-detail-emoji { font-size: 18px; }
    .oheng-detail-name { font-size: 10px; }
    .oheng-detail-percent { font-size: 12px; }
    .oheng-detail-count { font-size: 9px; }
    
    .state-badge {
        font-size: 8px;
        padding: 1px 3px;
        top: -6px;
        right: -2px;
    }
    
    .impact-headline {
        font-size: 18px;
    }
    
    .impact-pill {
        font-size: 12px;
        padding: 7px 16px;
    }
    
    .benefit-item {
        font-size: 13px;
    }
    
    .fortune-card {
        padding: 16px 12px;
    }
    
    .fortune-icon { font-size: 20px; }
    .fortune-type { font-size: 11px; }
    .fortune-title { font-size: 14px; }
    .fortune-desc { font-size: 12px; }
    
    .bottom-impact-text {
        font-size: 15px;
    }
    
    .bottom-impact-highlight {
        font-size: 20px;
    }
    
    .oheng-intro-grid {
        grid-template-columns: 1fr;
    }
    
    .oheng-intro-card:last-child {
        max-width: none;
    }
}
