/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

/* Header Styles */
.error-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #2563eb;
}

/* Main Content */
.error-main {
    flex: 1;
    padding: 2rem 0;
}

.error-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Error Display */
.error-display {
    background: white;
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    min-height: 500px;
    text-align: center;
}

.error-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.error-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.error-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.error-code {
    font-size: 4rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.error-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.error-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Error Actions */
.error-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary, .btn-tertiary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: white;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.btn-secondary:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
}

.btn-tertiary {
    background: #f8fafc;
    color: #666;
    border: 2px solid #e2e8f0;
}

.btn-tertiary:hover {
    background: #e2e8f0;
    color: #333;
    transform: translateY(-2px);
}

/* Error Help */
.error-help {
    background: #f8fafc;
    border-radius: 10px;
    padding: 2rem;
    margin-top: 2rem;
    text-align: left;
}

.error-help h3 {
    color: #2563eb;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.help-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.help-links a {
    color: #2563eb;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.help-links a:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-1px);
}

.error-help ul {
    list-style: none;
    padding: 0;
}

.error-help li {
    padding: 0.5rem 0;
    color: #666;
    position: relative;
    padding-left: 1.5rem;
}

.error-help li:before {
    content: "•";
    color: #2563eb;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Footer */
.error-footer {
    background: #1e293b;
    color: white;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #2563eb;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #2563eb;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #334155;
    color: #94a3b8;
}

/* Search Modal */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.search-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.search-modal-header h3 {
    color: #2563eb;
    font-size: 1.3rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f1f5f9;
    color: #2563eb;
}

.search-modal-body {
    padding: 1.5rem;
}

.search-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.search-input-group input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-input-group input:focus {
    outline: none;
    border-color: #2563eb;
}

.search-input-group button {
    padding: 1rem 1.5rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-input-group button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.search-suggestions h4 {
    color: #666;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.suggestion-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.suggestion-tag {
    padding: 0.5rem 1rem;
    background: #f1f5f9;
    color: #666;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.suggestion-tag:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-1px);
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: #2563eb;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.loading-spinner p {
    font-size: 1.1rem;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary, .btn-tertiary {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .error-display {
        padding: 2rem 1rem;
    }
    
    .error-code {
        font-size: 3rem;
    }
    
    .error-title {
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .search-modal-content {
        width: 95%;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .error-container {
        padding: 0 1rem;
    }
    
    .error-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .error-code {
        font-size: 2.5rem;
    }
    
    .error-title {
        font-size: 1.3rem;
    }
    
    .error-description {
        font-size: 1rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        color: #e2e8f0;
    }
    
    .error-header {
        background: #334155;
        color: #e2e8f0;
    }
    
    .error-display {
        background: #334155;
        color: #e2e8f0;
    }
    
    .error-help {
        background: #475569;
    }
    
    .search-modal-content {
        background: #334155;
        color: #e2e8f0;
    }
    
    .search-input-group input {
        background: #475569;
        color: #e2e8f0;
        border-color: #64748b;
    }
    
    .suggestion-tag {
        background: #475569;
        color: #e2e8f0;
    }
} 