/* ================================================
   Planee Guide - Common Styles
   공통 스타일 및 커스텀 CSS
   ================================================ */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Prevent FOUC (Flash of Unstyled Content) */
body {
    opacity: 0;
    transition: opacity 0.2s ease-in;
}

body.loaded {
    opacity: 1;
}

/* Utility for content fade-in */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Active TOC Indicator */
.toc-active {
    color: #0095FF;
    border-left-color: #0095FF;
    font-weight: 600;
    background-color: #e5f4ff;
}

/* Search Highlight Animation - Brand Color */
@keyframes highlight {
    0% {
        background-color: rgba(0, 149, 255, 0.15);
        border-left: 4px solid #0095FF;
        padding-left: 16px;
    }
    100% {
        background-color: transparent;
        border-left: 4px solid transparent;
        padding-left: 0;
    }
}

.search-highlight {
    animation: highlight 2.5s ease-out;
}

/* Iframe Styles */
iframe {
    border: none;
    width: 100%;
    height: 100%;
}

/* Prose Styles for Content */
.prose {
    max-width: none;
}

.prose h1 {
    color: #0f172a;
    font-weight: 800;
}

.prose h2 {
    color: #1e293b;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.8em;
    border-bottom: 2px solid #eff6ff;
    padding-bottom: 0.5em;
}

.prose strong {
    color: #0040CC;
    font-weight: 600;
}

.prose a {
    color: #0050FF;
    text-decoration: none;
}

.prose a:hover {
    color: #0040CC;
}

/* TOC Styles */
.toc {
    border-left: 2px solid #e2e8f0;
}

.toc-link {
    display: block;
    padding: 0.375rem 1rem;
    border-left: 2px solid transparent;
    font-size: 0.875rem;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toc-link:hover {
    color: #0095FF;
    border-left-color: #cbd5e1;
}

/* Mobile Menu Overlay */
#mobileOverlay {
    transition: opacity 0.3s ease-in-out;
}

/* Sidebar Transition */
#sidebar {
    transition: transform 0.3s ease-in-out;
}

/* Brand Gradient */
.brand-gradient {
    background: linear-gradient(135deg, #0095FF 0%, #0050FF 100%);
}

.accent-gradient {
    background: linear-gradient(135deg, #1BE194 0%, #00A7FE 100%);
}
