* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #ffffff;
    --bg-secondary: #f7f6f3;
    --bg-hover: #efefef;
    --text: #37352f;
    --text-secondary: #6b6b6b;
    --text-light: #9b9a97;
    --border: #e3e2e0;
    --primary: #2383e2;
    --primary-hover: #0b6bcb;
    --danger: #e53935;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

body {
    font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
}

.logo svg {
    flex-shrink: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Language Switcher */
.lang-switcher-wrapper {
    position: relative;
}

.lang-switcher {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 26px;
}

.lang-switcher:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.lang-switcher:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.lang-switcher option {
    background: #1a1a2e;
    color: #fff;
    padding: 8px;
}

/* RTL Support */
[dir="rtl"] .lang-switcher {
    background-position: left 8px center;
    padding-left: 26px;
    padding-right: 10px;
}

[dir="rtl"] .nav-right {
    flex-direction: row-reverse;
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: all 0.15s;
}

.btn-login:hover {
    background: var(--bg-hover);
}

.btn-login svg {
    flex-shrink: 0;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.user-name {
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-text {
    background: none;
    border: none;
    padding: 4px 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.15s;
}

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

/* Main Content */
.main-content {
    padding-top: 45px;
    min-height: 100vh;
}

/* App Layout (사이드바 + 컨텐츠) */
.app-layout {
    display: flex;
    min-height: calc(100vh - 45px);
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: calc(100vh - 45px);
    position: sticky;
    top: 45px;
}

.sidebar-menu {
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.15s;
}

.menu-item:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.menu-item.active {
    background: var(--bg);
    color: var(--text);
    font-weight: 500;
}

.menu-item svg {
    flex-shrink: 0;
}

.menu-count {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-light);
    background: var(--bg-hover);
    padding: 2px 6px;
    border-radius: 10px;
}

.sidebar-section {
    padding: 12px 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-count {
    background: var(--bg-hover);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
}

.sidebar-list {
    display: flex;
    flex-direction: column;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    transition: background 0.1s;
}

.sidebar-item:hover {
    background: var(--bg-hover);
}

.sidebar-item-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.sidebar-item-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-item-badge {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 4px;
    text-transform: uppercase;
}

.sidebar-item-badge.notion {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-secondary);
}

.sidebar-item-badge.markdown {
    background: rgba(35, 131, 226, 0.12);
    color: var(--primary);
}

.sidebar-empty {
    padding: 12px 14px;
    font-size: 12px;
    color: var(--text-light);
}

.sidebar-footer {
    margin-top: auto;
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.sidebar-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-avatar-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.sidebar-username {
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logout {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-light);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

.sidebar-logout:hover {
    background: var(--bg-hover);
    color: var(--text);
}

/* Main Panel */
.main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-y: auto;
    max-height: calc(100vh - 45px);
}

.content-header {
    padding: 24px 40px 0;
}

.content-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.content-body {
    padding: 20px 32px 40px;
    max-width: 700px;
}

/* Content Sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

/* 최근 슬라이드 리스트 */
.recent-slides-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recent-slide-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    transition: background 0.1s;
}

.recent-slide-item:hover {
    background: var(--bg-secondary);
}

.recent-slide-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.recent-slide-icon.notion {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
}

.recent-slide-icon.markdown {
    background: rgba(35, 131, 226, 0.1);
    color: var(--primary);
}

.recent-slide-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.recent-slide-title {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-slide-meta {
    font-size: 11px;
    color: var(--text-light);
}

.recent-slide-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}

.recent-slide-item:hover .recent-slide-actions {
    opacity: 1;
}

.btn-mini {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-light);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}

.btn-mini:hover {
    background: var(--bg-hover);
    color: var(--text);
}

/* 빈 상태 */
.empty-state {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 13px;
    margin-bottom: 4px;
}

.empty-hint {
    font-size: 12px;
    color: var(--text-light);
}

/* 컴팩트 폼 */
.compact-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-compact {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}

.input-compact:focus {
    border-color: var(--primary);
}

.textarea-compact {
    min-height: 140px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-family: "SFMono-Regular", Menlo, Consolas, monospace;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s;
}

.textarea-compact:focus {
    border-color: var(--primary);
}

.btn-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

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

/* Notion 페이지 그리드 */
.notion-pages-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notion-page-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: background 0.1s;
}

