/* css/components.css - 헤더, 푸터, 버튼, 카드 컴포넌트 스타일 */

/* ===== 버튼 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-btn);
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.6);
}

.btn-outline {
    background: transparent;
    color: var(--purple-light);
    border: 1.5px solid rgba(139, 92, 246, 0.4);
}

.btn-outline:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--purple-primary);
    transform: translateY(-2px);
}

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

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
}

/* ===== 헤더 ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    cursor: pointer;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--grad-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.logo-text {
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.12);
}

.nav-link.active {
    color: var(--purple-light);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    padding: 0.5rem;
    cursor: pointer;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 20, 0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1rem;
        gap: 0.25rem;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
    }

    .nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 0.75rem;
    }
}

/* ===== 푸터 ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.75rem;
    max-width: 240px;
    line-height: 1.7;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
}

.footer-link:hover {
    color: var(--purple-light);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: var(--transition);
    cursor: pointer;
}

.footer-legal a:hover {
    color: var(--purple-light);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 테스트 카드 ===== */
.test-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.test-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-card);
    opacity: 0;
    transition: var(--transition);
}

.test-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}

.test-card:hover::before {
    opacity: 1;
}

.test-card-emoji {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.test-card-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--purple-light);
    margin-bottom: 0.5rem;
}

.test-card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.test-card-tagline {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.test-card-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.test-card-stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.test-card-stat .icon {
    font-size: 0.9rem;
}

/* ===== 아티클 카드 ===== */
.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 1.75rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    gap: 1.25rem;
}

.article-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
}

.article-card-emoji {
    font-size: 2rem;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.article-card-content {
    flex: 1;
}

.article-card-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--indigo);
    margin-bottom: 0.4rem;
}

.article-card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.article-card-summary {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.article-card-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== 배지 ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-purple {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple-light);
}

.badge-indigo {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.badge-pink {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
}

/* ===== 결과 카드 ===== */
.result-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(99, 102, 241, 0.08));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
}

.result-emoji {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.result-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.result-description {
    color: var(--text-secondary);
    line-height: 1.8;
    text-align: left;
    white-space: pre-line;
}

/* ===== 진행 표시 바 ===== */
.progress-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--grad-primary);
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* ===== 탭 ===== */
.tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

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

.tab-btn.active {
    background: rgba(139, 92, 246, 0.2);
    color: var(--purple-light);
    border-color: rgba(139, 92, 246, 0.4);
}

/* ===== 공유 버튼 ===== */
.share-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.share-btn-twitter {
    background: #1da1f2;
    color: white;
}

.share-btn-twitter:hover {
    background: #1a8cd8;
    transform: translateY(-2px);
}

.share-btn-copy {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.share-btn-copy:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* ===== 히어로 ===== */
.hero {
    padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 7vw, 6rem);
    text-align: center;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--purple-light);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 7vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.hero-stat-num {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* ===== 카테고리 칩 ===== */
.category-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.category-chip:hover {
    border-color: var(--border-hover);
    background: rgba(139, 92, 246, 0.08);
    transform: translateY(-2px);
}

.category-chip.active {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(139, 92, 246, 0.12);
}

.category-chip-icon {
    font-size: 1.5rem;
}

.category-chip-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.category-chip.active .category-chip-label {
    color: var(--purple-light);
}

/* ===== 빈 상태 ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* ===== 폼 ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 0.85rem 1.1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--purple-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

textarea.form-input {
    min-height: 140px;
    resize: vertical;
}

/* ===== 구분선 ===== */
.divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}