:root {
    --primary: #690A30;
    --secondary: #3C2A6F;
    --dark: #281C3C;
    --light: #FFFFFF;
    --text: #000000;
    --success: #4CAF50;
    --error: #ca180b;
    --header-bg: linear-gradient(135deg, #690A30, #3C2A6F);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: var(--text);
    line-height: 1.6;
}

header {
    background: var(--header-bg);
    color: var(--light);
    padding: 10px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 60px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: bold;
    font-size: 14px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    height: calc(100vh - 60px);
    overflow: hidden;
    margin-top: 60px;
}

.main-content {
    display: flex;
    width: 100%;
    height: 100%;
}

.sidebar {
    width: 250px;
    background: #f5f5f5;
    padding: 10px 0;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: fixed;
    top: 60px;
    bottom: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: calc(100vh - 80px);
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}

.sidebar-menu li a i {
    margin-right: 10px;
    font-size: 16px;
}

.sidebar-menu li a.active {
    background: rgba(105, 10, 48, 0.1);
    font-weight: 500;
    color: var(--primary);
}

.sidebar-menu li a:hover {
    background: rgba(105, 10, 48, 0.05);
}

.sidebar-menu .bottom-item {
    margin-top: auto;
    margin-bottom: 10px;
}

.storage-info {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    color: #000;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}

.storage-info i {
    margin-right: 10px;
    font-size: 16px;
}

.storage-info:hover {
    background: transparent;
    cursor: default;
}

.content-area {
    flex: 1;
    padding: 15px;
    margin-left: 250px;
    overflow: hidden;
    font-size:13px;
}

.scrollable-content {
    height: calc(100vh - 130px);
    overflow-y: auto;
    padding-bottom: 15px;
}

.section-title {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.section-title i {
    font-size: 18px;
}

.card {
    background-color: var(--light);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.file-upload {
    border: 2px dashed #ddd;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
    background: #fff;
    transition: all 0.3s ease;
}

.file-upload:hover {
    border-color: var(--primary);
    background: rgba(105, 10, 48, 0.05);
}

.file-upload label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--primary);
    cursor: pointer;
}

.file-upload input[type="file"] {
    display: none;
}

.upload-btn {
    background-color: var(--primary);
    color: var(--light);
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background-color: #5a0928;
}

.files-list {
    margin-top: 20px;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
}

.file-table th, .file-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.file-table th {
    background-color: rgba(105, 10, 48, 0.05);
    color: var(--primary);
    font-weight: 500;
}

.file-table tr:hover {
    background-color: rgba(105, 10, 48, 0.03);
}

.file-actions {
    display: flex;
    gap: 5px;
}

.action-btn {
    padding: 5px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-btn {
    background-color: var(--secondary);
    color: var(--light);
}

.download-btn:hover {
    background-color: #2e2160;
}

.delete-btn {
    background-color: var(--error);
    color: var(--light);
}

.delete-btn:hover {
    background-color: #d32f2f;
}

.share-btn {
    background-color: var(--success);
    color: var(--light);
}

.share-btn:hover {
    background-color: #388e3c;
}

.restore-btn {
    background-color: var(--primary);
    color: var(--light);
}

.restore-btn:hover {
    background-color: #5a0928;
}

.delete-perm-btn {
    background-color: var(--error);
    color: var(--light);
}

.delete-perm-btn:hover {
    background-color: #d32f2f;
}

.search-box {
    margin-bottom: 15px;
    display: flex;
    gap: 5px;
}

.search-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.search-btn {
    background-color: var(--secondary);
    color: var(--light);
    border: none;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.file-icon {
    color: var(--secondary);
    font-size: 16px;
    margin: 0 5px 0 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--light);
    border-radius: 4px;
    padding: 15px;
    width: 350px;
    max-width: 90%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
    position: relative;
    z-index: 1000; /* Ensure it stays on top */
}

.link-container, .password-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 10px 0;
}

.modal-content h3 {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 10px;
}

.modal-content p {
    font-size: 14px;
    color: var(--text);
    margin-bottom: 10px;
}

.share-input {
    width: 100%;
    padding: 8px;
    margin-bottom: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.password-option, .password-section {
    margin-top: 15px;
}

.password-section p {
    margin: 5px 0;
}

.password-container {
    justify-content: space-between;
}

.set-password-btn, .regenerate-password-btn {
    background-color: var(--secondary);
    color: var(--light);
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.set-password-btn:hover, .regenerate-password-btn:hover {
    background-color: #2e2160;
}

.remove-password-btn {
    background-color: var(--error);
    color: var(--light);
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.remove-password-btn:hover {
    background-color: #d32f2f;
}

.copy-btn {
    background-color: var(--secondary);
    color: var(--light);
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 5px;
}

.copy-btn:hover {
    background-color: #2e2160;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal-confirm-btn {
    background-color: var(--error);
    color: var(--light);
}

.modal-confirm-btn:hover {
    background-color: #d32f2f;
}

.modal-cancel-btn {
    background-color: #ddd;
    color: var(--text);
}

.modal-cancel-btn:hover {
    background-color: #ccc;
}

.file-activity-popup {
    position: fixed;
    bottom: 10px;
    right: 20px;
    width: 400px;
    background-color: var(--light);
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-size: 14px;
    display: block;
    max-height: calc(100vh - 60px);
    overflow: hidden;
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background-color: var(--primary);
    color: var(--light);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.clear-activity-btn {
    background: none;
    border: none;
    color: var(--light);
    cursor: pointer;
    padding: 5px;
    margin-right: 5px;
}

.clear-activity-btn:hover {
    color: var(--secondary);
}

.popup-header h3 {
    margin: 0;
    flex: 1;
    font-size: 14px;
}

.popup-header .action-btn {
    background: none;
    border: none;
    color: var(--light);
    cursor: pointer;
    padding: 5px;
    margin-right: 5px;
}

.popup-header .action-btn:hover {
    color: var(--error);
}

.popup-header .minimize-arrow {
    cursor: pointer;
    font-size: 12px;
}

.popup {
    width: 100%;
    background-color: var(--light);
    border-radius: 0 0 4px 4px;
    display: none;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.popup-content {
    width: 100%;
    padding: 0;
}

#activityList {
    width: 100%;
    padding: 0;
    margin: 0;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
    width: 100%;
    box-sizing: border-box;
}

.activity-item div {
    flex: 1;
    padding-right: 0;
    overflow: hidden;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-name {
    font-weight: 500;
    color: var(--text);
    font-size: 12px;
}

.activity-status {
    font-size: 10px;
    color: var(--secondary);
}

.activity-progress {
    min-width: 30px;
    text-align: right;
    font-size: 10px;
}

.activity-controls {
    display: flex;
    gap: 3px;
    margin-top: 3px;
}

.control-btn {
    background-color: var(--primary);
    color: var(--light);
    padding: 3px 8px;
    font-size: 10px;
    min-width: 30px;
    border-radius: 3px;
}

.control-btn:hover {
    background-color: #5a0928;
}

.cancel-btn {
    background-color: var(--error);
}

.cancel-btn:hover {
    background-color: #d32f2f;
}

.restart-btn {
    background-color: var(--success);
}

.restart-btn:hover {
    background-color: #388e3c;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 3px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0;
    transition: width 0.3s ease;
}

.empty-trash-btn {
    background-color: var(--error);
    color: var(--light);
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-size: 13px;
    height: 36px;
    gap: 6px; /* spacing between icon and text */
}

.empty-trash-btn i {
    font-size: 14px; /* icon sizing */
}

.empty-trash-btn:hover {
    background-color: #d32f2f;
}

#folder-controls {
    margin-bottom: 10px;
}

#folder-nav {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--primary);
    flex-wrap: wrap;
}

#folder-nav a {
    text-decoration: none;
    color: var(--primary);
}

.folder-up-btn-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.folder-up-btn-container .upload-btn {
    font-size: 12px;
    padding: 4px 10px;
}


@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .file-actions {
        flex-direction: column;
        gap: 5px;
    }

    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
    }

    .content-area {
        margin-left: 0;
        padding: 10px;
    }

    .file-activity-popup {
        width: 90%;
        right: 10px;
        bottom: 10px;
        max-height: calc(100vh - 60px);
    }

    .modal-content {
        width: 90%;
    }
}