/* EMF Chicago - Main Stylesheet */

/* Reset and Base */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #000;
    color: #fff;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #FFC107;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #FFD54F;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: #111;
    border-bottom: 1px solid #222;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo {
    height: 40px;
    width: auto;
}

.site-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #FFC107;
}

.site-nav {
    display: flex;
    gap: 20px;
}

.site-nav a {
    color: #ccc;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s;
}

.site-nav a:hover {
    color: #FFC107;
    background: rgba(255, 193, 7, 0.1);
}

/* Main Content */
.site-main {
    flex: 1;
    padding: 40px 0;
}

/* Footer */
.site-footer {
    background: #111;
    border-top: 1px solid #222;
    padding: 20px 0;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.site-footer p {
    margin: 5px 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 0;
    border-bottom: 1px solid #222;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2.5rem;
    color: #FFC107;
    margin: 0 0 15px;
}

.hero p {
    font-size: 1.1rem;
    color: #888;
    max-width: 600px;
    margin: 0 auto;
}

/* Items Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.item-card {
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #222;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.item-card-image {
    position: relative;
    padding-top: 56.25%;
    background: #1a1a1a;
    overflow: hidden;
}

.item-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #FFC107;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.item-card-content {
    padding: 20px;
}

.item-card-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.3;
}

.item-card-description {
    font-size: 0.9rem;
    color: #888;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #222;
    font-size: 0.8rem;
    color: #666;
}

/* Detail Page */
.item-detail {
    max-width: 900px;
    margin: 0 auto;
}

.item-detail-header {
    margin-bottom: 30px;
}

.item-detail-title {
    font-size: 2rem;
    color: #FFC107;
    margin: 0 0 15px;
}

.item-detail-meta {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.item-detail-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.item-detail-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.item-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.item-detail-description {
    font-size: 1.1rem;
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 30px;
    white-space: pre-wrap;
}

.item-detail-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.tag {
    background: #222;
    color: #FFC107;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Code Preview */
.code-preview {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #222;
    padding: 10px 15px;
}

.code-header .file-type {
    color: #FFC107;
    font-weight: bold;
    font-size: 0.85rem;
}

.code-header .filename {
    color: #888;
    font-size: 0.85rem;
}

.code-preview pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
    max-height: 500px;
}

.code-preview code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

/* Markdown Content */
.markdown-content {
    background: #111;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    color: #FFC107;
    margin-top: 30px;
}

.markdown-content h1:first-child,
.markdown-content h2:first-child,
.markdown-content h3:first-child {
    margin-top: 0;
}

.markdown-content code {
    background: #1a1a1a;
    padding: 2px 6px;
    border-radius: 4px;
}

.markdown-content pre code {
    display: block;
    padding: 15px;
    overflow-x: auto;
}

.markdown-content blockquote {
    border-left: 4px solid #FFC107;
    margin: 20px 0;
    padding-left: 20px;
    color: #888;
}

.markdown-content ul,
.markdown-content ol {
    padding-left: 25px;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.markdown-content th,
.markdown-content td {
    border: 1px solid #333;
    padding: 10px;
    text-align: left;
}

.markdown-content th {
    background: #1a1a1a;
    color: #FFC107;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: #4CAF50;
    color: #000;
}

.btn-primary:hover {
    background: #66BB6A;
    color: #000;
}

.btn-secondary {
    background: #333;
    color: #fff;
}

.btn-secondary:hover {
    background: #444;
    color: #fff;
}

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

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

.btn.copied {
    background: #4CAF50 !important;
    color: #000 !important;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #ccc;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #FFC107;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group small {
    display: block;
    color: #666;
    margin-top: 5px;
    font-size: 0.85rem;
}

.form-group input[type="file"] {
    padding: 10px;
    background: #1a1a1a;
    border: 1px dashed #333;
    border-radius: 4px;
    color: #888;
}

/* Messages */
.message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.message-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4CAF50;
    color: #4CAF50;
}

.message-error {
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid #FF5252;
    color: #FF5252;
}

.message-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid #FFC107;
    color: #FFC107;
}

/* Admin Styles */
.admin-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    min-height: calc(100vh - 200px);
}

