﻿/* Import modern fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* Root variables for theming - Dark theme as default */
:root {
    --bg-light: #f5f5f5;
    --bg-dark: #181818;
    --card-light: #fff;
    --card-dark: #282828;
    --text-light: #030303;
    --text-dark: #f1f1f1;
    --accent: #ff0000;
    --hover: rgba(255, 255, 255, 0.05);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --sidebar-width: 200px;
    --sidebar-widthhalf: 180px;
    --rightnav-width: 400px;
    --background: var(--bg-dark);
    --card: var(--card-dark);
    --text: var(--text-dark);
}

/* Force dark theme for light-preferring devices */
@media (prefers-color-scheme: light) {
    :root {
        --background: var(--bg-dark);
        --card: var(--card-dark);
        --text: var(--text-dark);
        --hover: rgba(255, 255, 255, 0.05);
    }
}

/* Light mode override */
.light-mode {
    --background: var(--bg-light);
    --card: var(--card-light);
    --text: var(--text-light);
    --hover: rgba(0, 0, 0, 0.05);
}

.loading {
    text-align: center;
    padding: 20px;
    min-height: 50px; /* Ensure enough height for visibility */
    display: block !important; /* Override any display: none */
    margin: 20px 0; /* Add spacing to avoid overlap */
}

    .loading::after {
        content: '';
        display: inline-block;
        width: 24px;
        height: 24px;
        border: 3px solid var(--accent, #007bff); /* Fallback color if --accent undefined */
        border-top-color: transparent;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Base styles */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background: var(--background);
    color: var(--text);
    transition: all 0.3s ease;
}

/* Ensure descriptions under inputs look clean */
.uploadballoon {
    margin-top: 8px;
    font-size: 13px;
    color: #aaa;
    line-height: 1.4;
}

/* Toggle button styling */
.toggle-btn {
    background: linear-gradient(135deg, var(--card), var(--background));
    color: var(--text);
    border: 1px solid var(--text);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    width: auto;
    max-width: 250px;
    text-align: center;
    display: block;
    margin: 0 auto 10px auto;
    transition: background 0.2s ease, border-color 0.2s ease;
}

    .toggle-btn:hover {
        background: linear-gradient(135deg, rgba(255, 0, 0, 0.05), rgba(255, 0, 0, 0.1));
        border-color: var(--accent);
    }

.light-mode .toggle-btn {
    border-color: #ccc;
}

/* Optional text styling */
.optional-text {
    font-size: 12px;
    font-weight: 400;
    color: #aaa;
    margin-left: 5px;
}

/* Adjust section containers */
#title-section,
#tags-section,
#description-section,
#visibility-section,
#section-60seconds,
#section-hour,
#section-24hours,
#section-7days,
#section-30days,
#section-home60seconds,
#section-home1hour,
#section-home24hours,
#section-uniqueips24hours,
#section-uniqueips12months {
    transition: all 0.3s ease;
}

/* Layout container */
.container {
    display: flex;
    width: 100%;
    padding-top: 20px;
    padding-bottom: 30px;
    padding-left: var(--sidebar-widthhalf);
    box-sizing: border-box;
}

/* Navbar toggle button (hidden on desktop) */
.navbar-toggle-btn {
    display: none;
    background: none;
    border: none;
    padding: 0;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    border-radius: 4px;
}

    .navbar-toggle-btn:hover {
        background: var(--hover);
    }

/* Search toggle button (hidden on desktop) */
.search-toggle-btn {
    display: none;
    background: none;
    border: none;
    padding: 0;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    border-radius: 4px;
}

    .search-toggle-btn:hover {
        background: var(--hover);
    }

/* Sidebar (Left Navbar) */
.sidebar {
    width: var(--sidebar-width);
    background: var(--card);
    padding: 16px 0;
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    border-right: 1px solid #333;
    z-index: 10;
    transition: transform 0.3s ease;
}

