* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

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

.login-header {
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.login-header h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 600;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.login-form {
    width: 100%;
    margin-bottom: 20px;
}

.login-input-group {
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.login-input-group:focus-within {
    border-color: #667eea;
}

.login-input {
    width: 100%;
    padding: 15px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
}

.login-btn {
    width: 100%;
    padding: 15px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.login-btn:hover {
    background: #5a6fd8;
}

.login-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 10px;
}

.user-list {
    text-align: left;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.user-list h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
}

.user-list ul {
    list-style: none;
    padding: 0;
}

.user-list li {
    padding: 5px 0;
    font-size: 14px;
    color: #666;
    margin-top: 10px;
    padding: 10px;
    background: #ffeaea;
    border-radius: 5px;
    border: 1px solid #e74c3c;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-left {
    flex: 1;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
}

.header h1 i {
    margin-right: 10px;
    color: #ffd700;
}

.header-center {
    flex: 1;
    text-align: center;
}

.current-user {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

.current-user i {
    margin-right: 8px;
    color: #ffd700;
}

.header-right {
    flex: 1;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

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

.btn-secondary:hover {
    background: #5a6268;
}

/* Breadcrumb */
.breadcrumb {
    padding: 15px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}

.breadcrumb-item {
    color: #007bff;
    cursor: pointer;
    transition: color 0.3s ease;
}

.breadcrumb-item:hover {
    color: #0056b3;
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #6c757d;
}

/* Main Content */
.main-content {
    padding: 30px;
    min-height: 500px;
}

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

.file-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.file-item:hover {
    border-color: #007bff;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,123,255,0.15);
}

.file-item.selected {
    border-color: #007bff;
    background: #f8f9ff;
}

.file-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #007bff;
}

.file-icon.folder {
    color: #ffc107;
}

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

.file-icon.document {
    color: #dc3545;
}

.file-icon.archive {
    color: #6f42c1;
}

.file-name {
    font-weight: 500;
    margin-bottom: 10px;
    word-break: break-word;
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.file-size {
    font-size: 12px;
    color: #6c757d;
}

.file-creator {
    font-size: 11px;
    color: #007bff;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.file-creator i {
    font-size: 10px;
}

.file-timestamp {
    font-size: 10px;
    color: #6c757d;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.file-timestamp i {
    font-size: 9px;
}

/* 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);
    animation: fadeIn 0.3s ease;
}

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

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
    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;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Input Fields */
.input-field {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

/* Upload Area */
.upload-area {
    border: 2px dashed #007bff;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.upload-area:hover {
    background: #e6f3ff;
    border-color: #0056b3;
}

.upload-area.dragover {
    background: #e6f3ff;
    border-color: #0056b3;
    transform: scale(1.02);
}

.upload-area i {
    font-size: 48px;
    color: #007bff;
    margin-bottom: 15px;
}

.upload-area p {
    color: #6c757d;
    margin: 0;
}

.file-list {
    margin-top: 20px;
}

.file-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Upload Progress */
.upload-progress {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9ff;
    border: 1px solid #e6f3ff;
    border-radius: 12px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-header span:first-child {
    font-weight: 500;
    color: #333;
}

.progress-header span:last-child {
    font-weight: 600;
    color: #007bff;
    font-size: 14px;
}

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

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #6c757d;
}

.progress-details span:first-child {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.progress-details span:last-child {
    font-weight: 500;
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
    min-width: 150px;
}

.context-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.context-item:hover {
    background-color: #f8f9fa;
}

.context-item:first-child {
    border-radius: 8px 8px 0 0;
}

.context-item:last-child {
    border-radius: 0 0 8px 8px;
}

/* Loading Spinner */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
}

.toast {
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideInRight 0.3s ease;
    max-width: 300px;
}

.toast.error {
    background: #dc3545;
}

.toast.warning {
    background: #ffc107;
    color: #333;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-right {
        justify-content: center;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
}

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

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    color: #dee2e6;
}

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

.empty-state p {
    margin: 0;
}