/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 기본 HTML 설정 */
html {
    overflow-x: hidden;
    height: 100%;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --dark-bg: #0a0e27;
    --light-bg: #ffffff;
    --text-dark: #1a202c;
    --text-light: #718096;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* Light mode colors (default) */
    --bg-color: #ffffff;
    --bg-secondary: #f7fafc;
    --text-primary: #1a202c;
    --text-secondary: #718096;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.95);
}

/* Dark mode colors */
body.dark-mode {
    --bg-color: #0f1419;
    --bg-secondary: #1a1f2e;
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --border-color: #2d3748;
    --card-bg: #1a1f2e;
    --nav-bg: rgba(15, 20, 25, 0.95);
    --dark-bg: #0f1419;
    background: #0f1419 !important;
    color: #e2e8f0 !important;
    --light-bg: #1a1f2e;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-color);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Dark Mode Toggle Button - Smaller and more subtle */
.dark-mode-toggle {
    background: transparent;
    border: 1px solid rgba(113, 128, 150, 0.3);  /* 더 연한 회색 테두리 */
    border-radius: 50px;
    padding: 4px;
    cursor: pointer !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;  /* 36px → 28px 축소 */
    height: 28px; /* 36px → 28px 축소 */
    transition: all 0.3s ease;
    position: relative;
    margin-left: 10px;
    pointer-events: auto !important;
    z-index: 9999 !important;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.dark-mode-toggle:hover {
    background: rgba(113, 128, 150, 0.1);  /* 연한 회색 배경 */
    border-color: rgba(113, 128, 150, 0.5);
    transform: scale(1.02);  /* 살짝만 확대 */
}

.dark-mode-toggle:hover svg {
    stroke: #4a5568;  /* 진한 회색 */
}

.dark-mode-toggle svg {
    stroke: #718096;  /* 중간 회색 */
    transition: stroke 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;  /* 아이콘도 작게 */
    height: 14px;
}

/* Icon visibility control */
.dark-mode-toggle .sun-icon {
    display: block !important;
}

.dark-mode-toggle .moon-icon {
    display: none !important;
}

body.dark-mode .dark-mode-toggle .sun-icon {
    display: none !important;
}

body.dark-mode .dark-mode-toggle .moon-icon {
    display: block !important;
}

/* Dark mode specific button styling */
body.dark-mode .dark-mode-toggle {
    border-color: rgba(160, 174, 192, 0.2);  /* 다크모드에서 더 연한 테두리 */
}

body.dark-mode .dark-mode-toggle svg {
    stroke: #a0aec0;  /* 다크모드에서 밝은 회색 */
}

body.dark-mode .dark-mode-toggle:hover {
    background: rgba(160, 174, 192, 0.1);
    border-color: rgba(160, 174, 192, 0.3);
}

body.dark-mode .dark-mode-toggle:hover svg {
    stroke: #cbd5e0;  /* 다크모드에서 더 밝은 회색 */
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-cta {
    background: var(--gradient);
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-cta:hover {
    /* transform: translateY(-2px); - 제거됨 */
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.nav-cta::after {
    display: none;
}

.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    z-index: 1002;
    position: relative;
}

.nav-mobile-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-dark);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.animated-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.6;
    /* animation: float 20s infinite ease-in-out; - 제거됨 */
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    bottom: 10%;
    left: 50%;
    animation-delay: 10s;
}

/* @keyframes float - 제거됨
{
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
} */

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
}

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

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-light);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    /* transform: translateY(-3px); - 제거됨 */
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    /* transform: translateY(-3px); - 제거됨 */
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    /* animation: bounce 2s infinite; - 제거됨 */
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    /* animation: scroll 2s infinite; - 제거됨 */
}

/* @keyframes bounce - 제거됨
{
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
} */

