/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Login page styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.login-header h1 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.login-header p {
    color: #666;
    margin-bottom: 30px;
}

.features {
    margin-bottom: 30px;
}

.feature {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
}

.feature i {
    color: #667eea;
    margin-right: 15px;
    font-size: 1.2em;
    width: 20px;
}

.discord-login-btn {
    display: inline-flex;
    align-items: center;
    background: #7289da;
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1.1em;
    cursor: pointer;
}

.discord-login-btn:hover {
    background: #5b6eae;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(114, 137, 218, 0.3);
}

.discord-login-btn i {
    margin-right: 10px;
    font-size: 1.3em;
}

/* Dashboard styles */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: #f5f7fa;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid #eee;
}

.sidebar-header h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.username {
    font-weight: 600;
    color: #333;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
}

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

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0 25px 25px 0;
    margin-right: 10px;
}

.nav-item:hover {
    background: #f0f2f5;
    color: #667eea;
}

.nav-item.active {
    background: #667eea;
    color: white;
}

.nav-item i {
    margin-right: 15px;
    width: 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.logout-btn {
    display: flex;
    align-items: center;
    color: #dc3545;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.logout-btn:hover {
    color: #c82333;
}

.logout-btn i {
    margin-right: 10px;
}

.settings-btn {
    display: flex;
    align-items: center;
    color: #fbbf24;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.settings-btn:hover {
    color: #d97706;
}

.settings-btn i {
    margin-right: 10px;
}

/* Main content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.breadcrumb {
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
}

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

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-size: 14px;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

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

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

/* Content area */
.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

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

.file-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.file-item.folder {
    border-left: 4px solid #667eea;
}

.file-item.file {
    border-left: 4px solid #28a745;
}

.file-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    text-align: center;
}

.file-icon.folder {
    color: #667eea;
}

.file-icon.file {
    color: #28a745;
}

.file-name {
    font-weight: 600;
    margin-bottom: 5px;
    word-break: break-word;
}

.file-info {
    font-size: 0.9em;
    color: #666;
}

.file-uploader {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.85em;
    color: #666;
}

.uploader-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.uploader-name {
    font-weight: 500;
    color: #667eea;
}

.file-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-item:hover .file-actions {
    opacity: 1;
}

.action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    margin-left: 5px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #667eea;
    color: white;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

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

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

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

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Upload progress */
.upload-progress {
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e1e5e9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: #667eea;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9em;
    color: #666;
}

/* Share options */
.share-options {
    display: flex;
    gap: 20px;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-option input {
    margin-right: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0;
    cursor: pointer;
    padding: 8px 0;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    accent-color: #667eea;
    cursor: pointer;
}

#file-password-group input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background: #ffffff;
}

#file-password-group input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Context menu */
.context-menu {
    position: fixed;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 10px 0;
    z-index: 1001;
    display: none;
    min-width: 200px;
}

.context-menu ul {
    list-style: none;
}

.context-menu li {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
}

.context-menu li:hover {
    background: #f8f9fa;
}

.context-menu li.danger:hover {
    background: #f8d7da;
    color: #721c24;
}

.context-menu li i {
    margin-right: 10px;
    width: 16px;
}

