:root {
    /* Modern Professional Palette */
    --primary: #2563eb;
    /* Royal Blue */
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;
    --secondary: #64748b;
    /* Slate */
    --accent: #0f172a;
    /* Navy/Black */

    --bg-body: #f8fafc;
    /* very light blue-gray */
    --bg-card: #ffffff;

    --text-main: #1e293b;
    --text-muted: #64748b;

    --border-light: #e2e8f0;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

body {
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "ss01" 1;
}

/* Layout */
.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 1rem 0.75rem;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.brand {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand span {
    color: var(--primary);
}

.brand i,
.brand svg {
    font-size: 1.25rem;
    width: 1em;
    height: 1em;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    margin-left: 1.5rem;
    transition: color 0.2s;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

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

.nav-links i,
.nav-links svg {
    font-size: 0.875rem;
    width: 1em;
    height: 1em;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: #ffffff;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.card-body {
    padding: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 0.75rem;
}

.form-label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.85rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    /* 2/3 of 1rem */
    line-height: 1.5;
    color: var(--text-main);
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
    font-family: inherit;
}

.form-control:focus {
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    gap: 0.5rem;
    line-height: 1;
}

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

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

.btn-secondary {
    background-color: white;
    border: 1px solid var(--border-light);
    color: var(--text-muted);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    color: var(--text-main);
    background-color: #f8fafc;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn i,
.btn svg {
    font-size: 0.875rem;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

/* Login Box */
.login-wrapper {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    width: 100%;
    max-width: 400px;
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    font-size: 1.75rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
}

/* Post List */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.data-table th,
.data-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.data-table tbody tr {
    transition: background-color 0.15s;
}

.data-table tbody tr:hover {
    background-color: #f8fafc;
}

.data-table td {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: -0.01em;
}

.data-table td a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8125rem;
    letter-spacing: -0.02em;
}

.data-table td a:hover {
    color: var(--primary);
}

.icon-user {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 0.375rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* File type icons */
.file-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.file-icon-item {
    display: inline-flex;
    align-items: center;
    position: relative;
}

.icon-file {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.icon-image {
    color: #10b981;
}

.icon-pdf {
    color: #ef4444;
}

.icon-zip {
    color: #f59e0b;
}

.icon-other {
    color: #64748b;
}


.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: 9999px;
    background: #f1f5f9;
    color: #64748b;
    letter-spacing: 0;
}

/* Detail View */
.post-detail-header {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.post-title-large {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 1rem 0;
    line-height: 1.35;
    letter-spacing: -0.03em;
}

.post-meta-row {
    display: flex;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 400;
}

.post-content-area {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--text-main);
    min-height: 200px;
    letter-spacing: -0.01em;
}

.actions-row {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* File Uploader Customization */
file-uploader {
    --uploader-primary: var(--primary);
    --uploader-bg: #f8fafc;
    --uploader-border: var(--border-light);
    --uploader-text: var(--text-main);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    margin-bottom: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: translate(30%, -30%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    letter-spacing: -0.02em;
}

.hero-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.hero-description {
    font-size: 0.9375rem;
    margin: 0 0 1.25rem 0;
    opacity: 0.95;
    line-height: 1.6;
}

.hero-description code {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.hero-features .feature-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.hero-features .feature-item svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.hero-usage {
    font-size: 0.8125rem;
    background: rgba(0, 0, 0, 0.15);
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hero-usage strong {
    font-weight: 600;
}

.hero-usage span {
    opacity: 0.9;
}

@media (max-width: 640px) {
    .hero-section {
        padding: 1.5rem;
    }

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

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

    .hero-features {
        gap: 0.5rem;
    }

    .hero-features .feature-item {
        font-size: 0.75rem;
        padding: 0.25rem 0.625rem;
    }

    .hero-usage {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}