.notion-page-item:hover {
    background: var(--bg-secondary);
}

.notion-page-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.notion-page-title {
    flex: 1;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.btn-notion-convert {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-light);
    cursor: pointer;
    opacity: 0;
    transition: all 0.15s;
}

.notion-page-item:hover .btn-notion-convert {
    opacity: 1;
}

.btn-notion-convert:hover {
    background: var(--primary);
    color: white;
}

/* Notion 페이지 레벨 */
.notion-level-0 { padding-left: 10px; }
.notion-level-1 { padding-left: 28px; }
.notion-level-2 { padding-left: 46px; }
.notion-level-3 { padding-left: 64px; }

.toggle-btn-small {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.15s;
    flex-shrink: 0;
}

.toggle-btn-small:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.toggle-btn-small svg {
    transition: transform 0.15s;
}

.toggle-btn-small.collapsed svg {
    transform: rotate(0deg);
}

.toggle-btn-small:not(.collapsed) svg {
    transform: rotate(90deg);
}

/* 노션 페이지 토글 영역 */
.notion-page-toggle {
    width: 18px;
    flex-shrink: 0;
}

/* 노션 페이지 아이템 - 정렬 개선 */
.notion-page-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.1s;
    cursor: pointer;
    min-width: 0;
}

.notion-page-item:hover {
    background: var(--bg-secondary);
}

.notion-page-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.notion-page-title {
    flex: 1;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
    min-width: 0;
}

/* 노션 컨텐트 뷰어 */
.notion-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.notion-content-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notion-sync-info {
    font-size: 11px;
    color: var(--text-light);
}

.btn-sync {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-sync:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.btn-sync.syncing svg {
    animation: spin 0.8s linear infinite;
}

.notion-content-wrapper {
    position: relative;
}

.notion-content-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 10;
    border-radius: var(--radius-md);
}