/* Responsive design */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 80vw;
        max-width: 320px;
        height: 100vh;
        z-index: 1001;
        background: #fff;
        box-shadow: 2px 0 10px rgba(0,0,0,0.15);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(.4,0,.2,1);
        will-change: transform;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        width: 100vw;
        margin-left: 0;
        min-width: 0;
        padding: 12px 4vw 24px 4vw;
    }
    .sidebar-toggle {
        display: block;
        position: fixed;
        top: 18px;
        left: 18px;
        z-index: 1100;
        background: #667eea;
        color: #fff;
        border: none;
        border-radius: 8px;
        width: 44px;
        height: 44px;
        font-size: 1.6em;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        cursor: pointer;
    }
    .sidebar-header {
        padding-top: 60px;
    }
    .sidebar-footer {
        padding: 18px 4vw 80px 4vw;
    }
    .modal-content {
        max-width: 98vw !important;
        min-width: 0;
        padding: 18px 8px 24px 8px;
        border-radius: 14px;
    }
    .modal-header h3 {
        font-size: 1.2em;
    }
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 1.1em;
        padding: 14px 10px;
    }
    .form-actions button {
        font-size: 1.1em;
        padding: 14px 0;
        min-width: 120px;
    }
    .modal-body {
        max-height: 70vh;
        overflow-y: auto;
    }
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 18px;
    }
    .file-item {
        min-width: 0;
        padding: 18px 8px 14px 8px;
        border-radius: 12px;
        font-size: 1.05em;
    }
    .file-actions button, .action-btn {
        min-width: 44px;
        min-height: 44px;
        font-size: 1.3em;
        margin: 0 2px;
    }
    .file-icon {
        font-size: 2.2em;
        margin-bottom: 8px;
    }
    .notification {
        left: 4vw;
        right: 4vw;
        max-width: 92vw;
    }
    .mobile-topbar {
        position: relative;
        margin-bottom: 10px;
    }
    .mobile-topbar .sidebar-toggle {
        position: absolute;
        left: 8px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        margin: 0;
    }
    .mobile-topbar #search-input {
        padding-left: 54px !important;
        width: 100%;
        box-sizing: border-box;
        margin-left: 0 !important;
    }
    .sidebar-toggle {
        margin-right: 8px;
    }
    #search-input-desktop {
        display: none !important;
    }
    .file-grid {
        gap: 22px 10px;
    }
    .file-name {
        font-size: 1.08em;
        word-break: break-word;
        white-space: normal;
        max-width: 100%;
        overflow-wrap: anywhere;
        line-height: 1.2;
    }
    .content-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        padding: 0 0 8px 0;
    }
    .breadcrumb {
        font-size: 1.3em;
        font-weight: 700;
        margin-bottom: 4px;
        letter-spacing: 0.01em;
    }
    .header-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    .header-actions button,
    .header-actions input {
        width: 100%;
        margin: 0 0 6px 0;
        font-size: 1.1em;
        min-height: 44px;
    }
    .header-actions .btn {
        padding: 12px 0;
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .login-header h1 {
        font-size: 2em;
    }
    
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 12px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    .sidebar {
        width: 100vw;
        max-width: 100vw;
    }
    .main-content {
        width: 100vw;
        padding: 8px 2vw 16px 2vw;
    }
    .modal-content {
        max-width: 100vw !important;
        min-width: 0;
        padding: 10px 2px 18px 2px;
        border-radius: 10px;
    }
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 1em;
        padding: 12px 8px;
    }
    .form-actions button {
        font-size: 1em;
        padding: 12px 0;
        min-width: 100px;
    }
    .file-item {
        padding: 12px 2px 10px 2px;
        border-radius: 8px;
        font-size: 0.98em;
    }
    .file-actions button, .action-btn {
        min-width: 38px;
        min-height: 38px;
        font-size: 1.1em;
        margin: 0 1px;
    }
    .file-icon {
        font-size: 1.7em;
        margin-bottom: 6px;
    }
    .sidebar-footer {
        padding: 12px 2vw 60px 2vw;
    }
    .notification {
        left: 2vw;
        right: 2vw;
        max-width: 96vw;
    }
    .mobile-topbar {
        padding: 7px 2px 7px 2px;
        margin-bottom: 6px;
    }
    .file-grid {
        gap: 14px 6px;
    }
    .file-name {
        font-size: 1em;
    }
    .breadcrumb {
        font-size: 1.1em;
    }
    .header-actions button,
    .header-actions input {
        min-height: 38px;
        font-size: 1em;
    }
    .header-actions .btn {
        padding: 10px 0;
        font-size: 1em;
    }
}

/* Loading states */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.empty-state i {
    font-size: 4em;
    margin-bottom: 20px;
    color: #ddd;
}

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

/* Notifications */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1002;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #dc3545;
}

.notification.info {
    background: #17a2b8;
}

/* Download notification styles */
.download-notification {
    min-width: 300px;
    max-width: 400px;
}

.download-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.download-name {
    font-weight: 600;
    font-size: 14px;
    color: inherit;
}

