@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
    --primary: #3182f6;
    --primary-hover: #1b64da;
    --text-primary: #191f28;
    --text-secondary: #4e5968;
    --text-tertiary: #8b95a1;
    --text-quaternary: #b0b8c1;
    --bg-main: #ffffff;
    --bg-surface: #f2f4f6;
    --bg-hover: #f9fafb;
    --bg-overlay: rgba(255, 255, 255, 0.95);
    --border-color: #f2f4f6;
    --border-strong: #e5e8eb;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
    
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    
    --sidebar-width: 260px;
    --right-sidebar-width: 320px;
    --max-content-width: 720px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 10px;
}

/* Layout */
.app-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
}

.editor-container {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-main);
}

/* Left Sidebar */
.sidebar-left {
    width: var(--sidebar-width);
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 40px 20px 32px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.brand-logo {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 48px;
    padding-left: 12px;
}

.nav-section {
    margin-bottom: 32px;
}

.nav-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-quaternary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-left: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.nav-item:hover {
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: var(--bg-surface);
    color: var(--primary);
}

.write-btn {
    width: 100%;
    padding: 16px;
    background-color: var(--primary);
    color: #ffffff;
    font-weight: 700;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    transition: all 0.2s;
}

.write-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.write-btn:active {
    transform: scale(0.98);
}

.user-profile-mini {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-lg);
    transition: background-color 0.2s;
    cursor: pointer;
}

.user-profile-mini:hover {
    background-color: var(--bg-surface);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-surface);
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info .name {
    font-size: 14px;
    font-weight: 700;
}

.user-info .slug {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 64px 48px;
    max-width: calc(var(--max-content-width) + 96px);
    border-right: 1px solid var(--border-color);
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.search-bar {
    position: relative;
    width: 260px;
}

.search-bar i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-quaternary);
}

.search-bar input {
    width: 100%;
    padding: 10px 16px 10px 48px;
    background-color: var(--bg-surface);
    border-radius: var(--radius-md);
    border: none;
    font-size: 14px;
    outline: none;
    transition: ring 0.2s;
}

/* Feed Tabs */
.feed-tabs {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.tab-item {
    padding: 12px 4px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-tertiary);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.tab-item:hover {
    color: var(--text-primary);
}

.tab-item.active {
    color: var(--text-primary);
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--text-primary);
}

/* Profile Page Styles */
.profile-header {
    background: #ffffff;
    padding-bottom: 48px;
    margin-bottom: 40px;
}

.profile-cover {
    width: 100%;
    height: 240px;
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    margin-bottom: -60px;
    overflow: hidden;
}

.profile-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info-card {
    position: relative;
    padding: 0 40px;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    overflow: hidden;
    background: var(--bg-surface);
    margin-bottom: 24px;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 16px;
}

.p-name {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
}

.profile-bio {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 24px;
}

.profile-stats {
    display: flex;
    gap: 24px;
}

.stat-item {
    display: flex;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
}

.stat-val {
    color: var(--text-primary);
}

.stat-lbl {
    color: var(--text-tertiary);
}

.profile-main-btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
}

.profile-main-btn.follow {
    background: var(--primary);
    color: #ffffff;
}

.profile-main-btn.edit {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.profile-main-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.section-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title span {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
}

/* Carousel */
.carousel-container {
    margin-bottom: 56px;
    position: relative;
    overflow: hidden;
    margin-left: -48px;
    margin-right: -48px;
    padding: 0 48px;
}

.carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 8px;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-slide {
    flex: 0 0 calc(100% - 40px);
    scroll-snap-align: center;
    position: relative;
    height: 320px;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    cursor: pointer;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 40px;
    color: #ffffff;
}

.carousel-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
}

/* Event Cards */
.event-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 56px;
}

.event-card {
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 180px;
    transition: transform 0.2s;
    cursor: pointer;
}

.event-card:hover {
    transform: translateY(-4px);
    background: var(--border-strong);
}

.event-type {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.event-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: auto;
}

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
}

/* Hero Section Refinement */
.hero-article {
    margin-bottom: 64px;
}

.hero-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: var(--bg-surface);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    margin-bottom: 24px;
}

.hero-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-article:hover .hero-thumb img {
    transform: scale(1.05);
}

.tag-editor {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 12px;
}

