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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 30px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

header h1 {
    color: #333;
    font-size: 28px;
}

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

.user-info span {
    color: #666;
    font-weight: 500;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: #5568d3;
}

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

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

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

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

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

.btn-block {
    width: 100%;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

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

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

.warning {
    color: #856404;
    background: #fff3cd;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
}

/* Upload Section */
.upload-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.upload-section h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.form-group input[type="file"] {
    display: block;
    margin-bottom: 10px;
}

.form-group input[type="checkbox"] {
    margin-right: 5px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

#uploadStatus {
    margin-top: 10px;
    font-weight: 500;
}

/* Files Section */
.files-section {
    margin-bottom: 30px;
}

.files-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

.no-files {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

/* Files Grid */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.file-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: white;
    transition: transform 0.2s, box-shadow 0.2s;
}

.file-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.file-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 10px;
}

.file-info h3 {
    color: #333;
    font-size: 16px;
    margin-bottom: 10px;
    word-break: break-word;
}

.file-meta {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
}

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

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 5px;
}

.badge-public {
    background: #d4edda;
    color: #155724;
}

.badge-private {
    background: #f8d7da;
    color: #721c24;
}

/* Login Container */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 450px;
}

.login-box h1 {
    color: #333;
    text-align: center;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.tab-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.auth-form h2 {
    color: #333;
    font-size: 20px;
    margin-bottom: 20px;
}

.demo-credentials {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

.demo-credentials p {
    margin: 5px 0;
    font-size: 13px;
    color: #666;
}

.demo-credentials code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* Admin Section */
.admin-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.admin-section h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 20px;
}

.key-info {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.key-info p {
    margin: 8px 0;
    color: #555;
}

.key-rotation-form {
    background: white;
    padding: 20px;
    border-radius: 6px;
}

/* Tables */
.files-table, .users-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
}

thead {
    background: #667eea;
    color: white;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    font-weight: 600;
    font-size: 14px;
}

td {
    font-size: 13px;
    color: #555;
}

tbody tr:hover {
    background: #f8f9fa;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .user-info {
        flex-direction: column;
    }
    
    .files-grid {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px;
    }
}


/* Upload Area Styles - Add to style.css */

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.upload-area h3 {
    margin: 10px 0 5px 0;
    color: #333;
    font-size: 20px;
}

.upload-area p {
    color: #666;
    font-size: 14px;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}