/* @keyframes scroll - 제거됨 {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 20px; }
}

/* Features Section */
.features {
    padding: 100px 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

/* AI 검색 섹션의 헤더는 간격 줄이기 */
.ai-search .section-header {
    margin-bottom: 25px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    /* transform: translateY(-10px); - 제거됨 */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* About Section */
.about {
    padding: 100px 0;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.2)), url('./ocean-dark-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.about-content {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.about-text h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.about-text p {
    font-size: 1.125rem;
    color: #f0f0f0;
    line-height: 1.8;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.stat p {
    color: #f0f0f0;
    margin-top: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.visual-card {
    background: white;
    border-radius: 30px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.card-content h4 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
}

.card-content p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Donation Shop Section */
.donation-shop {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin: 60px 0 40px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff4757;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.product-badge.new {
    background: #00b894;
}

.product-badge.hot {
    background: #fdcb6e;
    color: #2d3436;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.product-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.4;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.original-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.btn-donate {
    width: 100%;
    padding: 12px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-donate:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* CTA Section (keeping for backward compatibility) */
.cta {
    padding: 100px 0;
    background: var(--gradient);
    text-align: center;
}

.cta-content h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: white;
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

.cta .btn-primary {
    background: white;
    color: var(--primary-color);
}

.cta .btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

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

/* Blog Posts Section */
.blog-posts {
    padding: 100px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 60px 0 40px;
}

@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.post-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

.post-card:hover {
    /* transform: translateY(-5px); - 제거됨 */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.post-thumbnail {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    overflow: hidden;
    position: relative;
}

.post-content {
    padding: 25px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #6b7280;
}

.post-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-reading-time {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #1f2937;
}

.post-excerpt {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-tag {
    background: #f3f4f6;
    color: #4b5563;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.post-tag:hover {
    background: #667eea;
    color: white;
}

.view-all {
    text-align: center;
    margin-top: 40px;
}

.posts-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.posts-error {
    text-align: center;
    padding: 40px;
    color: #ef4444;
}

/* AI Search Section */
.ai-search {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #f0f4f8 100%);
    position: relative;
}

.search-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

.search-box {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f7fafc;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 4px;
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    left: 20px;
    color: #a0aec0;
    pointer-events: none;
}

.search-input {
    flex: 1;
    padding: 16px 20px 16px 56px;
    border: none;
    background: transparent;
    font-size: 15px;
    outline: none;
    min-width: 0;
}

.search-input::placeholder {
    color: #a0aec0;
}

.search-btn {
    padding: 12px 24px;
    background: var(--gradient);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.search-btn:hover {
    /* transform: translateY(-2px); - 제거됨 */
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* Search Mode Switch Styles */
.search-mode-switch {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin-bottom: 25px;
    margin-top: -5px;
    padding-left: 5px;
}

.switch-label {
    font-size: 15px;
    font-weight: 600;
    color: #a0aec0;
    transition: all 0.3s ease;
}

.switch-label.active {
    color: var(--primary-color);
    font-weight: 700;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
}

.switch input {
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: 1;
    cursor: pointer;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #e2e8f0;
    transition: all 0.3s ease;
    border-radius: 32px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background: var(--gradient);
}

input:checked + .slider:before {
    transform: translateX(28px);
}

.search-hint {
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
    color: #718096;
}

.hint-general, .hint-ai {
    /* animation: fadeIn 0.3s ease; - 제거됨 */
}

/* @keyframes fadeIn - 제거됨
{
    from { opacity: 0; }
    to { opacity: 1; }
} */

/* Dark Mode Styles */
body.dark-mode .switch-label {
    color: var(--text-secondary);
}

body.dark-mode .switch-label.active {
    color: #667eea;
}

body.dark-mode .slider {
    background: #2d3748;
}

body.dark-mode .slider:before {
    background: #e2e8f0;
}

body.dark-mode input:checked + .slider {
    background: var(--gradient);
}

body.dark-mode .search-hint {
    color: var(--text-secondary);
}

.search-options {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    justify-content: center;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.option-label:hover {
    color: var(--primary-color);
}

.option-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.search-results {
    margin-top: 30px;
    max-height: 600px;
    overflow-y: auto;
}

/* Search Result Styles */
.search-summary {
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
}

.result-category {
    margin-bottom: 24px;
}

.result-category h4 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

body.dark-mode .result-category h4 {
    border-bottom-color: var(--border-color);
}

.result-meta {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 8px;
    background: #f7fafc;
    border-radius: 4px;
    font-size: 12px;
    color: #718096;
}

body.dark-mode .result-meta {
    background: var(--bg-color);
    color: var(--text-secondary);
}

.search-result-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.search-result-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.result-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.result-content {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 12px;
}

.result-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #a0aec0;
}

.result-type {
    padding: 4px 12px;
    background: var(--gradient);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.search-loading {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 16px;
    /* animation: spin 1s linear infinite; - 제거됨 */
}

/* @keyframes spin - 제거됨
{
    to { transform: rotate(360deg); }
} */

.search-loading p {
    color: var(--text-light);
    font-size: 16px;
}

/* Donation Modal Styles */
.donation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.donation-modal.active {
    display: flex;
    /* animation: fadeIn 0.3s ease; - 제거됨 */
}

/* @keyframes fadeIn - 제거됨
{
    from { opacity: 0; }
    to { opacity: 1; }
} */

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    /* animation: slideUp 0.3s ease; - 제거됨 */
}

/* @keyframes slideUp - 제거됨
{
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} */

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-header {
    padding: 30px 30px 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
}

.modal-header p {
    color: #666;
    font-size: 14px;
}

.modal-body {
    padding: 30px;
}

.product-summary {
    display: flex;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 25px;
}

.product-summary img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.product-details {
    flex: 1;
}

.product-details h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.product-details p {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
}

.modal-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.purchase-form h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.quantity-section {
    margin: 25px 0;
}

.quantity-section label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 140px;
}

.quantity-control button {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-control button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.quantity-control input {
    width: 60px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px;
    font-size: 16px;
}

.payment-method {
    margin: 25px 0;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-option:hover {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.payment-option input[type="radio"] {
    margin-right: 8px;
}

.payment-option input[type="radio"]:checked + span {
    font-weight: 600;
    color: var(--primary);
}

.total-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: #666;
}

.total-row.total {
    margin-bottom: 0;
    padding-top: 12px;
    border-top: 1px solid #dee2e6;
    font-size: 18px;
    color: #333;
}

.terms-agree {
    margin: 20px 0;
}

.terms-agree label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.terms-agree input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.btn-purchase {
    width: 100%;
    padding: 16px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-purchase:hover {
    /* transform: translateY(-2px); - 제거됨 */
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-purchase:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Dark Mode Support for Modal */
body.dark-mode .modal-content {
    background: var(--card-bg);
    color: var(--text-primary);
}

body.dark-mode .modal-header {
    border-bottom-color: var(--border-color);
}

body.dark-mode .modal-header h2 {
    color: var(--text-primary);
}

body.dark-mode .modal-header p {
    color: var(--text-secondary);
}

body.dark-mode .product-summary {
    border-bottom-color: var(--border-color);
}

body.dark-mode .product-details h3 {
    color: var(--text-primary);
}

body.dark-mode .product-details p {
    color: var(--text-secondary);
}

body.dark-mode .purchase-form h4 {
    color: var(--text-primary);
}

body.dark-mode .form-group label {
    color: var(--text-secondary);
}

body.dark-mode .form-group input {
    background: var(--bg-color);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-mode .quantity-control button {
    background: var(--bg-color);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-mode .quantity-control input {
    background: var(--bg-color);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-mode .payment-option {
    background: var(--bg-color);
    border-color: var(--border-color);
}

body.dark-mode .total-section {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
}

body.dark-mode .total-row {
    color: var(--text-secondary);
}

body.dark-mode .total-row.total {
    color: var(--text-primary);
    border-top-color: var(--border-color);
}

body.dark-mode .terms-agree label {
    color: var(--text-secondary);
}

/* Responsive Design for Modal */
@media (max-width: 640px) {
    .modal-content {
        max-height: 100vh;
        border-radius: 0;
    }

    .donation-modal.active {
        padding: 0;
    }

    .product-summary {
        flex-direction: column;
    }

    .product-summary img {
        width: 100%;
        height: 200px;
    }

    .payment-options {
        grid-template-columns: 1fr;
    }
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: white;
    padding: 50px 0 20px;
}

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

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
}

.footer-column h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        transition: left 0.3s ease;
        display: flex !important;
        gap: 1rem;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #eee;
        width: 100%;
        text-align: left;
        transition: all 0.3s ease;
    }

    .nav-menu .nav-link:hover {
        background: #f5f5f5;
        padding-left: 1.5rem;
    }

    /* 모바일에서 상단 햄버거 메뉴 숨기기 */
    .nav-mobile-toggle {
        display: none !important;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .about-content {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .footer-links {
        justify-content: center;
    }
}

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

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        transition: left 0.3s ease;
        display: flex !important;
        gap: 1rem;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu .nav-link {
        padding: 0.75rem 1rem;
        width: 100%;
        text-align: left;
        border-radius: 8px;
        transition: background 0.2s ease;
        display: block;
    }

    .nav-menu .nav-link:hover {
        background: rgba(102, 126, 234, 0.1);
    }

    .nav-menu .nav-cta {
        background: var(--primary-color);
        color: white;
        text-align: center;
    }

    #logoutBtn {
        width: 100%;
    }

    .search-mode-switch {
        /* transform: scale(0.9); - 제거됨 */
        margin-top: 1rem;
    }

    /* 모바일에서 상단 햄버거 메뉴 숨기기 */
    .nav-mobile-toggle {
        display: none !important;
    }



    .hero-title {
        font-size: 2.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .stats {
        justify-content: center;
    }

    /* AI Search 반응형 개선 */
    .ai-search {
        padding: 40px 15px;
    }

    .search-container {
        padding: 0 15px;
    }

    .search-box {
        padding: 20px;
    }

    .search-input-wrapper {
        flex-direction: column;
        gap: 12px;
    }

    .search-input {
        width: 100%;
        padding: 14px 16px;
        font-size: 14px;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    .search-icon {
        display: none;
    }
}

/* Tablet 반응형 추가 */
@media (max-width: 1024px) and (min-width: 769px) {
    .search-container {
        max-width: 90%;
        padding: 0 20px;
    }

    .search-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* Small Mobile 반응형 추가 */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-image {
        height: 240px;
    }

    .ai-search {
        padding: 30px 10px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 14px;
    }

    .search-box {
        padding: 15px;
        border-radius: 12px;
    }

    .search-input {
        font-size: 13px;
        padding: 12px 14px;
    }

    .search-btn {
        font-size: 14px;
        padding: 12px 16px;
    }
}

/* Post Actions - DB Save Button */
.post-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.save-to-db-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: white;
    color: #718096;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.save-to-db-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    /* transform: translateY(-2px); - 제거됨 */
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.save-to-db-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.save-to-db-btn.saving {
    background: #f7fafc;
    color: #718096;
    border-color: #cbd5e0;
}

.save-to-db-btn.saved {
    background: #48bb78;
    color: white;
    border-color: #48bb78;
}

.save-to-db-btn.error {
    background: #f56565;
    color: white;
    border-color: #f56565;
}

/* Spinner animation */
/* @keyframes spin - 제거됨 {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
} */

.save-to-db-btn .spinner {
    /* animation: spin 1s linear infinite; - 제거됨 */
}/* Additional dark mode styles */

/* Update sections for dark mode */
body.dark-mode .features,
body.dark-mode .about,
body.dark-mode .contact {
    background: var(--bg-secondary) !important;
}


body.dark-mode .feature-card {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

body.dark-mode .feature-card:hover {
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
    color: var(--text-primary);
}

body.dark-mode p {
    color: var(--text-secondary);
}

body.dark-mode .nav-link {
    color: var(--text-secondary);
}

body.dark-mode .nav-link:hover {
    color: var(--primary-color);
}

body.dark-mode .stats-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

body.dark-mode .hero {
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 100%) !important;
}

/* Smooth transitions for dark mode elements only */
body,
.navbar,
.nav-link,
.feature-card,
.stats-card,
.hero,
.features,
.about,
.contact,
.footer {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Prevent transition conflicts with AI search */
.search-results,
.search-results *,
.search-loading,
.search-loading *,
#search-results,
#search-results * {
    transition: none !important;
}

/* Re-enable specific transitions for search animations */
.search-loading .loading-spinner {
    transition: none !important;
    /* animation: spin 1s linear infinite; - 제거됨 */
}

/* Apply dark mode to dynamic sections */
body.dark-mode #ai-search {
    background: var(--bg-secondary);
}

body.dark-mode .ai-search {
    background: var(--bg-secondary);
}

body.dark-mode #blog-posts {
    background: var(--bg-color);
}

body.dark-mode .blog-posts {
    background: var(--bg-color);
}

body.dark-mode .post-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

body.dark-mode .post-card .post-title {
    color: var(--text-primary);
}

body.dark-mode .post-card .post-excerpt {
    color: var(--text-secondary);
}

body.dark-mode .post-card .post-meta {
    color: var(--text-secondary);
}

body.dark-mode .post-card .post-tags .tag {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

body.dark-mode .search-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
}

body.dark-mode .search-input {
    background: var(--bg-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

body.dark-mode .search-btn {
    background: var(--primary-color);
    color: white;
}

body.dark-mode .search-results {
    color: var(--text-primary);
}

body.dark-mode .search-result-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .search-result-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

body.dark-mode .result-title {
    color: var(--text-primary);
}

body.dark-mode .result-content {
    color: var(--text-secondary);
}

body.dark-mode .result-meta {
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

body.dark-mode .result-content ul {
    color: var(--text-secondary);
}

body.dark-mode .result-content a {
    color: #667eea;
}

body.dark-mode .result-content a:hover {
    color: #764ba2;
}

body.dark-mode .ai-response-container {
    color: var(--text-primary);
}

body.dark-mode .blog-post-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

body.dark-mode .blog-post-card h3 {
    color: var(--text-primary);
}

body.dark-mode .blog-post-card p {
    color: var(--text-secondary);
}

body.dark-mode .save-to-db-btn {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

/* Dark mode mobile menu styles */
/* Additional dark mode fixes for all components */
body.dark-mode .product-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
}

body.dark-mode .product-title {
    color: var(--text-primary) !important;
}

body.dark-mode .product-desc {
    color: var(--text-secondary) !important;
}

body.dark-mode .product-price .price {
    color: var(--primary-color) !important;
}

body.dark-mode .donation-shop {
    background: var(--bg-color) !important;
}

body.dark-mode .search-box {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
}

body.dark-mode .news-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
}

body.dark-mode .news-card h3 {
    color: var(--text-primary) !important;
}

body.dark-mode .news-card p {
    color: var(--text-secondary) !important;
}

@media (max-width: 768px) {
    body.dark-mode .nav-menu {
        background: #1a1a2e !important;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5) !important;
    }

    body.dark-mode .nav-menu .nav-link {
        color: #e4e4e4 !important;
    }

    body.dark-mode .nav-menu .nav-link:hover {
        background: rgba(102, 126, 234, 0.2) !important;
        color: #667eea !important;
    }

    body.dark-mode .nav-menu .nav-cta {
        background: #667eea !important;
        color: white !important;
    }

    body.dark-mode #logoutBtn {
        background: #dc3545 !important;
        color: white !important;
        border-color: #dc3545 !important;
    }

    body.dark-mode .nav-mobile-toggle span {
        background: #e4e4e4 !important;
    }
}
/* Sliding Menu Overlay */
.sliding-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 997;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.sliding-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sliding Menu Styles */
.sliding-menu {
    position: fixed;
    top: 70px;
    right: -400px;
    width: 400px;
    height: calc(100vh - 70px);
    background: var(--card-bg);
    border-left: 1px solid var(--border-color);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 998;
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sliding-menu.active {
    right: 0;
}

.sliding-menu-container {
    padding: 1.5rem;
}

.sliding-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sliding-menu-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.sliding-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.sliding-menu-close:hover {
    color: var(--primary-color);
}

.sliding-menu-section {
    margin-bottom: 2rem;
}

.sliding-menu-section:last-child {
    margin-bottom: 0;
}

.sliding-menu-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.sliding-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.sliding-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.sliding-menu-item:hover {
    background: var(--primary-color);
    color: white;
    /* transform: translateY(-2px); - 제거됨 */
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.sliding-menu-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.sliding-menu-item span {
    font-size: 0.875rem;
    text-align: center;
}

.sliding-menu-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sliding-menu-link {
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.sliding-menu-link:hover {
    background: var(--primary-color);
    color: white;
    padding-left: 1.5rem;
}

/* Sliding Menu Toggle Button */
.sliding-menu-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 997;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.sliding-menu-toggle:hover {
    /* transform: scale(1.1) rotate(45deg); - 제거됨 */
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

.sliding-menu-toggle.active {
    background: var(--secondary-color);
    /* transform: rotate(180deg); - 제거됨 */
}

/* Dark mode styles for sliding menu */
body.dark-mode .sliding-menu {
    background: var(--bg-secondary);
    border-bottom-color: var(--border-color);
}

body.dark-mode .sliding-menu-item {
    background: var(--dark-bg);
}

body.dark-mode .sliding-menu-item:hover {
    background: var(--primary-color);
}

body.dark-mode .sliding-menu-link {
    background: var(--dark-bg);
}

body.dark-mode .sliding-menu-link:hover {
    background: var(--primary-color);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sliding-menu {
        top: 60px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 60px);
    }

    .sliding-menu-toggle {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
    }

    .sliding-menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sliding-menu-item {
        padding: 0.75rem;
    }
}

/* Force update cache */


/* Validation Modal Styles */
.validation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 20000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease;
}

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

.validation-modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.validation-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.validation-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.validation-message {
    font-size: 1rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.validation-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s;
}

.validation-btn:hover {
    transform: translateY(-2px);
}

/* Dark mode for validation modal */
body.dark-mode .validation-modal-content {
    background: #1a1f2e;
}

body.dark-mode .validation-title {
    color: #e2e8f0;
}

body.dark-mode .validation-message {
    color: #a0aec0;
}

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

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

/* Loading Spinner for Funding Products */
.products-grid .loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
}

.products-grid .spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.products-grid .loading p {
    color: #666;
    font-size: 1rem;
}

/* Auction Product Styling */
.product-card.auction-product {
    border: 2px solid #f59e0b;
    position: relative;
}

.product-card.auction-product::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.product-badge.auction {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-weight: 600;
}

.auction-price {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
}

.auction-price .current-bid,
.auction-price .buy-now {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auction-price .label {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

.auction-price .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f59e0b;
}

.auction-price .buy-now .price {
    color: #10b981;
}

.bid-info {
    text-align: center;
    padding: 8px;
    background: #fef3c7;
    border-radius: 6px;
    margin-top: 8px;
}

.bid-count {
    font-size: 0.875rem;
    color: #92400e;
    font-weight: 500;
}

.auction-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.auction-btn:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
}

/* Funding Progress Bar */
.funding-progress {
    margin: 12px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.875rem;
}

.progress-percent {
    font-weight: 600;
    color: #667eea;
}

.supporter-count {
    color: #666;
}

/* View All Button */
.view-all-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 20px;
}

.btn-view-all {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-view-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* Dark mode support */
body.dark-mode .auction-product {
    border-color: #fbbf24;
}

body.dark-mode .bid-info {
    background: #451a03;
}

body.dark-mode .bid-count {
    color: #fde047;
}

body.dark-mode .progress-bar {
    background: #374151;
}

body.dark-mode .auction-price .label,
body.dark-mode .supporter-count {
    color: #9ca3af;
}