.admin-sidebar {
    background: #111;
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.admin-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-nav li {
    margin-bottom: 5px;
}

.admin-nav a {
    display: block;
    padding: 12px 15px;
    color: #ccc;
    border-radius: 4px;
    transition: all 0.3s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(255, 193, 7, 0.1);
    color: #FFC107;
}

.admin-content {
    background: #111;
    border-radius: 8px;
    padding: 30px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #222;
}

.admin-header h1 {
    margin: 0;
    color: #FFC107;
    font-size: 1.5rem;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #1a1a1a;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #FFC107;
    margin-bottom: 5px;
}

.stat-label {
    color: #888;
    font-size: 0.9rem;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #222;
}

.data-table th {
    color: #888;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.data-table .actions {
    display: flex;
    gap: 10px;
}

.data-table .actions a,
.data-table .actions button {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state h3 {
    color: #888;
    margin-bottom: 10px;
}

/* Video Player */
.video-preview {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.video-preview video {
    width: 100%;
    max-height: 500px;
    display: block;
}

/* LaTeX/TeX Content */
.latex-content {
    background: #111;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    overflow-x: auto;
}

.latex-content .katex-display {
    margin: 20px 0;
    overflow-x: auto;
}

/* Item Card Lightbox Trigger */
.item-card {
    position: relative;
}

.item-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}

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

.item-card-overlay .btn {
    padding: 10px 16px;
    font-size: 0.85rem;
}

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-container {
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    z-index: 10;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: #FFC107;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    padding: 20px 15px;
    line-height: 1;
    z-index: 10;
    transition: background 0.3s, color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev {
    left: -80px;
    border-radius: 4px;
}

.lightbox-next {
    right: -80px;
    border-radius: 4px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 193, 7, 0.3);
    color: #FFC107;
}

.lightbox-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    max-height: 80vh;
}

.lightbox-media {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    min-height: 400px;
    overflow: hidden;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.lightbox-video {
    width: 100%;
    max-height: 70vh;
}

.lightbox-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 300px;
    background: #1a1a1a;
}

.lightbox-filetype {
    font-size: 4rem;
    color: #444;
    font-weight: bold;
}

.lightbox-info {
    padding: 30px;
    overflow-y: auto;
}

.lightbox-title {
    color: #FFC107;
    font-size: 1.4rem;
    margin: 0 0 15px;
    line-height: 1.3;
}

.lightbox-description {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 20px;
}

.lightbox-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    font-size: 0.85rem;
    color: #888;
}

.lightbox-meta span {
    background: #1a1a1a;
    padding: 5px 12px;
    border-radius: 4px;
}

.lightbox-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lightbox-actions .btn {
    justify-content: center;
    padding: 10px 20px;
}

/* Responsive */
@media (max-width: 1024px) {
    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .lightbox-media {
        min-height: 250px;
    }
}

@media (max-width: 768px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

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

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 2rem;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
        padding: 15px 10px;
    }
}

/* ==================== */
/* Search Styles        */
/* ==================== */

