/* style.css - 通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    /* 移除固定头部预留空间 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles - 移除固定定位 */
.header {
    background-color: #1e293b;
    color: white;
    padding: 1rem 0;
    /* 移除固定定位属性 */
    position: relative; /* 改为相对定位 */
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo i {
    color: #3b82f6;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: white;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #3b82f6;
}

/* Search Bar Styles */
.search-container {
    margin: 2rem auto;
    max-width: 800px;
}

.search-form {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
}

/* Main Content */
.main {
    padding: 2rem 0;
    min-height: 60vh;
}

.section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.section-title.no-actions {
    justify-content: flex-start;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.15);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: #334155;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    transform: translateY(-2px);
}

.btn i {
    margin-right: 0.5rem;
}

/* Footer Styles */
.footer {
    background-color: #1e293b;
    color: #94a3b8;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
}

/* Message Styles */
.error-message {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    border-left: 4px solid #dc2626;
}

.info-message {
    background-color: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e40af;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    border-left: 4px solid #3b82f6;
}

.error-details {
    background-color: #fef2f2;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-top: 1rem;
    font-family: monospace;
    font-size: 0.9rem;
    text-align: left;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Breadcrumb Navigation */
.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #64748b;
}

.breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .search-container {
        margin: 1.5rem auto;
    }
    
    .main {
        padding: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .nav-links {
        gap: 0.75rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .logo,
    .nav-link,
    .btn {
        transition: none;
    }
}

/* Focus styles for keyboard navigation */
.logo:focus,
.nav-link:focus,
.btn:focus,
.search-input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}