.hero-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 12px;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.meta-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 500;
}

/* Article Feed List */
.feed-list {
    display: flex;
    flex-direction: column;
}

.article-card {
    display: flex;
    gap: 32px;
    padding: 32px 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: opacity 0.2s;
}

.article-card:hover {
    opacity: 0.8;
}

.card-content {
    flex: 1;
}

.card-tag {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    display: inline-block;
}

.card-tag.tech { color: #ff5f5f; }
.card-tag.business { color: var(--primary); }

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.card-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.card-thumb {
    width: 128px;
    height: 128px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    flex-shrink: 0;
    background-color: var(--bg-hover);
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Right Sidebar */
.sidebar-right {
    width: var(--right-sidebar-width);
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 40px 32px;
    overflow-y: auto;
}

.sidebar-right::-webkit-scrollbar {
    width: 0;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 24px;
}

.widget {
    margin-bottom: 40px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-pill {
    padding: 8px 16px;
    background-color: var(--bg-surface);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.tag-pill:hover {
    background-color: var(--border-strong);
}

.writer-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.writer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: background-color 0.2s;
}

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

.writer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.writer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.writer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.writer-meta .name {
    font-size: 14px;
    font-weight: 700;
}

.writer-meta .role {
    font-size: 11px;
    color: var(--text-tertiary);
}

.follow-btn {
    padding: 6px 12px;
    background-color: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
}

.newsletter-box {
    padding: 24px;
    background-color: var(--bg-surface);
    border-radius: var(--radius-2xl);
}

.newsletter-box h4 {
    margin-bottom: 8px;
    font-weight: 700;
}

.newsletter-box p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.newsletter-box input {
    width: 100%;
    padding: 10px 16px;
    background-color: #ffffff;
    border-radius: var(--radius-md);
    border: none;
    font-size: 13px;
    margin-bottom: 12px;
    outline: none;
}

.subscribe-btn {
    width: 100%;
    padding: 10px;
    background-color: var(--text-primary);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    border-radius: var(--radius-md);
    transition: transform 0.1s;
}

.subscribe-btn:active {
    transform: scale(0.95);
}

/* Footer */
.sidebar-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 8px;
}

.footer-link {
    font-size: 11px;
    color: var(--text-quaternary);
}

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

.copyright {
    font-size: 11px;
    color: var(--text-quaternary);
    margin-top: 16px;
    width: 100%;
}

/* Article Detail Styles */
.article-detail-container {
    padding-top: 120px; /* Drastically increased for premium spacing */
}

.article-header {
    margin-bottom: 80px; /* More air between header and content */
}

.article-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.author-large {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-large .avatar-l {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
}

.author-large .info .name {
    font-size: 16px;
    font-weight: 700;
}

.author-large .info .sub {
    font-size: 13px;
    color: var(--text-tertiary);
}

.detail-actions {
    display: flex;
    gap: 12px;
}

.action-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.action-icon:hover {
    background-color: var(--bg-surface);
}

.article-title-l {
    font-size: 48px; /* Larger, more impactful title */
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1.5px;
    margin-bottom: 56px;
    color: var(--text-primary);
}

.detail-cover {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: var(--bg-surface);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    margin-bottom: 64px;
}

.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-body {
    font-size: 19px;
    line-height: 1.7;
    color: var(--text-primary);
}

.article-body p {
    margin-bottom: 32px;
}

.article-body h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 48px 0 24px;
}

.article-body blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 24px;
    font-style: italic;
    color: var(--text-secondary);
    margin: 40px 0;
}

/* Editor Specific Styles */
.editor-main {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 0 64px 100px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.editor-header {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-overlay);
    backdrop-filter: blur(20px);
    margin: 0 -64px;
    padding: 0 64px;
    border-bottom: 1px solid transparent;
}

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

.editor-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.editor-btn.secondary {
    background-color: var(--bg-surface);
    color: var(--text-secondary);
}

.editor-btn.secondary:hover {
    background-color: var(--border-strong);
    color: var(--text-primary);
}

.editor-btn.primary {
    background-color: var(--text-primary);
    color: #ffffff;
}

.editor-btn.primary:hover {
    background-color: #000000;
    transform: translateY(-1px);
}

.editor-btn.primary:active {
    transform: scale(0.98);
}

.editor-header.scrolled {
    border-bottom: 1px solid var(--border-color);
}

.editor-body {
    max-width: 800px;
    margin: 80px auto 0;
}

.editor-title-input {
    width: 100%;
    font-size: 42px;
    font-weight: 800;
    border: none;
    outline: none;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.editor-title-input::placeholder {
    color: var(--border-strong);
}

.editor-content-area {
    font-size: 19px;
    line-height: 1.8;
    color: var(--text-primary);
    min-height: 500px;
    outline: none;
}

.editor-content-area[contenteditable=true]:empty:before {
    content: attr(placeholder);
    color: var(--border-strong);
    pointer-events: none;
}

/* Fixed Top Toolbar (Proper Editor Style) */
.editor-toolbar-wrapper {
    position: sticky;
    top: 72px; /* Below the editor header */
    left: 0;
    right: 0;
    z-index: 99;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 64px;
    display: flex;
    align-items: center;
    gap: 24px;
    overflow-x: auto;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-right: 20px;
    border-right: 1px solid var(--border-color);
}

.toolbar-group:last-child {
    border-right: none;
}

.t-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: var(--text-secondary);
    background: transparent;
    font-size: 14px;
    transition: all 0.2s;
}

.t-btn:hover {
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

.t-btn.active {
    background-color: var(--bg-surface);
    color: var(--primary);
}

.t-select {
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}

.t-select:hover {
    background: var(--bg-surface);
}

/* Editor Main Adjustment */
.editor-main {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 0 0 100px; /* Remove side padding, move it to children */
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.editor-body {
    max-width: 800px;
    margin: 48px auto 0;
    width: 100%;
    padding: 0 40px;
    flex: 1;
}

/* Restored Editor Sidebar (Settings) */
.editor-sidebar {
    width: 360px;
    height: 100vh;
    border-left: 1px solid var(--border-color);
    background-color: #ffffff;
    overflow-y: auto;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 32px;
}

.editor-container.focus-mode .editor-sidebar {
    transform: translateX(360px);
    width: 0;
    padding: 0;
    margin-right: -360px;
}

.setting-section {
    margin-bottom: 40px;
}

.setting-label {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 20px;
    display: block;
}

.series-card {
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.series-card:hover {
    border-color: var(--border-strong);
}

.series-card.active {
    border-color: var(--primary);
    background-color: rgba(49, 130, 246, 0.04);
}

.series-card .title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.series-card .count {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* SEO Preview */
.seo-preview-card {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

.seo-url {
    font-size: 12px;
    color: #202124;
    margin-bottom: 4px;
    display: block;
}

.seo-title {
    font-size: 18px;
    color: #1a0dab;
    margin-bottom: 4px;
    font-weight: 400;
}

.seo-desc {
    font-size: 13px;
    color: #4d5156;
    line-height: 1.5;
}

/* Toggle Switch */
.switch-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.switch {
    width: 40px;
    height: 20px;
    background: #e5e8eb;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.switch::after {
    content: '';
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 2px;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.switch.active {
    background: var(--primary);
}

.switch.active::after {
    transform: translateX(20px);
}

/* Responsive Editor */
@media (max-width: 1000px) {
    .editor-sidebar {
        display: none;
    }
}
@media (max-width: 1200px) {
    .sidebar-right {
        display: none;
    }
}

@media (max-width: 900px) {
    .sidebar-left {
        width: 80px;
        padding: 40px 10px;
    }
    .brand-logo {
        padding-left: 0;
        text-align: center;
        font-size: 20px;
    }
    .nav-label, .nav-item span, .user-info, .write-btn {
        display: none;
    }
    .nav-item {
        justify-content: center;
        padding: 12px 0;
    }
    .main-content {
        padding: 30px 24px;
    }
}

@media (max-width: 900px) {
    .sidebar-left {
        display: none !important; /* Fully hide desktop sidebar */
    }
    .main-content {
        padding: 30px 16px 80px; /* Add bottom padding for nav */
    }
    .app-container {
        flex-direction: column;
    }
    .bottom-nav {
        display: flex !important;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 24px;
    }
    .hero-desc {
        font-size: 16px;
    }
    .article-title-l {
        font-size: 30px;
    }
    .article-card {
        flex-direction: column-reverse;
        gap: 16px;
    }
    .card-thumb {
        width: 100%;
        height: 200px;
    }
}

/* Bottom Navigation Bar (Mobile Only) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--bg-overlay);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-tertiary);
    text-decoration: none;
    flex: 1;
}

.bottom-nav-item i {
    font-size: 20px;
}

.bottom-nav-item span {
    font-size: 10px;
    font-weight: 700;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.write-circle {
    margin-top: -30px;
    background: var(--primary);
    color: #ffffff;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex: none;
    box-shadow: 0 4px 12px rgba(49, 130, 246, 0.3);
    justify-content: center;
}

/* Admin Dashboard Styles */
.admin-container {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.admin-card {
    background: #ffffff;
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.admin-card h4 {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.admin-card .val {
    font-size: 28px;
    font-weight: 800;
}

.admin-table-wrapper {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: var(--bg-surface);
    text-align: left;
    padding: 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
}

.admin-table td {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.status-badge.published { background: #e3f9e5; color: #198754; }
.status-badge.draft { background: #fff4e6; color: #fd7e14; }

/* Search Page Styles */
.search-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 64px 24px;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 48px;
}

.search-input-wrapper i {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-quaternary);
}

.search-page-input {
    width: 100%;
    padding: 20px 24px 20px 64px;
    font-size: 20px;
    font-weight: 600;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    outline: none;
    transition: all 0.2s;
}

.search-page-input:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.search-results-info {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 24px;
}
.author-stories {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0 32px;
    scrollbar-width: none;
    margin-bottom: 24px;
}

.author-stories::-webkit-scrollbar {
    display: none;
}

.story-item {
    flex: 0 0 72px;
    text-align: center;
    cursor: pointer;
}

.story-avatar-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    padding: 3px;
    border: 2px solid var(--primary);
    margin-bottom: 8px;
    transition: transform 0.2s;
}

.story-item:hover .story-avatar-wrapper {
    transform: scale(1.05);
}

.story-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-surface);
}

.story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Explore Page Specifics */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 32px;
}

.explore-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.explore-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.explore-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    color: white;
    font-weight: 700;
}

.explore-card:hover .explore-overlay {
    opacity: 1;
}

.category-tags {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 16px 0;
    scrollbar-width: none;
}

.category-tag {
    white-space: nowrap;
    padding: 8px 18px;
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.category-tag.active {
    background: var(--text-primary);
    color: white;
    border-color: var(--text-primary);
}

/* Authentication Pages (Korean Platform Style - Minimal & Mobile First) */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #ffffff; /* Clean white background like Toss/Velog */
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 360px; /* Slimmer for better focus */
    padding: 60px 0; /* Vertical breathing room */
}

@media (max-width: 480px) {
    .auth-card {
        padding: 40px 0;
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 48px;
}

.auth-brand {
    font-size: 36px;
    font-weight: 950;
    letter-spacing: -2px;
    margin-bottom: 12px;
    display: block;
    color: var(--text-primary);
}

.auth-title {
    font-size: 17px;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: -0.5px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-input {
    width: 100%;
    padding: 16px;
    background-color: var(--bg-surface);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 15px;
    outline: none;
    transition: all 0.2s;
}

.form-input:focus {
    background-color: #ffffff;
    border-color: var(--primary);
}

.auth-submit {
    width: 100%;
    padding: 16px;
    background-color: var(--primary);
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    border-radius: var(--radius-md);
    margin-top: 8px;
    transition: all 0.2s;
}

.auth-submit:hover {
    background-color: var(--primary-hover);
}

.auth-divider {
    text-align: center;
    margin: 32px 0;
    position: relative;
    color: var(--text-quaternary);
    font-size: 13px;
    font-weight: 500;
}

.social-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-btn {
    width: 100%;
    height: 52px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: opacity 0.2s;
}

/* Social Specific Colors (Korean Market Context) */
.social-btn.kakao { background-color: #FEE500; color: #191919; border: none; }
.social-btn.naver { background-color: #03C75A; color: #ffffff; border: none; }
.social-btn.google { background-color: #ffffff; color: #191f28; border: 1px solid var(--border-strong); }

.social-btn:hover {
    opacity: 0.9;
}

.auth-footer {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 14px;
    color: var(--text-tertiary);
}

.auth-footer a {
    color: var(--text-secondary);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}
