/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: #1a1a2e;
    padding: 0 24px;
    min-height: 56px;
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-brand {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    margin-left: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-group {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 8px;
    border-left: 1px solid #2d2d4e;
}

.nav-group:first-child {
    border-left: none;
    padding-left: 0;
}

.nav-group-label {
    color: #7878a0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 6px;
    white-space: nowrap;
}

.nav-link {
    color: #ccc;
    text-decoration: none;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 32px auto;
    padding: 0 24px;
}

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

/* Card */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 24px;
    margin-bottom: 24px;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px 16px;
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
}

.stat-label {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    font-weight: 500;
}

/* Quick Links */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: #f9f9f9;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s, box-shadow 0.2s;
}

.quick-link-card:hover {
    background: #f0f4ff;
    box-shadow: 0 2px 8px rgba(74,108,247,0.15);
}

.ql-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #4a6cf7;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.ql-text {
    font-size: 13px;
    font-weight: 600;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 48px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #4a6cf7;
    background: #f0f4ff;
}

.upload-area p {
    font-size: 16px;
    color: #666;
    margin-bottom: 12px;
}

.upload-area .upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.upload-area input[type="file"] {
    display: none;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
}

.form-group select,
.form-group input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group select:focus,
.form-group input[type="text"]:focus {
    border-color: #4a6cf7;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: #4a6cf7;
    color: #fff;
}

.btn-primary:hover {
    background: #3955d3;
}

.btn-primary:disabled {
    background: #a0b4fc;
    cursor: not-allowed;
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-top: 16px;
    overflow: hidden;
    display: none;
}

.progress-bar {
    height: 100%;
    background: #4a6cf7;
    border-radius: 4px;
    transition: width 0.3s;
    width: 0%;
}

/* Status Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-uploaded {
    background: #e8f0fe;
    color: #1967d2;
}

.badge-processing {
    background: #fef7e0;
    color: #e37400;
}

.badge-ready {
    background: #e6f4ea;
    color: #137333;
}

.badge-error {
    background: #fce8e6;
    color: #c5221f;
}

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

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

table th, table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

table th {
    font-weight: 600;
    color: #555;
    background: #fafafa;
}

table tr:hover {
    background: #fafafa;
}

/* Status Message */
.status-msg {
    margin-top: 12px;
    font-size: 14px;
    color: #666;
}

.status-msg.error {
    color: #c5221f;
}

.status-msg.success {
    color: #137333;
}

/* Filters */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filters .form-group {
    margin-bottom: 0;
}

/* Selected file info */
.selected-file-info {
    margin-top: 12px;
    font-size: 14px;
    color: #333;
}

/* Video Preview */
.video-preview {
    width: 80px;
    height: 142px;
    object-fit: cover;
    border-radius: 6px;
    background: #000;
    cursor: pointer;
}

.video-preview:hover {
    outline: 2px solid #4a6cf7;
}

/* Video Modal */
.video-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.video-modal-overlay.active {
    display: flex;
}

.video-modal-overlay video {
    max-height: 90vh;
    max-width: 90vw;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-container {
        flex-wrap: wrap;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 12px 0;
        gap: 4px;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-group {
        flex-direction: column;
        align-items: flex-start;
        border-left: none;
        padding: 4px 0;
        gap: 0;
    }

    .nav-group-label {
        margin-bottom: 2px;
    }

    .nav-link {
        padding: 8px 12px;
        width: 100%;
    }

    .main-content {
        padding: 0 16px;
    }

    .upload-area {
        padding: 32px 16px;
    }

    .filters {
        flex-direction: column;
    }

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

/* Pagination */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 0 8px;
}

.page-btn {
    min-width: 36px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
}

.page-btn:hover:not(:disabled):not(.page-active) {
    background: #f0f0f0;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.page-active {
    background: #4a90d9;
    color: #fff;
    border-color: #4a90d9;
}

.page-dots {
    padding: 0 4px;
    color: #999;
}

.page-info {
    margin-left: 12px;
    font-size: 13px;
    color: #888;
}