.download-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.download-progress .progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.download-progress .progress-fill {
    height: 100%;
    background: #4ade80;
    transition: width 0.3s ease;
}

.download-progress .progress-text {
    font-size: 12px;
    font-weight: 500;
    min-width: 40px;
    text-align: right;
}

.download-status {
    font-size: 12px;
    font-weight: 500;
    color: inherit;
}

/* === Dark Mode === */
body.dark-mode {
    background-color: #1f2937; /* Dark Slate */
    color: #e5e7eb;
}

body.dark-mode .sidebar {
    background-color: #111827; /* Very Dark Blue */
    border-right-color: #374151;
}

body.dark-mode .sidebar-header h2,
body.dark-mode .user-info .username,
body.dark-mode .breadcrumb {
    color: #f9fafb; /* White */
}

body.dark-mode .sidebar-nav ul li a {
    color: #d1d5db;
}

body.dark-mode .sidebar-nav ul li a.active,
body.dark-mode .sidebar-nav ul li a:hover {
    background-color: #374151;
    color: #ffffff;
}

body.dark-mode .main-content,
body.dark-mode .content-header {
    background-color: #1f2937;
}

body.dark-mode .btn-primary {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

body.dark-mode .btn-secondary,
body.dark-mode #dark-mode-toggle {
    background-color: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

body.dark-mode input#search-input {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

body.dark-mode .file-item {
    background-color: #374151;
    border-color: #4b5563;
}

body.dark-mode .modal-content {
    background-color: #1f2937;
    border-color: #374151;
}

body.dark-mode .modal-content label {
    color: #d1d5db;
}

body.dark-mode .modal-content input,
body.dark-mode .modal-content select,
body.dark-mode .modal-content textarea {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

body.dark-mode .empty-state {
    color: #9ca3af;
}

body.dark-mode .empty-state h3 {
    color: #f9fafb;
}

body.dark-mode .modal-header h3 {
    color: #f9fafb;
}

body.dark-mode .close {
    color: #d1d5db;
}

body.dark-mode .close:hover {
    color: #f9fafb;
}

body.dark-mode .context-menu {
    background-color: #374151 !important;
    background: #374151 !important;
    border: 1px solid #4b5563;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

body.dark-mode .context-menu li {
    color: #e5e7eb;
}

body.dark-mode .context-menu li:hover {
    background-color: #4b5563;
    color: #f9fafb;
}

body.dark-mode .context-menu li.danger {
    color: #fca5a5;
}

body.dark-mode .context-menu li.danger:hover {
    background-color: #7f1d1d;
    color: #fef2f2;
}

body.dark-mode .file-info {
    color: #9ca3af;
}

body.dark-mode .file-uploader {
    color: #9ca3af;
}

body.dark-mode .progress-text {
    color: #a1a6b8;
}

/* Dark mode checkbox and password field styles */
body.dark-mode .checkbox-label {
    color: #e5e7eb;
}

body.dark-mode #file-password-group input[type="password"] {
    background: #23263a;
    border-color: #373a4d;
    color: #e5e7eb;
}

body.dark-mode #file-password-group input[type="password"]:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Desktop search bar styles */
#search-input-desktop {
    display: block;
    width: 340px;
    max-width: 100%;
    padding: 10px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 15px;
    margin: 0 24px 0 24px;
    background: #fff;
    color: #222;
    transition: border-color 0.2s;
    box-shadow: 0 1px 4px rgba(102,126,234,0.04);
}
#search-input-desktop:focus {
    border-color: #667eea;
    outline: none;
}
@media (max-width: 768px) {
    #search-input-desktop {
        display: none !important;
    }
    .mobile-topbar {
        display: flex !important;
    }
}
@media (min-width: 769px) {
    .mobile-topbar {
        display: none !important;
    }
    #search-input-desktop {
        display: block !important;
    }
}

body.dark-mode #search-input-desktop {
    background: #23263a;
    color: #f9fafb;
    border-color: #4b5563;
}
body.dark-mode #search-input-desktop::placeholder {
    color: #a1a6b8;
    opacity: 1;
} 