.notion-content-loading .spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.notion-content-loading span {
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-back:hover {
    background: var(--bg-secondary);
    color: var(--text);
}

.notion-content-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-convert-slide {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

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

.notion-content-body {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}

.notion-content-body h1 {
    font-size: 1.5em;
    font-weight: 700;
    margin: 1em 0 0.5em;
}

.notion-content-body h2 {
    font-size: 1.25em;
    font-weight: 600;
    margin: 1em 0 0.5em;
}

.notion-content-body h3 {
    font-size: 1.1em;
    font-weight: 600;
    margin: 1em 0 0.5em;
}

.notion-content-body p {
    margin: 0.5em 0;
}

.notion-content-body ul, .notion-content-body ol {
    margin: 0.5em 0;
    padding-left: 1.5em;
}

.notion-content-body code {
    background: var(--bg-secondary);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}

.notion-content-body pre {
    background: var(--bg-secondary);
    padding: 1em;
    border-radius: var(--radius-sm);
    overflow-x: auto;
}

.notion-content-body img {
    max-width: 70%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: block;
    margin: 1rem auto;
}

.loading-text, .empty-text, .error-text {
    color: var(--text-light);
    text-align: center;
    padding: 40px 0;
}

/* 로딩 스피너 */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    gap: 16px;
}

.loading-spinner .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-spinner .spinner-text {
    color: var(--text-secondary);
    font-size: 13px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 모션 감소 설정 존중 */
@media (prefers-reduced-motion: reduce) {
    .loading-spinner .spinner,
    .notion-content-loading .spinner,
    .spinner-small,
    .btn-sync.syncing svg {
        animation-duration: 1.5s;
    }
    .cursor {
        animation-duration: 1.5s;
    }
}

/* 새 슬라이드 만들기 카드 */
.create-slide-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all 0.2s;
}

.create-slide-card:hover {
    border-color: var(--primary);
}

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

.create-slide-header svg {
    color: var(--primary);
    width: 20px;
    height: 20px;
}

.create-slide-header h1 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.create-slide-desc {
    display: none;
}

.markdown-create-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.input-create-title {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

.input-create-title:focus {
    border-color: var(--primary);
}

.input-create-markdown {
    min-height: 120px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: "SFMono-Regular", Menlo, Consolas, monospace;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s;
}

.input-create-markdown:focus {
    border-color: var(--primary);
}

.btn-create-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

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

.create-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.input-large {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input-large:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(35, 131, 226, 0.15);
}

.input-markdown-large {
    min-height: 200px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-family: "SFMono-Regular", Menlo, Consolas, monospace;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s;
}

.input-markdown-large:focus {
    border-color: var(--primary);
}

.btn-large {
    padding: 14px 24px;
    font-size: 15px;
}

.markdown-form {
    flex-direction: column;
}

.my-slides-section {
    margin-top: 48px;
}

.my-slides-section h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

/* Dashboard (로그인 상태) - deprecated */
.dashboard {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px;
}

.section {
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.section-hint {
    font-size: 12px;
    color: var(--text-light);
}

.section-count {
    font-size: 12px;
    color: var(--text-light);
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Tabs */
.tabs-minimal {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.tab-minimal {
    padding: 6px 12px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.15s;
}

.tab-minimal:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.tab-minimal.active {
    background: var(--bg-secondary);
    color: var(--text);
    font-weight: 500;
}

/* Input Group */
.input-group {
    display: flex;
    gap: 8px;
}

.input-main {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input-main:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(35, 131, 226, 0.15);
}

.input-main::placeholder {
    color: var(--text-light);
}

.btn-primary {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

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

.btn-full {
    width: 100%;
}

/* Markdown Form */
.markdown-form-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-title {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

.input-title:focus {
    border-color: var(--primary);
}

.input-markdown {
    min-height: 200px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-family: "SFMono-Regular", Menlo, Consolas, monospace;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s;
}

.input-markdown:focus {
    border-color: var(--primary);
}

.error-message {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fdf2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    color: var(--danger);
    font-size: 13px;
}

/* Page List (Notion 페이지 목록) */
.page-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.page-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    transition: background 0.1s;
}

.page-item:hover {
    background: var(--bg-hover);
}

.page-item:hover .page-arrow {
    opacity: 1;
}

.page-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-secondary);
}

.page-info {
    flex: 1;
    min-width: 0;
}

.page-title {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-arrow {
    color: var(--text-light);
    opacity: 0;
    transition: opacity 0.15s;
}

/* Slides Grid */
.slides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.slide-card {
    text-decoration: none;
    color: var(--text);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: box-shadow 0.15s, transform 0.15s;
}

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

.slide-preview {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.slide-preview.notion-bg {
    background: linear-gradient(135deg, #f5f5f4 0%, #fff 100%);
}

.slide-preview.markdown-bg {
    background: linear-gradient(135deg, #e3f2fd 0%, #fff 100%);
}

.slide-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px;
    font-size: 6px;
    line-height: 1.4;
    overflow: hidden;
    pointer-events: none;
    transform: scale(0.5);
    transform-origin: top left;
    width: 200%;
    height: 200%;
}

.slide-thumbnail h1 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}

.slide-thumbnail h2 {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--text);
}

.slide-thumbnail h3 {
    font-size: 9px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text);
}

.slide-thumbnail p {
    font-size: 8px;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.slide-thumbnail ul, .slide-thumbnail ol {
    font-size: 8px;
    margin-left: 10px;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.slide-thumbnail pre, .slide-thumbnail code {
    font-size: 6px;
    background: rgba(0,0,0,0.05);
    padding: 2px 4px;
    border-radius: 2px;
}

.slide-count-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 4px 8px;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 11px;
    border-radius: var(--radius-sm);
}

.slide-info {
    padding: 12px;
}

.slide-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slide-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-light);
}

.slide-source {
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 500;
}

.slide-source.notion {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
}

.slide-source.markdown {
    background: rgba(35, 131, 226, 0.1);
    color: var(--primary);
}

.slide-card-wrapper {
    position: relative;
}

.slide-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}

.slide-card-wrapper:hover .slide-card-actions {
    opacity: 1;
}

.btn-card-action {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: var(--shadow-sm);
}

.btn-card-action:hover {
    background: white;
    color: var(--text);
    box-shadow: var(--shadow-md);
}

/* Toast 알림 */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 20px;
    background: var(--text);
    color: white;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Site Footer */
.site-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-tertiary);
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text-primary);
}

