/* themes/my-custom-theme/public/style.css */
.card {
    border-radius: 10px !important;
    /* 카드 모서리를 아주 둥글게 변경 */
}

/* 본문 기본 폰트 사이즈 조정 */
.page-content {
    font-size: 1rem !important;
}

/* ==========================================
   A. 밝은 테마 (Light Mode)
   ========================================== */
:root {
    /* 1. 주 색상 (Primary Color) - 헤더 배경, 버튼 등 */
    /* --color-primary: #79716b !important; */
    --color-primary: #1e293b !important;
    --color-primary-light: rgba(107, 70, 193, 0.1) !important;

    /* 2. 기본 링크 색상 */
    --color-link: #362f2a !important;

    /* 3. 계층 구조 색상 테스트 (책장, 책, 챕터, 페이지) */
    /* Bookshelf: 무게감 있는 구조 (Slate 800) */
    --color-bookshelf: #096C4B !important;

    /* Book: Nuxt의 상징적인 그린 (Emerald 500) */
    --color-book: #10b981 !important;

    /* Chapter: 활기찬 구분점 (Orange 500) */
    --color-chapter: #26BAD4 !important;

    /* Page: 신뢰감을 주는 블루 (Blue 500) */
    --color-page: #3b82f6 !important;

    /* Page Draft: 창의적인 드래프트 (Violet 500) */
    --color-page-draft: #8b5cf6 !important;
}

/* ==========================================
   B. 다크 모드 (Dark Mode)
   ========================================== */
:root.dark-mode {
    --color-primary: #9f7aea !important;
    /* 밝은 보라 */
    --color-link: #f687b3 !important;
    /* 밝은 핑크 */
}

/* ==========================================
   LANDING PAGE (보리도 브랜드 랜딩)
   ========================================== */

.borido-landing {
    --landing-gold: #facc15;
    /* oklch(0.795 0.184 86.047) */
    /* --landing-navy: #0f172a; */
    --landing-navy: #1E3257;
    --landing-bg: #ffffff;
    --hero-title-size: 4rem;
    --section-spacing: 90px;
    background-color: var(--landing-bg);
}

.landing-hero {
    padding: var(--section-spacing) 0;
    background: linear-gradient(180deg, rgba(250, 204, 21, 0.22) 0%, rgba(250, 204, 21, 0) 100%), #f8fafc;
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(250, 204, 21, 0) 0%, rgba(250, 204, 21, 0.6) 40%, rgba(250, 204, 21, 0) 100%);
    z-index: 10;
}

.landing-hero .container {
    display: flex;
    align-items: center;
    gap: 5rem;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-content {
    flex: 1.2;
    text-align: left;
}

.hero-title {
    font-size: var(--hero-title-size);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    color: var(--landing-navy);
}

.text-accent {
    color: var(--landing-gold);
    display: inline-block;
}

.hero-description {
    font-size: 1.4rem;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 3rem;
}

.hero-actions {
    display: flex;
    gap: 1.2rem;
}

/* Featured Buttons */
.borido-landing .button.primary {
    background-color: var(--landing-gold) !important;
    color: var(--landing-navy) !important;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 14px 0 rgba(250, 204, 21, 0.3);
}

.borido-landing .button.outline {
    background-color: rgba(250, 204, 21, 0.05) !important;
    color: #854d0e !important;
    border: 1px solid rgba(250, 204, 21, 0.3) !important;
    font-weight: 600;
}

.hero-visual {
    flex: 1;
    perspective: 2000px;
}

/* Code Preview Card */
.code-preview {
    background: #1e293b;
    border-radius: 16px;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    transform: rotateY(-15deg) rotateX(10deg);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.code-preview:hover {
    transform: rotateY(0deg) rotateX(0deg) scale(1.02);
}

.code-header {
    background: #0f172a;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.filename {
    color: #94a3b8;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    margin-left: 10px;
}

.code-preview pre {
    padding: 30px;
    margin: 0;
    color: #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.6;
    font-family: 'JetBrains Mono', monospace;
    background: #1e293b;
}

pre.code-header-pre::before {
    width: 0 !important;
}

/* Sample Image Section Styling */
.landing-sample-image {
    /* padding: var(--section-spacing) 0; */
    padding: 5px 0 60px 0;
    text-align: center;
    background-color: #ffffff;
}

.sample-image-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    perspective: 2000px;
    padding: 0 2rem;
}

.sample-image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.2);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: rotateX(5deg) translateY(0);
}

.sample-image-wrapper:hover img {
    transform: rotateX(0deg) translateY(-10px) scale(1.02);
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.25);
}

:root.dark-mode .landing-sample-image {
    background-color: #020617;
}

:root.dark-mode .sample-image-wrapper img {
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.6);
}

/* Features Grid */
.landing-features {
    padding: var(--section-spacing) 0;
    background-color: #ffffff;
}

.section-title {
    font-size: 2.75rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 5rem;
    color: var(--landing-navy);
    letter-spacing: -0.01em;
}

.section-description {
    font-size: 1.4rem;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 3rem;
    text-align: center;
    margin-top: -50px !important;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.feature-item {
    padding: 3rem 2rem;
    border-radius: 20px;
    background: #f8fafc;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid #f1f5f9;
}

.feature-item:hover {
    background: #ffffff;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
    border-color: var(--landing-gold);
    transform: translateY(-8px);
}

.feature-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--landing-navy);
    color: var(--landing-gold);
    border-radius: 12px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.feature-item h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0;
    color: var(--landing-navy);
}

.feature-item p {
    color: #475569;
    font-size: 1rem;
    line-height: 1.7;
}