.light-mode .sidebar {
    border-right: 1px solid #e0e0e0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}

    .sidebar-item:hover {
        background: var(--hover);
    }

    .sidebar-item.home-link {
        font-weight: 500;
    }

    .sidebar-item i {
        margin-right: 16px;
        width: 24px;
        text-align: center;
    }

.treeview {
    padding: 0;
}

.treeview-header {
    padding: 12px 24px;
    font-weight: 500;
    cursor: pointer;
}

    .treeview-header:hover {
        background: var(--hover);
    }

.treeview-content {
    display: none;
    padding-left: 24px;
}

    .treeview-content a {
        display: block;
        padding: 8px 24px;
        color: var(--text);
        text-decoration: none;
        font-size: 13px;
    }

        .treeview-content a:hover {
            background: var(--hover);
        }

/* Main content area */
.main-content {
    width: calc(100% - var(--rightnav-width));
    padding: 20px;
    box-sizing: border-box;
    flex-grow: 1;
}

/* Right navigation bar */
.rightnavbar {
    width: var(--rightnav-width);
    padding: 20px;
    box-sizing: border-box;
    border-left: 1px solid #ccc;
    /* height: calc(100vh - 56px); */
    overflow-y: auto;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 16px;
    background: var(--card);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.logo {
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-hidden {
    opacity: 0.6;
    font-style: italic;
    color: var(--text);
}

.logo-meme {
    margin-left: 2px;
    color: var(--accent);
}

.search-container {
    flex: 1;
    max-width: 600px;
    margin: 0 24px;
}

    .search-container form {
        display: flex;
        align-items: center;
    }

    .search-container input[type="search"] {
        width: 100%;
        padding: 8px 16px;
        border: 1px solid #444;
        border-radius: 24px 0 0 24px;
        font-size: 14px;
        outline: none;
        background: #121212;
        color: var(--text);
    }

.cd-main-content-homepage {
    overflow: visible !important;
    height: auto !important;
    position: relative !important;
    padding: 20px;
}

.light-mode .search-container input[type="search"] {
    background: var(--card);
    border-color: #ccc;
}

.search-container button {
    padding: 8px 16px;
    border: 1px solid #444;
    border-left: none;
    border-radius: 0 24px 24px 0;
    background: #333;
    cursor: pointer;
}

.light-mode .search-container button {
    background: #f8f8f8;
    border-color: #ccc;
}

/* Header right grouping */
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Standardized icon buttons (excluding theme toggle) */
.upload-btn,
.menu-btn,
.copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    padding: 0;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.3s ease;
}

    .upload-btn:hover,
    .menu-btn:hover,
    .copy-btn:hover {
        background: var(--hover);
    }

/* Theme toggle button */
.themetogglebutton {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z" stroke="%23f1f1f1" stroke-width="2"/></svg>') center/contain no-repeat;
    cursor: pointer;
    transition: background 0.3s ease;
}

.light-mode .themetogglebutton {
    background: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="5" stroke="%23030303" stroke-width="2"/><path d="M12 2V4" stroke="%23030303" stroke-width="2"/><path d="M12 20V22" stroke="%23030303" stroke-width="2"/><path d="M12 12H4" stroke="%23030303" stroke-width="2"/><path d="M20 12H22" stroke="%23030303" stroke-width="2"/><path d="M5.636 5.636L7.05 7.05" stroke="%23030303" stroke-width="2"/><path d="M16.95 16.95L18.364 18.364" stroke="%23030303" stroke-width="2"/><path d="M5.636 18.364L7.05 16.95" stroke="%23030303" stroke-width="2"/><path d="M16.95 7.05L18.364 5.636" stroke="%23030303" stroke-width="2"/></svg>') center/contain no-repeat;
}

/* Upload button specific */
.upload-btn:hover {
    color: var(--accent);
}

/* Menu button dropdown logic */
.menu-btn:hover + .dropdown,
.dropdown:hover {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease, visibility 0s linear;
}

.dropdown {
    display: block;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card);
    border-radius: 8px;
    border: 1px solid #444;
    box-shadow: var(--shadow);
    min-width: 180px;
    padding: 8px 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0s linear 0.3s;
    overflow: visible;
}

.light-mode .dropdown {
    border-color: #ccc;
}

.dropdown a {
    display: block;
    padding: 10px 20px;
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    transition: background 0.2s ease;
}

    .dropdown a:hover {
        background: var(--hover);
        color: var(--accent);
    }
/* Nested dropdown for Admin Stats */
.dropdown-parent {
    position: relative;
    z-index: 1000;
}

.dropdown-toggle {
    display: block;
    padding: 10px 20px;
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    transition: background 0.2s ease;
}

    .dropdown-toggle:hover {
        background: var(--hover);
        color: var(--accent);
    }

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; /* Below parent */
    left: 0; /* Aligned with parent */
    background: var(--card);
    border-radius: 8px;
    border: 1px solid #444;
    box-shadow: var(--shadow);
    min-width: 200px;
    padding: 8px 0;
    z-index: 10000;
    visibility: visible;
    opacity: 1;
}
/*                                        */






