@media (max-width: 480px) {
    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* Landing Page (비로그인 상태) */
.landing {
    min-height: calc(100vh - 45px - 61px); /* 네비게이션 45px + 푸터 61px 제외 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    overflow: hidden; /* 스크롤 방지 */
}

.hero-section {
    text-align: center;
    width: 560px;
    max-width: 100%;
}

/* 히어로 폼 - 공통 컨테이너 */
.hero-form-container {
    min-height: 320px; /* 폼 전환 시 높이 유지 */
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    min-height: 60px;
}

.cursor {
    animation: blink 0.8s infinite;
    font-weight: 400;
    color: var(--primary);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}

.hero-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.hero-tabs {
    justify-content: center;
    margin-bottom: 16px;
}

.hero-form {
    width: 100%;
}

.input-group-hero {
    display: flex;
    gap: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s, border-color 0.15s;
}

.input-group-hero:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(35, 131, 226, 0.15);
}

.input-hero {
    flex: 1;
    padding: 14px 18px;
    border: none;
    font-size: 15px;
    outline: none;
    background: transparent;
}

.input-hero::placeholder {
    color: var(--text-light);
}

.btn-hero {
    padding: 14px 24px;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

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

.input-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-light);
}

.login-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.login-link:hover {
    text-decoration: underline;
}

/* Markdown Hero Form */
.markdown-hero-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-title-hero {
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-shadow: var(--shadow-sm);
}

.input-title-hero:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(35, 131, 226, 0.15);
}

.input-markdown-hero {
    height: 200px;
    min-height: 200px;
    max-height: 200px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-family: "SFMono-Regular", Menlo, Consolas, monospace;
    line-height: 1.6;
    resize: none;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-shadow: var(--shadow-sm);
}

.input-markdown-hero:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(35, 131, 226, 0.15);
}

.btn-full {
    width: 100%;
    padding: 14px 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: 200px;
        overflow-y: auto;
    }

    .sidebar-footer {
        position: sticky;
        bottom: 0;
        background: var(--bg-secondary);
    }

    .content-header {
        padding: 20px 16px 0;
    }

    .content-body {
        padding: 16px;
    }

    .content-header h1 {
        font-size: 20px;
    }
}