/* CTA Section with Stars */
.landing-cta {
    padding: var(--section-spacing) 0;
    background-color: #ffffff;
}

.cta-box {
    position: relative;
    background: linear-gradient(180deg, rgba(250, 204, 21, 0.2) 0%, rgba(250, 204, 21, 0) 100%);
    border-radius: 40px;
    padding: 6rem 3rem;
    text-align: center;
    color: white;
    overflow: hidden;
    box-shadow: 0 15px 30px -20px rgba(0, 0, 0, 0.5);
}

.stars-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(1px 1px at 20px 30px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 40px 70px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 50px 160px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 90px 40px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 130px 80px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 160px 120px, #fff, rgba(0, 0, 0, 0));
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.3;
    pointer-events: none;
}

.cta-title {
    font-size: 3rem;
    font-weight: 800;
    /* color: #ffffff; */
    color: var(--landing-navy);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.cta-description {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: 3.5rem;
    position: relative;
    z-index: 1;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

/* Dark Mode Overrides for Landing Page */
:root.dark-mode .borido-landing {
    --landing-bg: #020617;
}

:root.dark-mode .landing-hero {
    background: linear-gradient(180deg, #020617 0%, #030712 100%);
}

:root.dark-mode .hero-title,
:root.dark-mode .section-title {
    color: #f8fafc;
}

:root.dark-mode .feature-item {
    background: #0f172a;
    border-color: #1e293b;
}

:root.dark-mode .feature-item:hover {
    background: #1e293b;
    border-color: var(--landing-gold);
}

:root.dark-mode .feature-item h3 {
    color: #f8fafc;
}

:root.dark-mode .feature-icon {
    background: var(--landing-gold);
    color: var(--landing-navy);
}

:root.dark-mode .landing-features,
:root.dark-mode .landing-cta {
    background-color: #020617;
}

/* Responsive */
@media (max-width: 1100px) {
    .landing-hero .container {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }

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

    .hero-actions,
    .cta-actions {
        justify-content: center;
    }

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

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.8rem;
        text-align: center;
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 3rem;
    }

    .hero-actions {
        flex-direction: inherit;
        align-items: center;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        text-align: center;
    }

    .hero-actions .button {
        width: 100%;
        margin: 0 !important;
    }

    .section-description {
        margin-top: -30px !important;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.2rem;
        text-align: center;
    }

    .hero-description {
        font-size: 1.05rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-item {
        padding: 2.5rem 1.5rem;
    }

    .cta-box {
        padding: 4rem 1.5rem;
        border-radius: 24px;
        box-shadow: none;
    }

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

    .cta-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .cta-actions .button {
        width: 100%;
    }

    .hero-visual {
        display: none;
    }

    .borido-landing {
        --section-spacing: 60px;
    }

    .sample-image-wrapper {
        padding: 0 1rem;
    }

    .section-description {
        margin-top: -30px !important;
    }
}

/* ==========================================
   C. 커스텀 에디터 블록 (Custom Editor Blocks)
   ========================================== */

/* 1. 주석블록 (Annotation Block) */
.annotation-block {
    border: 1px dashed #94a3b8;
    background-color: #f8fafc;
    padding: 1rem;
    margin: 1rem 0;
    font-size: 1rem;
    border-radius: 4px;
    color: #475569;
}

/* 2. 원문블록 (Original Text Block) */
.original-text-block {
    border-left: 4px solid #64748b;
    background-color: #f1f5f9;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    font-size: 1rem;
    font-family: "Noto Sans KR", sans-serif;
    /* 한자/범어 가독성을 위한 명조체 계열 */
    line-height: 1.8;
}

/* 다크 모드 지원 */
:root.dark-mode .annotation-block {
    border-color: #475569;
    background-color: #1e293b;
    color: #cbd5e1;
}

:root.dark-mode .original-text-block {
    border-left-color: #94a3b8;
    background-color: #0f172a;
    color: #e2e8f0;
}

/* ==========================================
   D. 본문 가시성 토글 (Content Visibility Toggles)
   ========================================== */

/* 1. 레이아웃 구조 */
.page-title-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
    margin-bottom: 1.5rem;
}

#bkmrk-page-title {
    margin: 0 !important;
    flex-grow: 2;
}

.content-toggles,
.visibility-toggles {
    display: flex;
    gap: 1.5rem;
    flex-shrink: 0;
}

/* 사이드바 전용 여백 */
.toggles-sidebar {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* 2. 현대적인 토글 스위치 (Premium Slide Switch) */
.toggle-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    user-select: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

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

/* 3. 실제 숨김 처리 로직 */
.page-content.hide-annotation .annotation-block {
    display: none !important;
}

.page-content.hide-originaltext .original-text-block {
    display: none !important;
}

/* 다크 모드 적응 */
:root.dark-mode .toggle-item {
    color: #94a3b8;
}

:root.dark-mode .slider {
    background-color: #334155;
}

:root.dark-mode .toggles-sidebar {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* 데스크탑/모바일 표시 제어 */
@media (min-width: 601px) {
    .toggles-sidebar {
        display: none !important;
        /* 데스크탑 사이드바에서는 숨김 */
    }
}

/* 모바일 대응 */
@media (max-width: 600px) {
    .page-title-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .content-toggles {
        width: 100%;
        justify-content: flex-start;
    }

    .toggles-desktop {
        display: none !important;
        /* 모바일 본문 타이틀 옆에서는 숨김 */
    }

    .toggles-sidebar {
        display: flex !important;
        /* 모바일 정보 탭(사이드바)에서만 표시 */
    }

    .tri-layout-mobile-tab {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
}