/*                                        */

.light-mode .dropdown-menu {
    border-color: #ccc;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease;
}

    .dropdown-menu a:hover {
        background: var(--hover);
        color: var(--accent);
    }
/* Header top wrapper */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Search popup */
.search-popup {
    display: none;
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px;
    box-shadow: var(--shadow);
    z-index: 1001;
    width: 90%;
    max-width: 400px;
}

    .search-popup form {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

.search-popup-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #121212;
    color: var(--text);
    font-size: 14px;
}

.search-popup-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

    .search-popup-btn:hover {
        background: #cc0000;
    }

.light-mode .search-popup {
    border-color: #ccc;
}

.light-mode .search-popup-input {
    border-color: #ccc;
    background: var(--card);
}

/* Video frame for main content */
.video-frame-large {
    width: 100%;
    max-width: 1920px;
    margin: 0 0 20px 0;
    overflow: hidden;
}

    .video-frame-large video,
    .video-frame-large img,
    .video-frame-large embed,
    .video-frame-large object {
        padding-top:5px;
        width: 100%;
        height: 100%;
        /*max-height: 850px;
        object-fit: contain;*/
        overflow:auto;
        max-height:80vh;
    }

/* Details below the video */
.video-details {
    width: 100%;
    max-width: 1920px;
    margin: 0;
    padding: 0;
    word-wrap: break-word;
    max-height: 150px;
    overflow: hidden;
}

    .video-details h1 {
        font-size: 20px;
        margin: 0 0 10px 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .video-details p {
        font-size: 14px;
        margin: 0 0 10px 0;
        max-height: 40px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* Action buttons for Edit, Delete, and Comment Post */
.button-action {
    background: linear-gradient(135deg, var(--accent), #cc0000);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.3s ease;
    display: inline-block;
}

    .button-action:hover {
        background: linear-gradient(135deg, #cc0000, #b30000);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
    }

/* Specific style for Delete button to differentiate */
.button-action-delete:hover {
    background: linear-gradient(135deg, #b30000, #990000);
    box-shadow: 0 4px 12px rgba(153, 0, 0, 0.3);
}

.light-mode .button-action {
    background: linear-gradient(135deg, #e60000, #b30000);
}

    .light-mode .button-action:hover {
        background: linear-gradient(135deg, #cc0000, #990000);
    }

.light-mode .button-action-delete:hover {
    background: linear-gradient(135deg, #990000, #800000);
}

/* Comments section */
.video-comments-large {
    width: 100%;
    max-width: 1920px;
    margin: 20px 0 0 0;
    padding: 0;
}

/* Comment textarea */
.form-group textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.grid {
    display: block; /* Masonry.js will handle layout */
    padding: 20px;
    position: relative;
}

.entity {
    background: var(--card);
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
    width: 250px; /* Fixed width for columns */
    margin: 4px; /* Half of 8px gap */
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: auto;
}

    .entity:hover {
        transform: translateY(-6px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    }

.video-frame {
    width: 100%;
    overflow: hidden;
    position: relative;
    min-height: 0;
    height: auto;
}

    .video-frame img {
        width: 100%;
        max-height: 400px;
        object-fit: cover;
        display: block;
    }

.thumbnail-btn {
    border: none;
    padding: 0;
    background: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .thumbnail-btn img {
        width: 100%;
        height: auto;
        max-height: 400px; /* Cap the height of tall thumbnails */
        object-fit: contain;
    }

.video-title {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 6px 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-meta {
    padding: 0 6px 3px;
    font-size: 9px;
    color: #bbb;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    max-height: 18px;
    overflow: hidden;
}

.light-mode .video-meta {
    color: #555;
}

.video-meta span {
    display: flex;
    align-items: center;
}

.video-meta img {
    width: 14px;
    height: 14px;
    margin-right: 3px;
}

.visibility {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

    .visibility span {
        display: flex;
        align-items: center;
    }

.vote-buttons {
    display: flex;
    gap: 2px;
    white-space: nowrap;
    flex-shrink: 0;
    max-height: 16px;
    overflow: hidden;
}

.button-vote {
    background: none;
    border: none;
    color: #ccc;
    font-size: 9px;
    cursor: pointer;
    padding: 0 3px;
    display: flex;
    align-items: center;
    gap: 2px;
    transition: color 0.2s ease, transform 0.1s ease;
}

    .button-vote:hover {
        color: var(--accent);
        transform: scale(1.1);
    }

    .button-vote:active {
        transform: scale(0.95);
    }

.light-mode .button-vote {
    color: #444;
}

.vote-icon {
    vertical-align: middle;
}

.tags {
    padding: 0 6px 3px;
    font-size: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    max-height: 16px;
    overflow: hidden;
}

.tag {
    background: #404040;
    color: #f1f1f1;
    padding: 1px 3px;
    border-radius: 6px;
    text-decoration: none;
}

    .tag:hover {
        background: var(--accent);
        transform: scale(1.05);
    }

    .tag:active {
        transform: scale(0.95);
    }

.light-mode .tag {
    background: #e0e0e0;
    color: #030303;
}

/* Pagination */
.pagination {
    margin-top: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.button-page {
    background: var(--accent);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    transition: background 0.2s ease;
}

.light-mode .button-page {
    border-color: #ccc;
}

.button-page:hover {
    background: #cc0000;
}

.page-indicator {
    font-size: 14px;
    color: var(--text);
}

/* Total posts */
.total-posts {
    text-align: center;
    font-size: 14px;
    color: #aaa;
    margin-top: 16px;
}

.light-mode .total-posts {
    color: #606060;
}

/* Upload card and related styles */
.upload-card {
    padding: 20px;
    background: var(--card);
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.upload-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

.dropzone {
    border: 2px dashed #444;
    background: linear-gradient(135deg, var(--card), var(--background));
    padding: 35px;
    border-radius: 12px;
    text-align: center;
    transition: border-color 0.3s ease, background 0.3s ease;
    margin-bottom: 30px;
}

.light-mode .dropzone {
    border-color: #ccc;
    background: linear-gradient(135deg, var(--card), var(--background));
}

.dropzone:hover {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.05), rgba(255, 0, 0, 0.1));
}

.dz-message span {
    font-size: 20px;
    font-weight: 500;
    color: var(--text);
}

.dz-subtext {
    font-size: 13px;
    color: #aaa;
    line-height: 1.4;
    display: block;
    margin-top: 5px;
}

.upload-metadata {
    display: grid;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-control {
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #121212;
    color: var(--text);
}

.light-mode .form-control {
    border-color: #ccc;
    background: var(--card);
}

input[type="text"],
textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

    input[type="text"]:focus,
    textarea:focus {
        border-color: var(--accent);
        box-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
        outline: none;
    }

.button-68-sm-tag-btn {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--text);
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    margin: 5px;
}

    .button-68-sm-tag-btn:hover {
        background: var(--accent);
        color: #fff;
        border-color: var(--accent);
        transform: scale(1.05);
    }

input[type="checkbox"] {
    accent-color: var(--accent);
    cursor: pointer;
}

.button-68 {
    background: linear-gradient(135deg, var(--accent), #cc0000);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.3s ease;
    display: inline-block;
}

    .button-68:hover {
        background: linear-gradient(135deg, #cc0000, #b30000);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
    }

.button-68-dropzone-hidden {
    background: linear-gradient(135deg, var(--accent), #cc0000);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.3s ease;
    display: inline-block;
}

    .button-68-dropzone-hidden:hover {
        background: linear-gradient(135deg, #cc0000, #b30000);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
    }

.file-upload-wrapper {
    border: 2px dashed var(--text);
    background: var(--card);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease;
    margin-bottom: 20px;
}

    .file-upload-wrapper:hover {
        border-color: var(--accent);
    }

.file-upload-label {
    display: block;
    color: var(--text);
}

    .file-upload-label span {
        display: block;
    }

    .file-upload-label .file-upload-subtext {
        font-size: 13px;
        color: #aaa;
        margin-top: 5px;
        line-height: 1.4;
    }

.file-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.file-preview-item {
    background: var(--background);
    border: 1px solid var(--text);
    border-radius: 4px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text);
}

    .file-preview-item img,
    .file-preview-item video {
        max-width: 100%;
        max-height: 100px;
        object-fit: cover;
    }

    .file-preview-item span {
        font-size: 12px;
        word-break: break-all;
        margin-top: 5px;
    }

    .file-preview-item .remove-btn {
        background: var(--accent);
        color: #fff;
        border: none;
        padding: 2px 8px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 10px;
        margin-top: 5px;
    }

        .file-preview-item .remove-btn:hover {
            background: #cc0000;
        }

.light-mode .file-upload-wrapper {
    border-color: #ccc;
}

.light-mode .file-preview-item {
    background: #f8f8f8;
    border-color: #ccc;
}

.upload-info {
    margin-top: 20px;
    font-size: 14px;
    color: #aaa;
}

.dz-preview {
    margin: 10px 0;
    padding: 10px;
    background: #333;
    border-radius: 4px;
}

.light-mode .dz-preview {
    background: #e0e0e0;
}

.browse-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 14px;
}

    .browse-btn:hover {
        background: #cc0000;
    }

.dz-progress {
    height: 5px;
    background: #444;
    border-radius: 2px;
    overflow: hidden;
    display: none;
}

.dz-upload {
    height: 100%;
    background: var(--accent);
    width: 0;
    transition: width 0.3s ease;
}

.dz-error-message {
    color: var(--accent);
    font-size: 12px;
}

.video-frame-large {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
}

    .video-frame-large img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

.disclaimer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(24, 24, 24, 0.9);
    color: #f1f1f1;
    padding: 10px 20px;
    text-align: center;
    font-size: 12px;
    font-family: 'Roboto', sans-serif;
    z-index: 1000;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease, color 0.3s ease;
}

    .disclaimer-bar p {
        margin: 0;
    }

    .disclaimer-bar a {
        color: var(--accent);
        text-decoration: none;
        transition: color 0.2s ease;
    }

        .disclaimer-bar a:hover {
            color: #cc0000;
        }

.light-mode .disclaimer-bar {
    background: rgba(245, 245, 245, 0.9);
    color: #030303;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}





/* Add/append these to the <style> in Home.cshtml */

/* Overlay enhancements */
#paste-overlay {
    transition: opacity 0.3s ease;
}

    #paste-overlay > div {
        transform: scale(0.95);
    }

    #paste-overlay[style*="display: flex"] > div {
        animation: fadeInScale 0.3s ease forwards;
    }

@keyframes fadeInScale {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Form elements alignment and fancy styles */
.form-group {
    display: flex;
    flex-direction: column;
}

    .form-group label {
        transition: color 0.2s ease;
    }

    .form-group input,
    .form-group textarea {
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

        .form-group input:focus,
        .form-group textarea:focus {
            border-color: var(--accent);
            box-shadow: 0 0 8px rgba(255, 0, 0, 0.2);
        }

/* Buttons with hover effects */
.button-action {
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

    .button-action:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 16px rgba(255, 0, 0, 0.4);
    }

.button-action-delete:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(153, 0, 0, 0.4);
}

/* Preview image with subtle border */
#paste-preview {
    border: 1px solid var(--hover);
    transition: box-shadow 0.3s ease;
}

    #paste-preview:hover {
        box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
    }

/* Light mode adjustments */
.light-mode #paste-overlay > div {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.light-mode .form-group input,
.light-mode .form-group textarea {
    background: #f8f8f8;
    border-color: #ccc;
}

.light-mode #paste-preview {
    border-color: #e0e0e0;
}


















/* Enhanced Mobile Responsiveness */
@media (max-width: 1200px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .video-frame-large {
        max-width: 100%;
        height: calc(100% * 9 / 16);
    }

    .entity {
        width: 200px;
    }
}

@media (max-width: 900px) {
    :root {
        --sidebar-width: 72px;
    }

    .container {
        padding-left: var(--sidebar-width);
    }

    .sidebar {
        width: var(--sidebar-width);
    }

    .main-content {
        width: 100%;
        padding: 15px;
    }

    .rightnavbar {
        display: none;
    }

    .video-frame-large {
        height: calc(100% * 9 / 16);
    }
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .entity {
        width: 180px;
    }
}

@media (max-width: 600px) {
    :root {
        --sidebar-width: 200px;
    }

    .entity {
        width: 160px;
    }

    .container {
        padding-left: 0;
    }

    .sidebar {
        width: var(--sidebar-width);
        transform: translateX(-100%);
    }

        .sidebar.sidebar-visible {
            transform: translateX(0);
        }

            .sidebar.sidebar-visible .sidebar-item {
                justify-content: flex-start;
                padding: 12px 24px;
            }

                .sidebar.sidebar-visible .sidebar-item span {
                    display: inline;
                }

                .sidebar.sidebar-visible .sidebar-item i {
                    margin-right: 16px;
                }

            .sidebar.sidebar-visible .treeview-header {
                padding: 12px 24px;
                text-align: left;
            }

            .sidebar.sidebar-visible .treeview-content {
                padding-left: 24px;
            }

                .sidebar.sidebar-visible .treeview-content a {
                    padding: 8px 24px;
                    text-align: left;
                }

    .main-content {
        width: 100%;
        padding: 10px;
    }

    .navbar-toggle-btn,
    .search-toggle-btn {
        display: flex;
    }

    .search-container {
        display: none;
    }

    .grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .video-frame-large {
        height: auto;
        max-height: 50vh;
    }

    .video-details {
        max-height: none;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0 10px;
    }

    .dropzone {
        padding: 15px;
    }

    .dz-message span {
        font-size: 16px;
    }

    .main-content {
        padding: 10px;
    }

    .dz-subtext {
        font-size: 12px;
    }

    .toggle-btn {
        max-width: 180px;
        font-size: 12px;
        padding: 6px 12px;
    }

    .optional-text {
        font-size: 10px;
    }

    .uploadballoon {
        font-size: 11px;
    }

    .file-preview {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .entity {
        width: calc(100% - 8px); /* Full width minus margin */
    }
}

@media (max-width: 360px) {
    .header {
        padding: 0 5px;
    }

    .main-content {
        padding: 8px;
    }

    .logo {
        font-size: 18px;
    }

    .navbar-toggle-btn,
    .search-toggle-btn,
    .themetogglebutton,
    .upload-btn,
    .menu-btn {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }

    .dropzone {
        padding: 10px;
    }

    .dz-message span {
        font-size: 14px;
    }

    .dz-subtext {
        font-size: 11px;
    }

    .toggle-btn {
        max-width: 160px;
        font-size: 11px;
        padding: 6px 10px;
    }

    .optional-text {
        font-size: 9px;
    }

    .uploadballoon {
        font-size: 10px;
    }

    .button-68,
    .button-68-dropzone-hidden {
        padding: 10px;
        font-size: 13px;
    }

    .button-68-sm-tag-btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    .file-preview-item img,
    .file-preview-item video {
        max-height: 80px;
    }
}
