/* 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-color: #f5f5f5;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #2563eb;
    font-size: 2rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

main {
    flex: 1;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

footer {
    text-align: center;
    padding: 1rem;
    color: #666;
    font-size: 0.9rem;
}

/* Typography */
h1, h2, h3 {
    margin-bottom: 1rem;
}

h2 {
    color: #374151;
    font-size: 1.5rem;
}

h3 {
    color: #4b5563;
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: #6b7280;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Forms */
.login-form {
    max-width: 400px;
    margin: 2rem auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
}

/* Hero section */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h2 {
    color: #1f2937;
    margin-bottom: 1rem;
}

/* Navigation section */
.navigation {
    text-align: center;
    padding: 2rem;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
}

/* Files section */
.files-section {
    margin-top: 2rem;
}

.files-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    transition: border-color 0.2s ease;
}

.file-item:hover {
    border-color: #2563eb;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    width: 32px;
    height: 32px;
    background-color: #2563eb;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
}

.file-details h4 {
    margin: 0;
    font-size: 1rem;
    color: #1f2937;
}

.file-details p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Messages */
.error-message {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}

.loading-message {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 2rem;
}

.no-files-message {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 2rem;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
}

.success-message {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}

/* Back link */
.back-link {
    text-align: center;
    margin-top: 2rem;
}

.back-link a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link a:hover {
    color: #374151;
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    main {
        padding: 1.5rem;
    }
    
    .login-form {
        margin: 1rem auto;
    }
    
    .file-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .file-info {
        flex-direction: column;
        text-align: center;
    }
}