/* Hero Search Form */
.hero-search-form {
    margin-top: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-search-wrapper {
    display: flex;
    gap: 10px;
}

.hero-search-input {
    flex: 1;
    padding: 15px 20px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.hero-search-input:focus {
    outline: none;
    border-color: #FFC107;
}

.hero-search-input::placeholder {
    color: #666;
}

/* Search Page */
.search-page {
    max-width: 900px;
    margin: 0 auto;
}

.search-page h1 {
    color: #FFC107;
    margin-bottom: 30px;
}

.search-form {
    margin-bottom: 40px;
}

.search-input-wrapper {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 1.1rem;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #FFC107;
}

.search-btn {
    white-space: nowrap;
}

.search-hint {
    color: #666;
    font-size: 0.9rem;
    margin: 10px 0 0;
}

.search-results-header {
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #222;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-result-item {
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 20px;
    transition: border-color 0.3s;
}

.search-result-item:hover {
    border-color: #333;
}

.search-result-header {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.search-result-thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-result-placeholder {
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-size: 0.9rem;
    font-weight: bold;
}

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

.search-result-title {
    font-size: 1.15rem;
    margin: 0 0 8px;
    line-height: 1.3;
}

.search-result-title a {
    color: #FFC107;
}

.search-result-title a:hover {
    color: #FFD54F;
}

.search-result-meta {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.search-result-type {
    color: #888;
    font-weight: 500;
}

.search-result-matches {
    margin-bottom: 15px;
}

.search-match {
    padding: 10px 15px;
    background: #1a1a1a;
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.match-label {
    color: #888;
    font-weight: 500;
    margin-right: 10px;
}

.match-text {
    color: #ccc;
}

.match-tags {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.search-result-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-result-actions .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Highlight search matches */
mark {
    background: rgba(255, 193, 7, 0.3);
    color: #FFC107;
    padding: 1px 3px;
    border-radius: 2px;
}

/* ==================== */
/* Detail Page Layout   */
/* ==================== */

.item-detail-layout {
    max-width: 900px;
    margin: 0 auto;
}

.item-detail-layout.has-text-panel {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    max-width: 1300px;
}

/* Text Panel (right column) */
.text-panel {
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    overflow: hidden;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

.text-panel.collapsed {
    max-height: 50px;
}

.text-panel.collapsed .text-panel-content {
    display: none;
}

.text-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #1a1a1a;
    border-bottom: 1px solid #222;
}

.text-panel-header h3 {
    margin: 0;
    font-size: 0.95rem;
    color: #FFC107;
}

.text-panel-toggle {
    background: none;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.3s;
}

.text-panel-toggle:hover {
    color: #FFC107;
}

.text-panel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.text-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.parsed-text {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #ccc;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

.text-panel-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #1a1a1a;
    border-top: 1px solid #222;
}

.text-panel-info {
    font-size: 0.8rem;
    color: #666;
}

.text-panel-empty {
    padding: 20px 15px;
    color: #666;
    text-align: center;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

@media (max-width: 1024px) {
    .item-detail-layout.has-text-panel {
        grid-template-columns: 1fr;
    }

    .text-panel {
        position: static;
        max-height: 400px;
    }
}

/* ==================== */
/* Bulk Upload Styles   */
/* ==================== */

.admin-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-header-bar h1 {
    margin: 0;
    color: #FFC107;
    font-size: 1.5rem;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.bulk-upload-section {
    max-width: 800px;
}

.bulk-upload-info {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 8px;
}

.bulk-upload-info h3 {
    color: #FFC107;
    margin: 0 0 10px;
}

.bulk-upload-info p {
    color: #ccc;
    margin: 0;
    line-height: 1.6;
}

.bulk-upload-dropzone {
    border: 2px dashed #333;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 25px;
}

.bulk-upload-dropzone:hover,
.bulk-upload-dropzone.dragover {
    border-color: #FFC107;
    background: rgba(255, 193, 7, 0.05);
}

.dropzone-icon {
    font-size: 3rem;
    color: #444;
    margin-bottom: 15px;
}

.dropzone-text {
    color: #ccc;
    font-size: 1.1rem;
    margin: 0 0 10px;
}

.dropzone-hint {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.bulk-upload-queue {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.bulk-upload-queue h4 {
    color: #FFC107;
    margin: 0 0 15px;
}

.queue-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    background: #111;
    border-radius: 4px;
    margin-bottom: 8px;
}

.queue-item-name {
    flex: 1;
    color: #ccc;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-item-size {
    color: #666;
    font-size: 0.85rem;
}

.queue-item-remove {
    background: none;
    border: none;
    color: #FF5252;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    line-height: 1;
}

.queue-item-remove:hover {
    color: #FF6E6E;
}

.queue-actions {
    display: flex;
    gap: 10px;
}

.bulk-upload-progress {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin-bottom: 25px;
}

.bulk-upload-progress h4 {
    color: #FFC107;
    margin: 0 0 20px;
}

.progress-bar-container {
    background: #222;
    border-radius: 4px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar {
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    height: 100%;
    transition: width 0.3s;
}

.progress-text {
    color: #ccc;
    margin: 0;
}

.bulk-upload-results {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 25px;
}

.bulk-upload-results h4 {
    color: #FFC107;
    margin: 0 0 15px;
}

.results-summary {
    margin-bottom: 25px;
    padding: 15px;
    background: #111;
    border-radius: 4px;
}

.results-success {
    color: #4CAF50;
    margin: 0 0 5px;
}

.results-failed {
    color: #FF5252;
    margin: 0;
}

.bulk-edit-form {
    border-top: 1px solid #333;
    padding-top: 20px;
    margin-top: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .header-actions {
        flex-wrap: wrap;
    }

    .bulk-upload-dropzone {
        padding: 30px 15px;
    }

    .queue-item {
        flex-wrap: wrap;
    }
}

/* Preview image in forms */
.preview-image {
    max-width: 200px;
    max-height: 120px;
    margin-top: 10px;
    border-radius: 4px;
}

/* Item preview in admin table */
.item-preview {
    width: 60px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
}

/* Inline form for delete buttons */
.inline-form {
    display: inline;
}

/* Settings section */
.settings-section {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 25px;
}

/* ==================== */
/* Folder Styles        */
/* ==================== */

/* Breadcrumb Navigation */
.folder-breadcrumb,
.public-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    background: #1a1a1a;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.folder-breadcrumb a,
.public-breadcrumb a {
    color: #888;
    transition: color 0.3s;
}

.folder-breadcrumb a:hover,
.public-breadcrumb a:hover {
    color: #FFC107;
}

.folder-breadcrumb a:last-child,
.public-breadcrumb a:last-child {
    color: #FFC107;
    font-weight: 500;
}

.breadcrumb-sep {
    color: #444;
}

/* Folder Header (Public) */
.folder-header {
    padding: 40px 0;
    border-bottom: 1px solid #222;
    margin-bottom: 30px;
}

.folder-header h1 {
    font-size: 2rem;
    color: #FFC107;
    margin: 15px 0 10px;
}

.folder-header p {
    color: #888;
    margin: 0;
}

/* Section Headings */
.section-heading {
    font-size: 1.2rem;
    color: #ccc;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #222;
}

.section-title {
    font-size: 1rem;
    color: #888;
    margin: 0 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Public Folder Grid */
.public-folders {
    margin-bottom: 40px;
}

.public-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.public-folder-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
}

.public-folder-card:hover {
    border-color: #FFC107;
    background: #1a1a1a;
    transform: translateY(-2px);
}

.public-folder-icon {
    width: 40px;
    height: 40px;
    color: #FFC107;
    flex-shrink: 0;
}

.public-folder-icon svg {
    width: 100%;
    height: 100%;
}

.public-folder-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.public-folder-name {
    color: #fff;
    font-weight: 500;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.public-folder-count {
    color: #666;
    font-size: 0.85rem;
}

/* Admin Folder Grid */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.folder-card {
    background: #1a1a1a;
    border: 1px solid #222;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.folder-card:hover {
    border-color: #333;
}

.folder-card-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    text-decoration: none;
}

.folder-icon {
    width: 40px;
    height: 40px;
    color: #FFC107;
    flex-shrink: 0;
}

.folder-icon svg {
    width: 100%;
    height: 100%;
}

.folder-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.folder-name {
    color: #fff;
    font-weight: 500;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-meta {
    color: #666;
    font-size: 0.85rem;
}

.folder-actions {
    display: flex;
    gap: 8px;
    padding: 10px 20px;
    background: #111;
    border-top: 1px solid #222;
}

.folder-link {
    color: #FFC107;
    font-size: 0.85rem;
}

.folder-link:hover {
    color: #FFD54F;
}

/* Items List (in folder view) */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: #1a1a1a;
    border-radius: 6px;
    transition: background 0.3s;
}

.item-row:hover {
    background: #222;
}

.item-checkbox {
    flex-shrink: 0;
}

.item-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.item-icon {
    width: 50px;
    height: 35px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.file-type-badge {
    font-size: 0.7rem;
    color: #666;
    font-weight: bold;
}

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

.item-title {
    display: block;
    color: #fff;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.item-title:hover {
    color: #FFC107;
}

.item-meta {
    color: #666;
    font-size: 0.8rem;
}

.item-actions {
    flex-shrink: 0;
}

/* Move Items Bar */
.move-items-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 6px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.move-items-bar select {
    padding: 8px 12px;
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    min-width: 200px;
}

#selected-count {
    color: #FFC107;
    font-weight: 500;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
}

.modal-content h3 {
    color: #FFC107;
    margin: 0 0 15px;
}

.modal-content p {
    color: #ccc;
    margin: 0 0 20px;
}

/* Folder Section */
.folder-section {
    margin-bottom: 30px;
}

.folder-browser {
    min-height: 300px;
}

@media (max-width: 768px) {
    .folder-grid {
        grid-template-columns: 1fr;
    }

    .public-folder-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .public-folder-card {
        padding: 15px;
    }

    .move-items-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .move-items-bar select {
        min-width: auto;
        width: 100%;
    }

    .item-row {
        flex-wrap: wrap;
    }

    .item-info {
        width: 100%;
        order: 1;
    }

    .item-actions {
        width: 100%;
        order: 2;
        margin-top: 10px;
    }
}
