* {
    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;
    color: #333;
}

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

header {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.logout-btn {
    background: #f3f4f6;
    color: #667eea;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

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

main {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-height: 400px;
}

footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    padding: 20px;
    opacity: 0.9;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.auth-box {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-box h2 {
    color: #667eea;
    margin-bottom: 10px;
}

.auth-description {
    color: #6b7280;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

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

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

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

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

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

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

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.upload-container h2 {
    color: #667eea;
    margin-bottom: 10px;
}

.description {
    color: #6b7280;
    margin-bottom: 30px;
}

.upload-box {
    margin-bottom: 30px;
}

.upload-controls {
    text-align: center;
    padding: 30px 0 10px;
}

.lifetime-selector {
    margin-top: 20px;
    text-align: center;
}

.lifetime-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #374151;
}

.lifetime-selector select {
    padding: 10px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.files-list {
    margin-bottom: 30px;
}

.files-list h3 {
    color: #374151;
    margin-bottom: 15px;
}

#filesContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

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

.file-name {
    font-weight: 500;
    color: #374151;
}

.file-size {
    font-size: 12px;
    color: #6b7280;
    text-align: left;
}

.btn-delete {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
    opacity: 0.6;
}

.btn-delete:hover {
    background: #fee2e2;
    opacity: 1;
}

.btn-delete:disabled {
    cursor: not-allowed;
    opacity: 0.3;
}

.files-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.files-total {
    padding: 12px;
    background: #f0f4ff;
    border-radius: 8px;
    flex: 1;
    text-align: right;
}

.progress-container {
    margin-bottom: 30px;
}

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

.progress-fill {
    height: 100%;
    background: #667eea;
    transition: width 0.3s;
    width: 0%;
}

.progress-text {
    text-align: center;
    color: #6b7280;
}

.error-container {
    margin-top: 20px;
    text-align: center;
}

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

.success-message h3 {
    color: #10b981;
    margin-bottom: 30px;
    font-size: 24px;
}

.link-container {
    background: #f0f4ff;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.link-container label {
    display: block;
    font-weight: 500;
    margin-bottom: 10px;
    color: #374151;
}

.link-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.link-box input {
    flex: 1;
    padding: 12px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.link-info {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

.download-box h2 {
    color: #667eea;
    margin-bottom: 10px;
}

.files-download-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-download {
    background: #667eea;
    color: white;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
}

.btn-download.downloaded {
    background: #10b981;
}

.download-total {
    padding: 15px;
    background: #f0f4ff;
    border-radius: 8px;
    text-align: center;
}

.error-box {
    text-align: center;
    padding: 40px;
}

.error-box h2 {
    color: #dc2626;
    margin-bottom: 20px;
}

.error-box .error-message {
    font-size: 18px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    main {
        padding: 20px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
    }
    
    .link-box {
        flex-direction: column;
    }
}
