/* Font Import */
@font-face {
    font-family: 'Font Awesome 6 Free';
    src: url('../webfonts/fa-solid-900.woff2') format('woff2');
}

/* General Body Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
}
.add-category-btn {
    background: transparent;
    border: none;
    color: #8e2de2;
    font-size: 16px;
    cursor: pointer;
    margin-left: 8px;
    transition: transform 0.2s;
}
.add-category-btn:hover {
    transform: scale(1.2);
}

/* Login Screen Styles */
.login {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.login-container {
    background: rgba(20, 20, 30, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    text-align: center;
    width: 380px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.login-container h2 {
    margin-bottom: 30px;
    font-weight: 700;
    font-size: 28px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
}

.login-container p {
    margin: 10px 0 5px;
    font-size: 16px;
    color: #b0b0b0;
    text-align: left;
    padding-left: 10px;
}

.form-group {
    margin-bottom: 25px;
}

input {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 10px;
    background: rgba(40, 40, 60, 0.8);
    color: #fff;
    font-size: 16px;
    transition: all 0.4s ease;
    box-sizing: border-box;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

input:focus {
    outline: none;
    background: rgba(50, 50, 70, 0.9);
    box-shadow: 0 0 10px rgba(81, 99, 255, 0.5);
}

input::placeholder {
    color: #888;
}

.loginBtn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(120deg, #5163ff, #8e2de2);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(81, 99, 255, 0.4);
}

.loginBtn:hover {
    background: linear-gradient(120deg, #8e2de2, #5163ff);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(81, 99, 255, 0.6);
}

.loginBtn:active {
    transform: translateY(2px);
}

/* Dashboard Styles */
.dashboard {
    display: none;
    animation: fadeIn 0.6s ease-out;
}

header {
    padding: 25px 35px;
    background: rgba(15, 15, 25, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
}

header h1 {
    color: #fff;
    margin: 0;
    font-size: 34px;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 3px 10px rgba(255, 255, 255, 0.2);
}

/* Logout Button */
.logout-btn {
    position: absolute;
    top: 25px;
    right: 35px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff4444, #ff6f61);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(255, 111, 97, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.logout-btn i {
    font-size: 18px;
}

.logout-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.logout-btn:hover::after {
    width: 200%;
    height: 200%;
}

.logout-btn:hover {
    background: linear-gradient(135deg, #ff6f61, #ff4444);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 111, 97, 0.6);
}

.logout-btn:active {
    transform: translateY(2px);
}

main {
    display: flex;
    flex-direction: row;
    margin: 20px;
}

.sidebar {
    width: 320px;
    position: relative;
    overflow-y: auto;
    padding: 20px;
    background: rgba(20, 20, 30, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 5;
}

.brands-section {
    background: rgba(25, 25, 40, 0.9);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

.brands-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.brands-section h3 {
    color: #fff;
    font-size: 22px;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#brandNav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

#brandNav li {
    padding: 14px 20px;
    background: rgba(40, 40, 60, 0.7);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.4s ease;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

#brandNav li i {
    margin-right: 12px;
    font-size: 18px;
    color: #5163ff;
}

#brandNav li:hover {
    background: rgba(81, 99, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#brandNav li:hover::after {
    content: attr(data-brand);
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 10;
    white-space: normal;
    max-width: 300px;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
}

#brandNav li.active {
    background: linear-gradient(135deg, #5163ff, #8e2de2);
    box-shadow: 0 5px 15px rgba(81, 99, 255, 0.5);
    color: #fff;
}

#brandNav li.active i {
    color: #fff;
}

/* Categories Section (In Header) */
.categories-section {
    margin: 20px 0;
}

.categories-section h3 {
    color: #fff;
    font-size: 22px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#categoryNav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

#categoryNav li {
    padding: 14px 20px;
    background: rgba(40, 40, 60, 0.7);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.4s ease;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#categoryNav li i {
    margin-right: 12px;
    font-size: 20px;
    color: #ff6f61;
}

#categoryNav li:hover {
    background: rgba(255, 111, 97, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

#categoryNav li.active {
    background: linear-gradient(135deg, #ff6f61, #ff9f1c);
    box-shadow: 0 8px 20px rgba(255, 111, 97, 0.5);
    color: #fff;
}

#categoryNav li.active i {
    color: #fff;
}

.content-container {
    flex: 1;
    overflow-y: visible;
    padding: 30px;
}

.content-area {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.upload-section {
    background: rgba(25, 25, 40, 0.9);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.upload-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-input-container {
    position: relative;
    flex: 1;
}

.file-input-container input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.file-input-label {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: linear-gradient(135deg, #5163ff, #8e2de2);
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(81, 99, 255, 0.3);
}

.file-input-label:hover {
    background: linear-gradient(135deg, #8e2de2, #5163ff);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(81, 99, 255, 0.5);
}

.file-input-label i {
    margin-right: 8px;
    font-size: 18px;
}

.file-input-label span {
    white-space: nowrap;
}

.file-input-label .file-name {
    font-size: 12px;
    opacity: 0.9;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 150px;
}

.upload-btn {
    padding: 8px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(120deg, #34c759, #28a745);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(52, 199, 89, 0.3);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.upload-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.upload-btn:hover::after {
    width: 200%;
    height: 200%;
}

.upload-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(52, 199, 89, 0.5);
}

.upload-btn i {
    font-size: 16px;
}

.search-btn {
    padding: 8px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #5163ff, #8e2de2);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 15px rgba(81, 99, 255, 0.4);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.search-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.search-btn:hover::after {
    width: 200%;
    height: 200%;
}

.search-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 5px 20px rgba(81, 99, 255, 0.6);
    background: linear-gradient(135deg, #8e2de2, #5163ff);
}

.search-btn i {
    font-size: 16px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Search Modal Styles */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    backdrop-filter: blur(10px);
    animation: fadeInModal 0.5s ease-out;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-container {
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.98), rgba(30, 30, 45, 0.98));
    padding: 35px;
    border-radius: 25px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), inset 0 0 20px rgba(81, 99, 255, 0.1);
    width: 85%;
    max-width: 1000px;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid rgba(81, 99, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: relative;
}

.search-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #5163ff, #8e2de2);
    border-radius: 25px 25px 0 0;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.search-header h3 {
    color: #fff;
    font-size: 28px;
    margin: 0;
    font-weight: 700;
    text-shadow: 0 3px 12px rgba(81, 99, 255, 0.3);
    background: linear-gradient(90deg, #5163ff, #8e2de2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-header h3 i {
    margin-right: 12px;
}

.close-search-btn {
    background: linear-gradient(135deg, #ff4444, #ff6f61);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 50%;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(255, 111, 97, 0.4), inset 0 2px 5px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.close-search-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.close-search-btn:hover::before {
    opacity: 1;
}

.close-search-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.close-search-btn:hover::after {
    width: 200%;
    height: 200%;
}

.close-search-btn:hover {
    background: linear-gradient(135deg, #ff6f61, #ff4444);
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 8px 25px rgba(255, 111, 97, 0.6), inset 0 2px 5px rgba(255, 255, 255, 0.3);
}

.search-form {
    display: flex;
    gap: 12px;
    background: rgba(30, 30, 45, 0.7);
    padding: 10px;
    border-radius: 15px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

#searchInput {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    background: rgba(40, 40, 60, 0.9);
    color: #fff;
    font-size: 16px;
    transition: all 0.4s ease;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
}

#searchInput:focus {
    background: rgba(50, 50, 70, 1);
    box-shadow: 0 0 15px rgba(81, 99, 255, 0.7);
    transform: scale(1.01);
}

.search-submit-btn {
    padding: 14px 25px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #5163ff, #8e2de2);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 5px 20px rgba(81, 99, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.search-submit-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.search-submit-btn:hover::after {
    width: 200%;
    height: 200%;
}

.search-submit-btn:hover {
    background: linear-gradient(135deg, #8e2de2, #5163ff);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(81, 99, 255, 0.7);
}

.search-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px;
    background: rgba(30, 30, 45, 0.7);
    border-radius: 15px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.search-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.search-options label:hover {
    background: rgba(81, 99, 255, 0.1);
    color: #fff;
}

.search-options input[type="checkbox"] {
    width: auto;
    cursor: pointer;
    accent-color: #5163ff;
}

/* Search Results */
.search-results {
    background: rgba(35, 35, 50, 0.9);
    border-radius: 20px;
    padding: 25px;
    flex: 1;
    overflow-y: auto;
    box-shadow: inset 0 2px 15px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(81, 99, 255, 0.1);
}

.search-prompt, .no-results {
    color: #b0b0b0;
    text-align: center;
    margin: 50px 0;
    font-size: 18px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.results-count {
    color: #fff;
    font-size: 16px;
    margin-bottom: 25px;
    padding: 12px 15px;
    background: linear-gradient(135deg, rgba(81, 99, 255, 0.2), rgba(142, 45, 226, 0.2));
    border-radius: 12px;
    border-left: 5px solid #5163ff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.result-group {
    background: rgba(40, 40, 60, 0.9);
    border-radius: 15px;
    overflow: hidden;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.result-group:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.result-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.result-group-header h4 {
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.result-count {
    background: linear-gradient(135deg, #5163ff, #8e2de2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #fff;
    box-shadow: 0 3px 10px rgba(81, 99, 255, 0.3);
}

.result-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.search-file-card {
    background: rgba(45, 45, 70, 0.9);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    position: relative;
    cursor: pointer;
    border: 1px solid rgba(81, 99, 255, 0.1);
}

.search-file-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
    background: rgba(50, 50, 80, 1);
    border-color: rgba(81, 99, 255, 0.3);
}

.search-file-preview {
    height: 100px;
    background: linear-gradient(135deg, rgba(55, 55, 80, 0.7), rgba(40, 40, 60, 0.7));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    position: relative;
    overflow: hidden;
}

.search-file-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(81, 99, 255, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-file-card:hover .search-file-preview::after {
    opacity: 1;
}

.search-file-preview img,
.search-file-preview video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s ease;
}

.search-file-preview video {
    width: 100%;
    height: auto;
}

.search-file-preview .file-icon {
    font-size: 40px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    color: #5163ff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.search-file-card:hover .search-file-preview img,
.search-file-card:hover .search-file-preview video {
    transform: scale(1.05);
}

.search-file-icon {
    font-size: 40px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    color: #5163ff;
}

/* Files Gallery */
.files-gallery {
    background: rgba(25, 25, 40, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.files-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.files-gallery h2 {
    color: #fff;
    font-size: 26px;
    margin: 0;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.files-gallery h2 i {
    color: #ff9f1c;
    margin-right: 10px;
}

.current-selection {
    padding: 10px 15px;
    background: rgba(40, 40, 60, 0.7);
    border-radius: 12px;
    font-size: 14px;
    border-left: 5px solid #5163ff;
    flex-grow: 1;
}

.current-selection p {
    margin: 0;
}

.current-selection span {
    font-weight: 700;
    color: #5163ff;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px 0;
    justify-items: center;
}

/* File Card */
.file-card {
    background: rgba(35, 35, 50, 0.95);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    width: 220px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    border: 1px solid rgba(81, 99, 255, 0.15);
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(81, 99, 255, 0.4);
    background: rgba(45, 45, 60, 1);
}

/* File Preview */
.file-preview {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: linear-gradient(135deg, rgba(55, 55, 80, 0.8), rgba(40, 40, 60, 0.8));
    overflow: hidden;
    position: relative;
}

.file-preview img,
.file-preview video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.file-preview:hover img,
.file-preview:hover video {
    transform: scale(1.05);
}

.file-preview .file-icon {
    font-size: 36px;
    color: #5163ff;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.file-preview .file-type {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}


/* File Info */
.file-info {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(30, 30, 45, 0.9);
}

.file-info h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    position: relative;
}

.file-info h4:hover::after {
    content: attr(title);
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 10;
    white-space: normal;
    max-width: 300px;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
}

.file-info p {
    margin: 0;
    font-size: 12px;
    color: #b0b0b0;
}

/* File Actions */
.file-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(25, 25, 40, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.download-btn, .delete-btn {
    padding: 8px;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.download-btn {
    background: linear-gradient(135deg, #34c759, #28a745);
    box-shadow: 0 3px 10px rgba(52, 199, 89, 0.4);
}

.delete-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.4);
}

.download-btn:hover, .delete-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(81, 99, 255, 0.5);
}

.download-btn::before, .delete-btn::before {
    content: attr(aria-label);
    position: absolute;
    bottom: 100%;
    right: 50%;
    transform: translateX(50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.download-btn:hover::before, .delete-btn:hover::before {
    opacity: 1;
    transform: translateX(50%) translateY(-8px);
}

.download-btn::after, .delete-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.download-btn:hover::after, .delete-btn:hover::after {
    width: 200%;
    height: 200%;
}

.download-btn i, .delete-btn i {
    font-size: 16px;
}

/* Skeleton Loader for Gallery */
.gallery-grid.loading .file-card {
    background: rgba(35, 35, 50, 0.7);
    animation: pulse 1.5s infinite ease-in-out;
}

.gallery-grid.loading .file-preview,
.gallery-grid.loading .file-info {
    background: rgba(0, 0, 0, 0.2);
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Additional Layout Styles */
.button-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.upload-btn {
    margin-right: 10px;
}

.upload-btn.loading {
    background: linear-gradient(135deg, #6b7280, #4b5563); /* Grayed out during loading */
    cursor: not-allowed;
    box-shadow: 0 3px 10px rgba(107, 114, 128, 0.4);
}

.upload-btn.loading:hover {
    transform: none; /* Disable hover effect during loading */
    box-shadow: 0 3px 10px rgba(107, 114, 128, 0.4);
}

.upload-btn.loading::after {
    display: none; /* Hide the hover ripple effect during loading */
}

/* Ensure the spinner is centered */
.upload-btn.loading i {
    font-size: 16px;
    animation: spin 1s linear infinite; /* Match Font Awesome spinner animation */
}



@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btnss {
    display: flex;
    justify-content: space-between;
}

.headerr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* Media Queries */
@media (max-width: 992px) {
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        top: 0;
    }
    .content-container {
        margin-left: 0;
        padding: 20px;
    }
    #brandNav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .upload-form {
        flex-direction: column;
        gap: 10px;
    }
    .files-gallery {
        flex: none;
    }
    .files-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .file-input-container {
        width: 100%;
        margin: 10px;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
    .file-card {
        width: 180px;
    }
    .file-preview {
        height: 120px;
    }
    .file-info h4 {
        font-size: 13px;
        max-width: 140px;
    }
}

@media (max-width: 1000px) {
    main {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }
    .btnss {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .upload-btn {
        margin-right: 20px;
    }
}

@media (max-width: 768px) {
    .logout-btn {
        font-size: 16px;
    }
    h1 {
        font-size: 20px !important;
    }
    .headerr {
        flex-direction: column !important;
    }
    #categoryNav li, #brandNav li {
        padding: 10px 12px;
        font-size: 12px;
    }
    .brands-section, .files-gallery {
        padding: 15px;
    }
    .upload-section {
        padding: 10px;
    }
    .file-input-label {
        font-size: 12px;
        padding: 8px 12px;
    }
    .upload-btn, .search-btn {
        width: 35px;
        height: 35px;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    .file-card {
        width: 150px;
    }
    .file-preview {
        height: 100px;
    }
    .file-info h4 {
        font-size: 12px;
        max-width: 120px;
    }
    .download-btn, .delete-btn {
        width: 28px;
        height: 28px;
    }
    .download-btn i, .delete-btn i {
        font-size: 14px;
    }
    .result-files-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}