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

:root {
    /* 밝은 하늘색 파스텔 톤 색상 팔레트 */
    --primary-color: #3B82F6;
    --primary-dark: #2563EB;
    --primary-light: #60A5FA;
    --accent-color: #0EA5E9;
    --secondary-color: #06B6D4;
    --tertiary-color: #8DD3C7;
    
    /* 하늘같은 부드러운 배경색 */
    --background-color: #F0F9FF;
    --card-bg-color: #FFFFFF;
    --surface-color: #F8FAFC;
    
    /* 따뜻한 텍스트 색상 */
    --text-color: #1F2937;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    --text-inverse: #FFFFFF;
    
    /* 하늘색 계열 보더 */
    --border-color: #E0F2FE;
    --border-light: #F0F9FF;
    --border-accent: #BAE6FD;
    
    /* 성공/경고 색상 */
    --success-color: #06B6D4;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
    
    /* 하늘색 계열 그림자 */
    --shadow-sm: 0 1px 3px rgba(59, 130, 246, 0.05);
    --shadow-md: 0 4px 12px rgba(59, 130, 246, 0.08);
    --shadow-lg: 0 8px 25px rgba(59, 130, 246, 0.12);
    --shadow-hover: 0 12px 35px rgba(59, 130, 246, 0.15);
    --shadow-colored: 0 8px 25px rgba(59, 130, 246, 0.2);
    
    /* 둥근 모서리 */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    /* 여백 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 50%, #BAE6FD 100%);
    background-attachment: fixed;
    color: var(--text-color);
    margin: 0;
    padding-top: 80px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
}

/* Navbar Styles */
.navbar {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0 var(--spacing-2xl);
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    box-shadow: var(--shadow-sm);
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.2s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    background: var(--border-accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: all 0.3s ease;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
}

.navbar-brand:hover {
    color: var(--primary-dark);
    background: var(--border-accent);
    transform: translateY(-1px);
    text-decoration: none;
}

.nav-logo a {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.2s ease;
}

.nav-logo a:hover {
    color: var(--text-color);
    text-decoration: none;
}

#auth-container {
    display: flex;
    align-items: center;
    gap: 24px;
}


.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-weight: 500;
}

.login-btn, .logout-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--text-inverse);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    border: none;
    cursor: pointer;
}

.login-btn:hover, .logout-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Container & Layout */
.container {
    max-width: 1200px;
    margin: var(--spacing-2xl) auto;
    padding: 0 var(--spacing-xl);
    animation: fadeIn 0.6s ease;
}

/* 현대적인 카드 스타일 */
.card {
    background: var(--card-bg-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--tertiary-color));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

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


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

/* 스크롤 애니메이션 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 스크롤 트리거 애니메이션 클래스 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.slide-left {
    transform: translateX(-50px);
}

.animate-on-scroll.slide-left.animate {
    transform: translateX(0);
}

.animate-on-scroll.slide-right {
    transform: translateX(50px);
}

.animate-on-scroll.slide-right.animate {
    transform: translateX(0);
}

.animate-on-scroll.scale {
    transform: scale(0.8);
}

.animate-on-scroll.scale.animate {
    transform: scale(1);
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-color);
    letter-spacing: -0.03em;
}

/* Card Styles */
.card {
    background: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.card:hover {
    border-color: var(--text-light);
    box-shadow: var(--shadow-md);
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

input[type="text"], textarea {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #f8fafc;
}

input[type="text"]:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

input[type="text"]:hover, textarea:hover {
    border-color: var(--primary-light);
}

textarea { 
    min-height: 180px;
    resize: vertical;
    line-height: 1.6;
}

/* Button Styles */
button {
    background: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    width: 100%;
    transition: all 0.2s ease;
}

button:hover {
    background: var(--primary-dark);
}

button:active {
    transform: scale(0.98);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-actions {
    display: flex;
    gap: 12px;
}

/* Questions Grid */
.questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
}

/* Question Card Styles */
.question {
    position: relative;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.question:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--primary-dark);
}

.question h3 { 
    margin-top: 0;
    color: var(--text-color);
    font-size: 1.3rem;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.question-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.question-content {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.95rem;
}

.question-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.question-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.question:hover .question-actions {
    opacity: 1;
}

.action-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.action-btn.danger:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.action-btn.success {
    border-color: #10b981;
    color: #10b981;
}

.action-btn.warning {
    border-color: #f59e0b;
    color: #f59e0b;
}

.action-btn.danger {
    border-color: #ef4444;
    color: #ef4444;
}

/* 현대적인 버튼 스타일 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--text-inverse);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--surface-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-accent);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #34D399 100%);
    color: var(--text-inverse);
    box-shadow: var(--shadow-sm);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 현대적인 폼 요소 스타일 */
input[type="text"], 
input[type="email"], 
input[type="password"], 
textarea, 
select {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--card-bg-color);
    color: var(--text-color);
    font-family: inherit;
}

input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="password"]:focus, 
textarea:focus, 
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    transform: translateY(-1px);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* 현대적인 라벨 스타일 */
label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