@media (max-width: 640px) {
    .navbar {
        padding: 0 12px;
    }

    .user-name {
        display: none;
    }

    .dashboard {
        padding: 24px 16px;
    }

    .hero-title {
        font-size: 36px;
        min-height: 46px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .input-group-hero {
        flex-direction: column;
        border-radius: var(--radius-md);
    }

    .input-hero {
        text-align: center;
        border-bottom: 1px solid var(--border);
    }

    .btn-hero {
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }

    .input-group {
        flex-direction: column;
    }

    .slides-grid {
        grid-template-columns: 1fr;
    }
}

/* Notion 페이지 계층 구조 */
.sidebar-item-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.sidebar-item-wrapper .sidebar-item {
    flex: 1;
    padding-left: 6px;
}

.sidebar-item-wrapper.notion-page-level-0 {
    padding-left: 4px;
}

.sidebar-item-wrapper.notion-page-level-1 {
    padding-left: 18px;
}

.sidebar-item-wrapper.notion-page-level-2 {
    padding-left: 32px;
}

.sidebar-item-wrapper.notion-page-level-3 {
    padding-left: 46px;
}

/* 토글 버튼 */
.toggle-btn {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.15s;
    flex-shrink: 0;
}

.toggle-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.toggle-btn svg {
    transition: transform 0.15s;
}

.toggle-btn.collapsed svg {
    transform: rotate(0deg);
}

.toggle-btn:not(.collapsed) svg {
    transform: rotate(90deg);
}

/* 하위 페이지 스타일 */
.sidebar-item-wrapper.notion-page-level-1 .sidebar-item-title,
.sidebar-item-wrapper.notion-page-level-2 .sidebar-item-title,
.sidebar-item-wrapper.notion-page-level-3 .sidebar-item-title {
    font-size: 12px;
    color: var(--text-secondary);
}

.sidebar-item-wrapper.notion-page-level-1 .sidebar-item-icon,
.sidebar-item-wrapper.notion-page-level-2 .sidebar-item-icon,
.sidebar-item-wrapper.notion-page-level-3 .sidebar-item-icon {
    font-size: 12px;
}

/* 사이드바 서브메뉴 - Notion 스타일 */
.menu-item-with-submenu {
    display: flex;
    flex-direction: column;
}

.menu-item-with-submenu .menu-item {
    position: relative;
}

/* 아이콘 래퍼 - 토글 버튼 오버레이용 */
.menu-icon-wrapper {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.menu-icon-wrapper .menu-icon {
    width: 16px;
    height: 16px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.menu-toggle-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: none;
    border-radius: 3px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: opacity 0.15s, background 0.15s;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
}

.menu-item:hover .menu-toggle-btn {
    opacity: 1;
    pointer-events: auto;
}

.menu-toggle-btn.expanded svg {
    transform: rotate(90deg);
}

.menu-toggle-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.menu-toggle-btn svg {
    transition: transform 0.15s;
}

.menu-toggle-btn.expanded svg {
    transform: rotate(90deg);
}

.sidebar-submenu {
    display: none;
    flex-direction: column;
    overflow-y: auto;
    padding: 2px 0 8px 0;
}

.sidebar-submenu.show {
    display: flex;
}

/* Notion 스타일 페이지 아이템 */
.sidebar-notion-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    margin: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.1s;
    min-width: 0;
    min-height: 28px;
    position: relative;
}

.sidebar-notion-item:hover {
    background: var(--bg-hover);
}

.sidebar-notion-item.active {
    background: var(--bg-secondary);
    font-weight: 500;
}

.sidebar-notion-item.active .sidebar-notion-title {
    color: var(--text);
}

/* 아이콘 래퍼 - position relative로 토글이 위에 오버레이됨 */
.sidebar-notion-icon-wrapper {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* 페이지 아이콘 */
.sidebar-notion-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--text-secondary);
}

/* 토글 버튼 - 아이콘 위에 오버레이 */
.toggle-btn-tiny {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.1s;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

/* 마우스 오버 시 토글 버튼 표시 */
.sidebar-notion-item:hover .toggle-btn-tiny:not(.no-children) {
    opacity: 1;
    pointer-events: auto;
}

/* 펼쳐진 상태면 항상 표시 */
.toggle-btn-tiny:not(.collapsed):not(.no-children) {
    opacity: 1;
    pointer-events: auto;
}

.toggle-btn-tiny:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.toggle-btn-tiny svg {
    transition: transform 0.15s;
    width: 10px;
    height: 10px;
}

.toggle-btn-tiny.collapsed svg {
    transform: rotate(0deg);
}

.toggle-btn-tiny:not(.collapsed) svg {
    transform: rotate(90deg);
}

/* 자식이 없는 페이지는 토글 버튼 숨김 */
.toggle-btn-tiny.no-children {
    display: none;
}

/* 페이지 제목 */
.sidebar-notion-title {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
    flex: 1;
    min-width: 0;
    line-height: 1.4;
}

/* 사이드바 Notion 페이지 레벨 - 노션 스타일 들여쓰기 */
.sidebar-notion-item.notion-level-0 { padding-left: 10px; }
.sidebar-notion-item.notion-level-1 { padding-left: 28px; }
.sidebar-notion-item.notion-level-2 { padding-left: 46px; }
.sidebar-notion-item.notion-level-3 { padding-left: 64px; }

/* 최근 슬라이드 더보기 */
.hidden-slide {
    display: none;
}

.recent-slides-list.show-all .hidden-slide {
    display: flex;
}

.btn-show-more {
    margin-top: 12px;
    padding: 8px 16px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    width: 100%;
}

.btn-show-more:hover {
    background: var(--bg-secondary);
    color: var(--text);
}

/* 마크다운 편집기 레이아웃 */
.markdown-editor-layout {
    display: flex;
    gap: 20px;
    min-height: 350px;
}

.markdown-editor-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.markdown-preview-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    min-width: 0;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.preview-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.preview-slide-num {
    font-size: 11px;
    color: var(--text-light);
    margin-left: auto;
}

.preview-nav {
    display: flex;
    gap: 4px;
}

.preview-nav-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.preview-nav-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.preview-slide-container {
    flex: 1;
    padding: 16px;
    overflow: auto;
}

.preview-slide {
    background: white;
    border-radius: var(--radius-sm);
    padding: 24px;
    min-height: 200px;
    box-shadow: var(--shadow-sm);
}

.preview-slide h1 {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 0.5em;
    color: var(--text);
}

.preview-slide h2 {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 0.4em;
    color: var(--text);
}

.preview-slide h3 {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 0.3em;
    color: var(--text);
}

.preview-slide p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 0.5em;
    color: var(--text-secondary);
}

