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

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

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
h1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 30px;
    margin: 0;
    font-size: 2.5em;
    font-weight: 300;
}

h1 + p {
    text-align: center;
    color: #666;
    padding: 20px;
    font-size: 1.1em;
    border-bottom: 1px solid #eee;
}

/* Sections */
.upload-section,
.auth-section,
.files-section {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.upload-section:last-child,
.auth-section:last-child,
.files-section:last-child {
    border-bottom: none;
}

h2, h3 {
    color: #333;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

input[type="file"],
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

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

/* Buttons */
button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

.upload-form button {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    margin-top: 10px;
}

/* File Upload Specific */
input[type="file"] {
    padding: 20px;
    border: 2px dashed #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    text-align: center;
    cursor: pointer;
}

input[type="file"]:hover {
    border-color: #764ba2;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

/* Results and Messages */
#uploadResult {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

#uploadResult.success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    display: block;
}

#uploadResult.error {
    background: linear-gradient(135deg, #ff4081 0%, #ff6ec7 100%);
    color: white;
    display: block;
}

/* File List */
.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

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

.file-filters input {
    width: 200px;
}

.file-filters button {
    padding: 10px 16px;
    font-size: 14px;
}

#filesList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.file-item {
    background: #fafbfc;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    word-break: break-word;
}

.file-info {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

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

.file-actions button {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    font-size: 12px;
    text-transform: uppercase;
}

.btn-view {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.btn-copy {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.btn-delete {
    background: linear-gradient(135deg, #ff4081 0%, #ff6ec7 100%);
}

/* Auth Section */
#authForm {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    h1 {
        font-size: 2em;
        padding: 20px;
    }
    
    .upload-section,
    .auth-section,
    .files-section {
        padding: 20px;
    }
    
    .files-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .file-filters {
        justify-content: stretch;
    }
    
    .file-filters input {
        width: 100%;
    }
    
    #filesList {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}