:root {
    /* Modern Color Palette */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --secondary: #f59e0b;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Text Colors */
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-500);
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: var(--gray-50);
    --bg-tertiary: var(--gray-100);
    
    /* Border & Shadow */
    --border: var(--gray-200);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Typography */
    --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* Navigation */
.nav-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.back-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Hide back-button on desktop, show only on mobile */
@media (min-width: 769px) {
    .back-button {
        display: none;
    }
}

.back-icon {
    width: 16px;
    height: 16px;
}

/* SVG Icon size control */
.icon-svg,
svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Enhanced Progress Indicator */
.progress-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 50%, var(--secondary) 100%);
    z-index: 1001;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* Main Container */
.sitemap-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
    min-height: 100vh;
}

/* Header */
.sitemap-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.sitemap-title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.sitemap-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.sitemap-updated {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    border: 1px solid var(--border);
}

.update-icon {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

/* Category Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Category Card */
.category-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.category-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }
.category-card:nth-child(6) { animation-delay: 0.6s; }
.category-card:nth-child(7) { animation-delay: 0.7s; }
.category-card:nth-child(8) { animation-delay: 0.8s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Category Header */
.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--bg-tertiary);
    position: relative;
}

.category-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 3rem;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
}

.category-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.category-count {
    font-size: 0.875rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    margin-left: auto;
}

/* Page Links */
.page-links {
    list-style: none;
}

.page-link {
    margin-bottom: 0.75rem;
}

.page-link:last-child {
    margin-bottom: 0;
}

.page-link a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.page-link a:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    transform: translateX(4px);
}

.page-link-icon {
    width: 1rem;
    height: 1rem;
    color: var(--primary);
    flex-shrink: 0;
}

.page-link-info {
    flex: 1;
}

.page-link-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.page-link-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Stats Section */
.sitemap-stats {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Footer */
.sitemap-footer {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
}

.sitemap-footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

.sitemap-footer strong {
    color: var(--primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-content {
        padding: 1rem;
    }

    .sitemap-container {
        max-width: 900px;
        padding: 5rem 1.5rem 3rem;
    }

    .sitemap-title {
        font-size: 2.25rem;
    }

    .sitemap-subtitle {
        font-size: 1.125rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .category-card {
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .sitemap-title {
        font-size: 1.875rem;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .category-count {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-muted: #9ca3af;
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --bg-tertiary: #374151;
        --border: #374151;
    }

    .nav-container {
        background: rgba(17, 24, 39, 0.95);
    }

    .category-card {
        background: var(--bg-secondary);
    }
}

/* Update History Section */
.update-history {
    margin: 4rem 0;
}

.update-history-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.history-icon {
    width: 2rem;
    height: 2rem;
    color: var(--primary);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    box-shadow: var(--shadow);
}

.timeline-item:last-child::after {
    content: '';
    position: absolute;
    left: -0.25rem;
    bottom: -1.5rem;
    width: 0.5rem;
    height: 0.5rem;
    background: var(--secondary);
    border-radius: 50%;
}

.timeline-date {
    margin-bottom: 1rem;
}

.date-badge {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border);
}

.date-badge.latest {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.date-badge.latest::after {
    content: 'NEW';
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    background: var(--secondary);
    color: white;
    padding: 0.125rem 0.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.625rem;
    font-weight: 700;
}

.date-badge.initial {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    border: none;
}

.date-badge.planning {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: none;
    position: relative;
}

.date-badge.planning::after {
    content: 'START';
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    background: var(--danger);
    color: white;
    padding: 0.125rem 0.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.625rem;
    font-weight: 700;
}

.timeline-content {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.update-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.update-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.update-category {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1rem;
    border-left: 4px solid;
}

.update-category.new {
    border-left-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.update-category.improved {
    border-left-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.update-category.fixed {
    border-left-color: var(--secondary);
    background: rgba(245, 158, 11, 0.05);
}

.category-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.update-category.new .category-label {
    background: var(--success);
}

.update-category.improved .category-label {
    background: var(--primary);
}

.update-category.fixed .category-label {
    background: var(--secondary);
}

.update-category ul {
    list-style: none;
    margin: 0;
}

.update-category li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
    position: relative;
    padding-left: 1.5rem;
}

.update-category li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 600;
}

/* Show More Button */
.show-more-container {
    text-align: center;
    margin: 2rem 0;
}

.show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.show-more-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.show-more-icon {
    width: 1rem;
    height: 1rem;
    transition: transform 0.3s ease;
}

.show-more-btn.expanded .show-more-icon {
    transform: rotate(180deg);
}

.more-updates {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}

.more-updates.expanded {
    opacity: 1;
    max-height: 5000px;
}

/* Responsive Design for Timeline */
@media (max-width: 768px) {
    .timeline {
        padding-left: 1rem;
    }

    .timeline::before {
        left: 0.5rem;
    }

    .timeline-item {
        padding-left: 1.5rem;
    }

    .timeline-item::before {
        left: -0.25rem;
        width: 0.75rem;
        height: 0.75rem;
    }

    .update-history-title {
        font-size: 1.75rem;
    }

    .update-details {
        gap: 0.75rem;
    }

    .timeline-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .update-history-title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .timeline {
        padding-left: 0.5rem;
    }

    .timeline-item {
        padding-left: 1rem;
    }
}

/* Enhanced scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
}

/* Print styles */
@media print {
    .nav-container,
    .back-button,
    .progress-indicator {
        display: none;
    }

    .sitemap-container {
        padding-top: 2rem;
    }

    .category-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }

    .timeline::before {
        background: #ccc;
    }

    .timeline-item::before {
        background: #666;
    }

    .timeline-content {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}