/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

/* Main Content */
.main-content {
    display: grid;
    gap: 30px;
}

section {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

section h2 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* Upload Form */
.upload-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #555;
}

.form-group input {
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    color: #888;
    font-size: 14px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e1e5e9;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.btn-loading .btn-text {
    display: none;
}

.btn:not(.btn-loading) .btn-loading {
    display: none;
}

/* Result Messages */
.result-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

.result-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.result-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.result-message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Users List */
.users-list {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.user-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-card:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateY(-1px);
}

.user-info h3 {
    color: #333;
    margin-bottom: 5px;
}

.user-info small {
    color: #666;
}

.user-stats {
    text-align: right;
    font-weight: 600;
    color: #667eea;
}

/* Files List */
.files-list {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.file-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.file-card:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    font-size: 24px;
}

.file-details h4 {
    color: #333;
    margin-bottom: 5px;
}

.file-details small {
    color: #666;
}

.file-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 6px;
}

.btn-view {
    background: #17a2b8;
    color: white;
}

.btn-download {
    background: #28a745;
    color: white;
}

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

.btn-small:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Loading and Empty States */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.footer p {
    margin-bottom: 10px;
    color: #666;
}

.health-check {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.health-check:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .user-card, .file-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .user-stats {
        text-align: left;
    }
    
    .file-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* File type specific styles */
.file-pdf { border-left: 4px solid #dc3545; }
.file-image { border-left: 4px solid #17a2b8; }
.file-video { border-left: 4px solid #6f42c1; }
.file-document { border-left: 4px solid #28a745; }
.file-other { border-left: 4px solid #6c757d; }