/* 사용자 랭킹 정보 스타일 */
.user-ranking-info {
    margin-top: 24px;
}

.user-ranking-card {
    background: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.user-ranking-card h3 {
    margin: 0 0 16px 0;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.user-ranking-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.ranking-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: var(--background-color);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.ranking-stat .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.ranking-stat .value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Admin Page Styles */
.questions-list, .answers-list {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.list-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 2fr;
    background: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.answers-list .list-header {
    grid-template-columns: 1.5fr 2fr 1fr 1fr 1fr 2fr;
}

.question-list-item, .answer-list-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 2fr;
    border-bottom: 1px solid var(--border-light);
    padding: 16px;
    align-items: center;
    transition: background-color 0.2s ease;
}

.answers-list .answer-list-item {
    grid-template-columns: 1.5fr 2fr 1fr 1fr 1fr 2fr;
}

.question-list-item:hover, .answer-list-item:hover {
    background: var(--background-color);
}

.question-list-item:last-child, .answer-list-item:last-child {
    border-bottom: none;
}

.question-title, .answer-question {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.question-preview, .answer-preview {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.question-author, .answer-author, .answer-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-level {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
}

.question-actions, .answer-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.question-actions .action-btn, .answer-actions .action-btn {
    font-size: 0.75rem;
    padding: 4px 8px;
    min-width: auto;
}

/* 강제 버튼 표시 스타일 */
.question-actions, .answer-actions {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.question-actions .action-btn, .answer-actions .action-btn {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #007bff !important;
    color: white !important;
    border: none !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.question-actions .action-btn:hover, .answer-actions .action-btn:hover {
    background: #0056b3 !important;
    transform: translateY(-1px) !important;
}

.question-actions .action-btn.success, .answer-actions .action-btn.success {
    background: #28a745 !important;
}

.question-actions .action-btn.success:hover, .answer-actions .action-btn.success:hover {
    background: #218838 !important;
}

.question-actions .action-btn.warning, .answer-actions .action-btn.warning {
    background: #ffc107 !important;
    color: #212529 !important;
}

.question-actions .action-btn.warning:hover, .answer-actions .action-btn.warning:hover {
    background: #e0a800 !important;
}

.question-actions .action-btn.danger, .answer-actions .action-btn.danger {
    background: #dc3545 !important;
}

.question-actions .action-btn.danger:hover, .answer-actions .action-btn.danger:hover {
    background: #c82333 !important;
}

/* Answer Styles */
.answers {
    margin-top: 24px;
}

.answers h4 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.answer { 
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-top: 12px;
    border-left: 3px solid var(--primary-color);
    transition: all 0.2s ease;
}

.answer:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.answer strong {
    color: var(--primary-color);
    font-weight: 600;
}

.answer-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed var(--border-color);
}

.answer-form textarea {
    margin-bottom: 12px;
}

.answer-form .submit-answer {
    background: var(--primary-color);
}

.answer-form .submit-answer:hover {
    background: var(--primary-dark);
}

/* Ranking Styles */
#ranking-list { 
    list-style: none;
    padding: 0;
    margin: 0;
}

#ranking-list li { 
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    border-radius: var(--radius-sm);
}

#ranking-list li:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

#ranking-list li:last-child { 
    border-bottom: none;
}

#ranking-list li:nth-child(1) {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #92400e;
    font-weight: 700;
    border: none;
}

#ranking-list li:nth-child(2) {
    background: linear-gradient(135deg, #c0c0c0 0%, #e5e5e5 100%);
    color: #1f2937;
    font-weight: 600;
}

#ranking-list li:nth-child(3) {
    background: linear-gradient(135deg, #cd7f32 0%, #daa06d 100%);
    color: #78350f;
    font-weight: 600;
}

.rank-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state h3 {
    color: var(--text-color);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* Focus Visible for Accessibility */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Improved Link Styles */
a {
    color: var(--primary-color);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: var(--surface-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .navbar {
        padding: 0 20px;
        height: auto;
        min-height: 60px;
        flex-wrap: wrap;
        position: relative;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    #auth-container {
        gap: 8px;
        width: 100%;
        justify-content: space-between;
        margin-top: 8px;
        padding-bottom: 8px;
        display: none;
    }
    
    #auth-container.active {
        display: flex;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg-color);
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        box-shadow: var(--shadow-lg);
        padding: 20px;
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-links {
        gap: 4px;
        flex: 1;
        flex-wrap: wrap;
    }
    
    .nav-links a {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .user-info {
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }
    
    .nav-links a::after {
        display: none;
    }
    
    .container {
        padding: 0 16px;
        margin: 20px auto;
    }
    
    .page-title {
        font-size: 1.75rem;
        margin-bottom: 20px;
    }
    
    .card {
        padding: 20px;
        border-radius: var(--radius-md);
    }
    
    .question h3 {
        font-size: 1.25rem;
    }
    
    .question-meta {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 0.85rem;
    }
    
    .user-info span {
        display: none;
    }
    
    .login-btn, .logout-btn {
        padding: 6px 16px;
        font-size: 0.85rem;
    }
    
    input[type="text"], textarea {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    button {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* Extra Small Screens */
@media (max-width: 480px) {
    body {
        padding-top: 60px;
        font-size: 14px;
    }
    
    .navbar {
        padding: 0 16px;
        min-height: 50px;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .nav-links a {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 6px;
    }
    
    .user-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 16px;
    }
    
    .question h3 {
        font-size: 1.1rem;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.question {
    animation: slideIn 0.4s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Selection Style */
::selection {
    background: var(--primary-light);
    color: white;
}

/* Loading Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    border-left: 4px solid var(--primary-color);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left-color: var(--success-color);
    background: #f0fdf4;
    color: #166534;
}

.toast.error {
    border-left-color: #ef4444;
    background: #fef2f2;
    color: #dc2626;
}

.toast.warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
    color: #d97706;
}

.toast.info {
    border-left-color: #3b82f6;
    background: #eff6ff;
    color: #2563eb;
}

@media (max-width: 768px) {
    .toast {
        left: 20px;
        right: 20px;
        top: 20px;
        max-width: none;
    }
}

/* Stats Badge */
.stats-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Image Upload & Preview */
.secondary-btn {
    background: var(--card-bg-color);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    width: auto;
    display: inline-block;
    margin-bottom: 12px;
}

.secondary-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.image-preview-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: #f8fafc;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item .remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.image-preview-item .remove-image:hover {
    background: rgba(239, 68, 68, 1);
    transform: scale(1.1);
}

/* Image Gallery in Questions/Answers */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.image-gallery img {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.image-gallery img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.image-modal.active {
    display: flex;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.image-modal .close-modal {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-modal .close-modal:hover {
    color: #ccc;
    transform: scale(1.1);
}

/* Floating Action Button (optional enhancement) */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--background-gradient);
    color: white;
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: none; /* Hidden by default, shown via JS when logged in */
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    z-index: 100;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
}

@media (max-width: 768px) {
    .fab {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }
}

/* Better spacing for question meta */
.question-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.modal-header .close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-header .close-modal:hover {
    background: var(--border-light);
    color: var(--text-color);
}

.modal-body {
    padding: 0 24px 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid var(--border-color);
}

.primary-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.primary-btn:hover {
    background: var(--primary-dark);
}

.more-images {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--border-light);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    margin-left: 8px;
}

/* MyPage Styles */
.profile-section {
    margin-bottom: 40px;
}

.profile-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.profile-info {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.profile-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 600;
    flex-shrink: 0;
}

.level-badge {
    position: absolute;
    bottom: -8px;
    right: -8px;
    background: #FFD700;
    color: #333;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}

.profile-details {
    flex: 1;
}

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

.profile-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.level-title {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.profile-details p {
    margin: 0 0 12px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.status-message {
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--border-light);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

.status-message #status-text {
    color: var(--text-color);
    font-style: italic;
    font-size: 0.9rem;
}

/* EXP Progress Bar */
.exp-progress {
    margin-bottom: 24px;
}

.exp-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.exp-label {
    color: var(--text-muted);
}

.exp-current {
    color: var(--primary-color);
    font-weight: 600;
}

.exp-separator {
    color: var(--text-muted);
}

.exp-next {
    color: var(--text-muted);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.exp-to-next {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* 레벨업 애니메이션 */
@keyframes levelUp {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}


/*AI 질문 페이지 스타일*/
.ai-question-header {
    text-align: center;
    margin-bottom: 30px;
}

.ai-question-header .page-title {
    color: var(--text-color);
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.points-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 1px solid #e9ecef;
    color: white;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.points-info::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.points-loading {
    text-align: center;
    color: white;
    font-style: italic;
}

.points-display {
    display: flex;
    align-items: center;
    gap: 20px;
}

.points-current {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    position: relative;
    z-index: 1;
}

.points-icon {
    font-size: 1.6rem;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.points-progress {
    flex: 1;
    position: relative;
    z-index: 1;
}

.points-value {
    font-size: 1.8rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.points-unit {
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.9;
}

.points-progress .progress-bar {
    background: #e9ecef;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.points-progress .progress-fill {
    background: #007bff;
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.points-status {
    font-size: 1rem;
    text-align: center;
    margin-top: 8px;
}

.status-available {
    color: #4ade80;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
    font-size: 1.1rem;
}

.status-needed {
    color: #ffd700;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.status-admin {
    color: #8b5cf6;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
    font-size: 1.1rem;
}

.points-hint {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin-top: 8px;
    font-style: italic;
    position: relative;
    z-index: 1;
}

.ai-question-container {
    max-width: 800px;
    margin: 0 auto;
}

.ai-question-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.ai-info-section {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    color: var(--text-color);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.ai-avatar {
    width: 60px;
    height: 60px;
    background: #007bff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-icon {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.ai-info h2 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.ai-info p {
    margin: 0 0 15px 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.ai-features {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.feature-tag {
    background: #e9ecef;
    color: var(--text-color);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    border: 1px solid #dee2e6;
}

.question-form-section {
    padding: 30px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1rem;
}

#ai-question-input {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#ai-question-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.submit-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.cost-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.image-upload-btn {
    background: #f8f9fa;
    color: var(--text-color);
    border: 1px solid #dee2e6;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.image-upload-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.image-preview {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.image-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-submit-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-submit-btn:hover:not(:disabled) {
    background: #0056b3;
}

.ai-submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.ai-response-section {
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.response-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    color: var(--text-color);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.response-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.clear-btn {
    background: #f8f9fa;
    color: var(--text-color);
    border: 1px solid #dee2e6;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.ai-response {
    padding: 20px;
}

.response-content {
    line-height: 1.6;
    font-size: 1rem;
    color: var(--text-color);
}

.points-guide {
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.points-guide h3 {
    margin: 0 0 25px 0;
    text-align: center;
    color: var(--text-color);
    font-size: 1.5rem;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.guide-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.guide-item:hover {
    transform: translateY(-2px);
}

.guide-icon {
    font-size: 1.5rem;
    font-weight: 600;
    color: #007bff;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e9ecef;
}

.guide-content h4 {
    margin: 0 0 8px 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.guide-content p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.points-loading {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}


/* 랭킹 페이지 스타일 */
.ranking-header {
    text-align: center;
    margin-bottom: 30px;
}

.ranking-header .page-title {
    color: var(--text-color);
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.ranking-header .page-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

.ranking-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 0;
}

.tab-link {
    padding: 12px 24px;
    background: #f8f9fa;
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid #dee2e6;
    border-right: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tab-link:first-child {
    border-radius: 6px 0 0 6px;
}

.tab-link:last-child {
    border-radius: 0 6px 6px 0;
    border-right: 1px solid #dee2e6;
}

.tab-link:hover {
    background: #e9ecef;
}

.tab-link.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.ranking-container {
    max-width: 800px;
    margin: 0 auto;
}

.ranking-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.ranking-list {
    padding: 0;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f1f3f4;
    transition: background 0.2s ease;
}

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

.ranking-item:hover {
    background: #f8f9fa;
}

.ranking-item.top-rank {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
}

.ranking-item.top-rank:hover {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
}

.rank-number {
    width: 60px;
    text-align: center;
    margin-right: 20px;
}

.rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-muted);
}

.medal {
    font-size: 1.2rem;
    font-weight: 700;
    color: #007bff;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.user-level {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.user-value {
    text-align: right;
}

.user-value .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #007bff;
    display: block;
}

.user-value .unit {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.empty-message, .error-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.error-message {
    color: #dc3545;
}

.level-up-animation {
    animation: levelUp 0.6s ease-in-out;
}

/* 레벨업 알림 모달 */
.level-up-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.level-up-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 90%;
    animation: slideUp 0.4s ease;
}

.level-up-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 1s ease infinite;
}

.level-up-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
}

.level-up-message {
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.level-up-badge {
    display: inline-block;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* 신고 관련 스타일 */
.report-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.report-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

.report-btn:active {
    transform: scale(0.95);
}

.report-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.report-modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.report-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.report-modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.report-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.report-close-btn:hover {
    background: #f3f4f6;
    color: var(--text-color);
}

.report-reasons {
    margin-bottom: 20px;
}

.report-reason-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.report-reason-item:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
}

.report-reason-item.selected {
    background: #eff6ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.report-reason-radio {
    margin-right: 12px;
}

.report-reason-text {
    font-weight: 500;
}

.report-description {
    margin-bottom: 20px;
}

.report-description textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    resize: vertical;
    font-family: inherit;
}

.report-description textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.report-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.report-submit-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.report-submit-btn:hover {
    background: #b91c1c;
}

.report-submit-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.question-header h3 {
    flex: 1;
    margin: 0;
}

.question-title-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.answer-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 신고 관리 스타일 */
.report-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.report-info {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.report-type {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.report-reason {
    background: #fff3e0;
    color: #f57c00;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.report-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.report-status .status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.reviewed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-badge.resolved {
    background: #d4edda;
    color: #155724;
}

.status-badge.dismissed {
    background: #f8d7da;
    color: #721c24;
}

.report-details {
    margin-bottom: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.report-reporter {
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.report-description,
.admin-notes {
    margin-bottom: 12px;
}

.report-description p,
.admin-notes p {
    margin: 8px 0 0 0;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
    font-size: 0.9rem;
    line-height: 1.5;
}

.report-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* 신고된 콘텐츠 미리보기 스타일 */
.reported-content-preview {
    margin: 16px 0;
    padding: 16px;
    background-color: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.content-preview {
    margin-top: 8px;
}

.question-preview,
.answer-preview {
    padding: 12px;
    background-color: var(--bg-color);
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.question-preview h4 {
    margin: 0 0 8px 0;
    color: var(--primary-color);
    font-size: 1rem;
}

.question-preview p,
.answer-preview p {
    margin: 0 0 8px 0;
    color: var(--text-color);
    line-height: 1.5;
}

.question-preview small,
.answer-preview small {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.content-preview .error {
    color: var(--error-color);
    font-style: italic;
    margin: 0;
}

.profile-stats {
    display: flex;
    gap: 32px;
}

.profile-stats .stat-item {
    text-align: center;
}

.profile-stats .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.profile-stats .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.points-item::before {
    content: '💎';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1rem;
    opacity: 0.6;
    color: var(--primary-color);
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 32px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    width: auto;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

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

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.count-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* My Questions/Answers */
.my-question-card, .my-answer-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.my-question-card:hover, .my-answer-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.my-question-card h4, .my-answer-card h4 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
}

.my-question-card .content, .my-answer-card .content {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.my-question-card .meta, .my-answer-card .meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.my-question-card .actions, .my-answer-card .actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Responsive for MyPage */
@media (max-width: 768px) {
    .profile-info {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .profile-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .profile-stats {
        gap: 24px;
        justify-content: center;
    }
    
    .tabs {
        overflow-x: auto;
    }
    
    .tab-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .my-question-card, .my-answer-card {
        padding: 20px;
    }
    
    .my-question-card .actions, .my-answer-card .actions {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Question Detail Styles */
.question-detail {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.question-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.question-header h1 {
    margin: 0 0 16px 0;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
}

.question-content-full {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 24px;
}

.answers-section {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.answers-section .section-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-light);
}

.answers-section .section-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.answers-list {
    margin-bottom: 32px;
}

.answer-item {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.answer-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.answer-author {
    font-weight: 600;
    color: var(--primary-color);
}

.answer-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.answer-content {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 16px;
}

.answer-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.answer-form-section {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 24px;
}

.answer-form-section h3 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.answer-form textarea {
    margin-bottom: 16px;
    min-height: 120px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.loading-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive for Question Detail */
@media (max-width: 768px) {
    .question-detail {
        padding: 24px;
    }
    
    .question-header h1 {
        font-size: 1.5rem;
    }
    
    .answers-section {
        padding: 24px;
    }
    
    .answer-item {
        padding: 20px;
    }
    
    .answer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .answer-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .answer-form-section {
        padding: 20px;
    }
}

/* Admin Dashboard Styles */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: block;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-card.warning .stat-number {
    color: #f59e0b;
}

.stat-card.danger .stat-number {
    color: #ef4444;
}

.stat-card.success .stat-number {
    color: #10b981;
}

/* Admin Tables */
.admin-table {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.admin-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.admin-table td {
    color: var(--text-color);
    font-size: 0.9rem;
}

.admin-table tr:hover {
    background: #f8fafc;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.active {
    background: #dcfce7;
    color: #166534;
}

.status-badge.suspended {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.banned {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.hidden {
    background: #f3f4f6;
    color: #374151;
}

/* Role Badges */
.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.role-badge.user {
    background: #e0e7ff;
    color: #3730a3;
}

.role-badge.moderator {
    background: #ddd6fe;
    color: #5b21b6;
}

.role-badge.admin {
    background: #fecaca;
    color: #991b1b;
}

.role-badge.super_admin {
    background: #fed7d7;
    color: #742a2a;
    border: 2px solid #fca5a5;
}

/* Admin Actions */
.admin-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

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

.admin-btn.danger:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.admin-btn.success:hover {
    border-color: #10b981;
    color: #10b981;
}

/* Search and Filter */
.search-box {
    position: relative;
}

.search-box input {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    width: 250px;
}

.filter-buttons {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

/* Admin Modal */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.admin-modal-content {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.admin-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.admin-modal-body {
    padding: 0 24px 24px;
}

.admin-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid var(--border-color);
}

/* Log Entry */
.log-entry {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.log-entry:hover {
    box-shadow: var(--shadow-sm);
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.log-action {
    font-weight: 600;
    color: var(--primary-color);
}

.log-time {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.log-details {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.log-admin {
    color: var(--primary-color);
    font-weight: 500;
}

/* Responsive for Admin */
@media (max-width: 768px) {
    .admin-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-card .stat-number {
        font-size: 1.5rem;
    }
    
    .admin-table {
        overflow-x: auto;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 12px 8px;
        font-size: 0.8rem;
    }
    
    .admin-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    /* Admin List Styles for Mobile */
    .list-header {
        display: none;
    }
    
    .question-list-item, .answer-list-item {
        display: block;
        padding: 16px;
        border-bottom: 1px solid var(--border-light);
    }
    
    .question-title, .answer-question {
        margin-bottom: 8px;
    }
    
    .question-author, .answer-author, .answer-content {
        margin-bottom: 8px;
        font-size: 0.9rem;
    }
    
    .question-actions, .answer-actions {
        margin-top: 12px;
        gap: 6px;
    }
    
    .question-actions .action-btn, .answer-actions .action-btn {
        font-size: 0.7rem;
        padding: 6px 10px;
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: #007bff !important;
        color: white !important;
        border: none !important;
        border-radius: 4px !important;
        font-weight: 500 !important;
        cursor: pointer !important;
        margin: 2px !important;
    }
    
    .search-box input {
        width: 100%;
        max-width: 200px;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Subtle pulse animation for new items */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.new-item {
    animation: pulse 1s ease-in-out;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #3B82F6 0%, #0EA5E9 50%, #06B6D4 100%);
    padding: var(--spacing-3xl) var(--spacing-2xl) var(--spacing-2xl);
    text-align: center;
    border-bottom: 1px solid var(--border-light);
    position: relative;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    margin-bottom: var(--spacing-2xl);
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 구름 배경 - 실제 구름처럼 */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse 400px 200px at 20% 80%, rgba(255, 255, 255, 0.9) 0%, transparent 70%),
        radial-gradient(ellipse 300px 150px at 80% 20%, rgba(255, 255, 255, 0.8) 0%, transparent 70%),
        radial-gradient(ellipse 250px 120px at 60% 60%, rgba(255, 255, 255, 0.7) 0%, transparent 70%),
        radial-gradient(ellipse 200px 100px at 40% 30%, rgba(255, 255, 255, 0.6) 0%, transparent 70%),
        radial-gradient(ellipse 350px 180px at 10% 50%, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
    animation: cloudFloat 20s ease-in-out infinite;
    z-index: 1;
}

/* 추가 구름 레이어 */
.hero::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -30%;
    width: 150%;
    height: 150%;
    background: 
        radial-gradient(ellipse 300px 150px at 30% 70%, rgba(255, 255, 255, 0.7) 0%, transparent 70%),
        radial-gradient(ellipse 200px 100px at 70% 30%, rgba(255, 255, 255, 0.6) 0%, transparent 70%),
        radial-gradient(ellipse 250px 125px at 50% 50%, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
    animation: cloudFloat 25s ease-in-out infinite reverse;
    z-index: 1;
}

/* 구름 떠다니는 애니메이션 */
@keyframes cloudFloat {
    0%, 100% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
    25% {
        transform: translateX(-20px) translateY(-10px) rotate(1deg);
    }
    50% {
        transform: translateX(15px) translateY(-15px) rotate(-1deg);
    }
    75% {
        transform: translateX(-10px) translateY(5px) rotate(0.5deg);
    }
}

/* 히어로 콘텐츠 로딩 애니메이션 - 아래로 내려갔다가 원위치로 */
@keyframes heroSlideUp {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    70% {
        opacity: 0.9;
        transform: translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 히어로 콘텐츠가 구름 위에 표시되도록 */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.15;
    color: white;
    letter-spacing: -0.04em;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: heroSlideUp 1.5s ease-out;
}

.hero-subtitle {
    font-size: 1.15rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    line-height: 1.6;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: heroSlideUp 1.5s ease-out 0.3s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: heroSlideUp 1.5s ease-out 0.6s both;
}

.hero-btn {
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: inline-block;
}

.hero-btn.primary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    font-weight: 600;
}

.hero-btn.primary:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.hero-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.hero-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Features Section */
.features {
    padding: 80px 40px;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 48px;
    color: var(--text-color);
    letter-spacing: -0.03em;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px 28px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-color);
}

.feature-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    filter: grayscale(20%);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
    letter-spacing: -0.02em;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Ad Section */
.ad-section {
    padding: 60px 40px;
    background: #f8fafc;
}

.ad-container {
    max-width: 800px;
    margin: 0 auto;
}

.ad-placeholder {
    background: var(--border-light);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 40px;
    text-align: center;
    color: var(--text-light);
}

.ad-placeholder p {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.ad-placeholder span {
    font-size: 0.85rem;
    opacity: 0.6;
}

/* Stats Section */
.stats-section {
    padding: 80px 40px;
    background: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Responsive for Hero and Features */
@media (max-width: 768px) {
    .hero {
        padding: 60px 20px 50px;
        min-height: 60vh;
    }
    
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .hero-btn {
        width: 100%;
        max-width: 280px;
    }
    
    .features {
        padding: 50px 20px;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .feature-grid {
        gap: 20px;
    }
    
    .ad-section {
        padding: 40px 20px;
    }
    
    .stats-section {
        padding: 50px 20px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

/* Extra Small Screens - Hero */
@media (max-width: 480px) {
    .hero {
        padding: 40px 16px 30px;
        min-height: 50vh;
    }
    
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .hero-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .features {
        padding: 40px 16px;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .feature-card h3 {
        font-size: 1.2rem;
    }
    
    .feature-card p {
        font-size: 0.9rem;
    }
}