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

:root {
    --bg-gradient: linear-gradient(135deg, #0f1026 0%, #1a1635 50%, #2c1b4d 100%);
    --card-bg: rgba(30, 26, 56, 0.75);
    --card-border: rgba(255, 255, 255, 0.15);
    --accent-color: #a881ff;
    --accent-glow: 0 0 20px rgba(168, 129, 255, 0.5);
    --text-primary: #ffffff;
    --text-secondary: #c2b9d8;
}

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

body {
    font-family: 'Pretendard', 'Outfit', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 15px;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

/* 1. 모든 중앙 정렬 글자 단어 중간 지점 줄바꿈 (Text Balance & Keep-All) */
h1, h2, h3, h4, h5, p, .question-text, .intro-text, .job-title, .job-subtitle, .gate-title, .gate-desc, .loading-text, .loading-subtext {
    word-break: keep-all;
    overflow-wrap: break-word;
    text-wrap: balance;
    text-align: center;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 25px;
}

.title-sub {
    font-size: 0.9rem;
    color: var(--accent-color);
    letter-spacing: 2px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.title-main {
    font-family: 'Cinzel', 'Pretendard', serif;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    line-height: 1.35;
}

/* Glass Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 30px 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

/* Intro Section */
.intro-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.cta-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #8a4fff 0%, #b86bff 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--accent-glow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    word-break: keep-all;
    text-align: center;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(184, 107, 255, 0.8);
}

/* Quiz Section */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #8a4fff, #f081ff);
    width: 20%;
    transition: width 0.4s ease;
}

.question-text {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 25px;
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.4;
    word-break: keep-all;
}

.option-btn:hover {
    background: rgba(168, 129, 255, 0.2);
    border-color: var(--accent-color);
    transform: translateX(4px);
}

/* Loading Section */
.loading-box {
    text-align: center;
    padding: 40px 10px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin: 0 auto 20px auto;
}

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

.loading-text {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.loading-subtext {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Result Card */
.result-header {
    text-align: center;
    margin-bottom: 20px;
}

.job-badge {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(168, 129, 255, 0.2);
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #d8c4ff;
    margin-bottom: 10px;
}

.job-title {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.job-subtitle {
    font-size: 1rem;
    color: #e2a9ff;
    font-weight: 400;
}

.result-image-box {
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.result-image-box img {
    width: 100%;
    height: auto;
    display: block;
}

.job-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.stat-item {
    background: rgba(0,0,0,0.3);
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-size: 0.85rem;
    color: #aaa;
}

.stat-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-color);
}

.hashtags {
    color: #f081ff;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Coupang Click Gate Section */
.premium-gate-card {
    background: linear-gradient(135deg, rgba(45, 20, 80, 0.9), rgba(20, 30, 70, 0.9));
    border: 2px solid #f081ff;
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 0 30px rgba(240, 129, 255, 0.3);
}

.gate-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.gate-desc {
    font-size: 1rem;
    color: #dcdcdc;
    margin-bottom: 25px;
    line-height: 1.6;
}

.coupang-click-btn {
    width: 100%;
    padding: 18px 14px;
    background: linear-gradient(135deg, #ff3f3f 0%, #ff781f 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 90, 30, 0.6);
    transition: transform 0.2s;
    animation: pulse 2s infinite;
    word-break: keep-all;
    line-height: 1.35;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* Novel Section */
.novel-box {
    background: rgba(15, 12, 30, 0.9);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    text-align: left;
    font-family: 'Pretendard', serif;
    line-height: 1.85;
    color: #eaeAEA;
    white-space: pre-line;
    word-break: keep-all;
    font-size: 1rem;
}

/* PDF Mode for html2canvas */
.pdf-mode {
    background: #ffffff !important;
    color: #111111 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 40px !important;
}

.pdf-mode * {
    color: #111111 !important;
    text-shadow: none !important;
}

.pdf-mode .job-badge {
    background: #f0f0f0 !important;
    border-color: #333 !important;
}

.pdf-mode .stat-item {
    background: #f9f9f9 !important;
    border-color: #ddd !important;
}

/* Ad Containers */
.ad-container {
    width: 100%;
    margin: 20px 0;
    text-align: center;
    overflow: hidden;
}

.hidden {
    display: none !important;
}
