@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@600;700;800&family=Poppins:wght@600;700;800&display=swap');

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f8fafc;
    min-height: 100vh;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.glass-panel-modern {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.glass-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.option-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.option-btn:active {
    transform: translateY(0);
}

.progress-bar-fill {
    transition: width 0.3s ease-in-out;
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

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

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.break-words {
    word-break: break-word;
    overflow-wrap: break-word;
}

.flowlab-text {
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

/* 언어 선택 드롭다운 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.2s ease-out;
}

/* 시작 버튼 그라데이션 애니메이션 */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.start-button-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

.start-button-gradient:hover {
    animation: none;
    background-position: 100% 50%;
}

/* ========================================
   다크 모드 스타일
   ======================================== */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

[data-theme="dark"] .bg-white {
    background-color: var(--bg-card) !important;
}

[data-theme="dark"] .text-slate-800,
[data-theme="dark"] .text-slate-900 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .text-slate-600,
[data-theme="dark"] .text-slate-700 {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .border-slate-200 {
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .bg-slate-50,
[data-theme="dark"] .bg-slate-100 {
    background-color: #334155 !important;
}

[data-theme="dark"] .bg-gradient-to-br.from-slate-50,
[data-theme="dark"] .bg-gradient-to-r.from-slate-50 {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
}

[data-theme="dark"] .bg-gradient-to-br.from-purple-50,
[data-theme="dark"] .bg-gradient-to-br.from-blue-50,
[data-theme="dark"] .bg-gradient-to-br.from-green-50,
[data-theme="dark"] .bg-gradient-to-br.from-orange-50,
[data-theme="dark"] .bg-gradient-to-br.from-pink-50,
[data-theme="dark"] .bg-gradient-to-br.from-indigo-50 {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%) !important;
}

[data-theme="dark"] .option-btn {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

[data-theme="dark"] .option-btn:hover {
    background-color: rgba(139, 92, 246, 0.2) !important;
    border-color: #a855f7 !important;
}

[data-theme="dark"] nav .bg-white\/80 {
    background-color: rgba(30, 41, 59, 0.9) !important;
}

/* 다크 모드 토글 버튼 */
.theme-toggle-btn {
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
}

/* ========================================
   슬라이드 전환 애니메이션
   ======================================== */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

.slide-in {
    animation: slideInRight 0.4s ease-out forwards;
}

.slide-out {
    animation: slideOutLeft 0.3s ease-in forwards;
}

/* ========================================
   로딩 애니메이션
   ======================================== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
    }
    50% { 
        box-shadow: 0 0 40px rgba(168, 85, 247, 0.8);
    }
}

@keyframes bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(168, 85, 247, 0.2);
    border-top-color: #a855f7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* ========================================
   격려 메시지 스타일
   ======================================== */
.encouragement-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    color: white;
    padding: 24px 48px;
    border-radius: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    z-index: 1001;
    animation: bounce-in 0.6s ease-out forwards, fadeOut 0.4s ease-in 2s forwards;
    box-shadow: 0 20px 60px rgba(168, 85, 247, 0.5);
    text-align: center;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* ========================================
   레이더 차트 스타일
   ======================================== */
.radar-chart-container {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 20px;
}

.radar-chart-canvas {
    width: 100%;
    height: auto;
}

/* ========================================
   공유 버튼 스타일
   ======================================== */
.share-buttons-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.share-btn:active {
    transform: translateY(0);
}

.share-btn-kakao {
    background-color: #FEE500;
    color: #3C1E1E;
}

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

.share-btn-copy {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.share-btn-image {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

/* 복사 완료 토스트 */
.copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #10b981;
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    z-index: 1002;
    opacity: 0;
    transition: all 0.3s ease;
}

.copy-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ========================================
   결과 카드 (이미지 생성용)
   ======================================== */
.result-card-for-image {
    width: 400px;
    padding: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    text-align: center;
    color: white;
    position: absolute;
    left: -9999px;
}

.result-card-for-image .title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
}

.result-card-for-image .type-name {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 24px;
}

.result-card-for-image .logo {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 24px;
}

/* ========================================
   진행 상태 저장 배너
   ======================================== */
.resume-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.resume-banner p {
    color: #92400e;
    font-weight: 600;
    margin: 0;
}

.resume-banner button {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.resume-banner .btn-resume {
    background: #f59e0b;
    color: white;
    border: none;
}

.resume-banner .btn-restart {
    background: transparent;
    color: #92400e;
    border: 1px solid #f59e0b;
}

/* ========================================
   선택 피드백 애니메이션
   ======================================== */
@keyframes selectPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.option-btn.selected {
    animation: selectPulse 0.3s ease-out;
    border-color: #a855f7 !important;
    background-color: rgba(168, 85, 247, 0.1) !important;
}

/* ========================================
   통계 표시 스타일
   ======================================== */
.stats-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: #7c3aed;
    font-weight: 500;
    margin-top: 12px;
}

[data-theme="dark"] .stats-badge {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
    color: #c4b5fd;
}
