@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary-color: #9ca3af;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.4);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6), 0 8px 10px -6px rgb(0 0 0 / 0.5);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-color);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    font-weight: 400;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    padding: 3rem;
    width: 100%;
    max-width: 700px;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--error-color), #f87171);
}

.header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    width: 120px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: block;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    object-fit: contain;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--error-color), #f87171);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.error-content {
    text-align: center;
    margin-bottom: 3rem;
}

.error-icon {
    font-size: 4rem;
    color: var(--error-color);
    margin-bottom: 2rem;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease-out;
}

.error-details {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.error-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.suggestion {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.suggestion h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestion p {
    color: var(--text-primary);
    margin: 0;
}

.file-size-info {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.file-size-info h3 {
    color: #92400e;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-size-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-size-info li {
    padding: 0.5rem 0;
    color: var(--text-primary);
    border-bottom: 1px solid #fde68a;
}

.file-size-info li:last-child {
    border-bottom: none;
}

.file-size-info strong {
    color: #92400e;
    font-weight: 600;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-md);
    min-width: 150px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.btn-secondary {
    background: var(--surface-color);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.help-section {
    background: #334155;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.help-section h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.help-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.contact-info {
    background: var(--surface-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
}

.contact-info p {
    margin: 0.5rem 0;
    color: var(--text-primary);
}

.contact-info strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .card {
        padding: 2rem 1.5rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .error-icon {
        font-size: 3rem;
    }
    
    .actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 1.5rem 1rem;
    }
    
    .title {
        font-size: 1.75rem;
    }
    
    .error-icon {
        font-size: 2.5rem;
    }
    
    .suggestion,
    .file-size-info,
    .help-section {
        padding: 1rem;
    }
}

/* Animation for error icon based on error type */
.error-icon.file-too-large {
    animation: bounce 2s infinite;
}

.error-icon.server-error {
    animation: pulse 2s infinite;
}

.error-icon.not-found {
    animation: shake 0.5s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* Focus states for accessibility */
.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