.preview-slide ul, .preview-slide ol {
    font-size: 14px;
    line-height: 1.6;
    margin-left: 1.2em;
    margin-bottom: 0.5em;
    color: var(--text-secondary);
}

.preview-slide code {
    background: var(--bg-secondary);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: "SFMono-Regular", Menlo, Consolas, monospace;
}

.preview-slide pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 12px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.5;
}

.preview-slide pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.preview-slide blockquote {
    border-left: 3px solid var(--primary);
    padding-left: 12px;
    margin: 0.5em 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* 반응형: 마크다운 편집기 */
@media (max-width: 900px) {
    .markdown-editor-layout {
        flex-direction: column;
    }

    .markdown-preview-panel {
        min-height: 250px;
    }
}

/* ===== 마크다운 섹션 레이아웃 ===== */
.markdown-section-layout {
    display: flex;
    gap: 20px;
    min-height: calc(100vh - 180px);
    width: 100%;
}

/* 마크다운 탭이 활성화되면 content-body의 max-width 해제 */
.content-body.wide-mode {
    max-width: none;
    padding: 16px 24px 32px;
}

/* 마크다운 탭용 컨텐츠 섹션 - 넓게 */
#section-markdown {
    width: 100%;
}

/* 마크다운 슬라이드 목록 패널 */
.markdown-list-panel {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.markdown-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.markdown-list-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.btn-new-markdown {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

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

.markdown-slides-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.markdown-slide-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.1s;
}

.markdown-slide-item:hover {
    background: var(--bg-hover);
}

.markdown-slide-item.active {
    background: var(--bg);
    box-shadow: var(--shadow-sm);
}

.markdown-slide-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(35, 131, 226, 0.1);
    color: var(--primary);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.markdown-slide-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.markdown-slide-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.markdown-slide-meta {
    font-size: 11px;
    color: var(--text-light);
}

.markdown-empty-state {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-secondary);
}

.markdown-empty-state p {
    font-size: 12px;
    margin-bottom: 4px;
}

/* 마크다운 에디터 패널 */
.markdown-editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.markdown-editor-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.placeholder-content {
    text-align: center;
    color: var(--text-light);
}

.placeholder-content svg {
    margin-bottom: 16px;
}

.placeholder-content p {
    font-size: 13px;
}

.markdown-editor-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.editor-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.editor-title-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: border-color 0.15s;
}

.editor-title-input:focus {
    border-color: var(--primary);
}

.editor-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-editor-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-editor-action:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.btn-editor-action.btn-delete:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--danger);
}

.btn-editor-save {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

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

.btn-editor-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 스피너 (작은 버전) */
.spinner-small {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* EasyMDE 기본 스타일 */
.markdown-editor-content .EasyMDEContainer {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.markdown-editor-content .EasyMDEContainer .CodeMirror {
    flex: 1;
    border: none;
    font-size: 14px;
    line-height: 1.6;
}

.markdown-editor-content .editor-toolbar {
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 6px 8px;
}

.markdown-editor-content .editor-toolbar::before,
.markdown-editor-content .editor-toolbar::after {
    display: none;
}

.markdown-editor-content .editor-statusbar {
    display: none;
}

/* 반응형 */
@media (max-width: 900px) {
    .markdown-section-layout {
        flex-direction: column;
    }

    .markdown-list-panel {
        width: 100%;
        max-height: 200px;
    }
}
