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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* Header */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.header h1 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

.header nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}

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

/* Main Content */
main {
    min-height: calc(100vh - 140px); /* Footer height + header height approx */
    padding: 2rem 0;
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 3rem 2rem 4rem;
    border-radius: 12px;
    margin-bottom: -2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.hero-banner h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero-banner p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Hero Search */
.hero-search {
    max-width: 600px;
    margin: 0 auto;
}

.hero-search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.hero-search-input:focus {
    outline: none;
    transform: scale(1.02);
}

/* Filters Bar */
.filters-bar {
    margin-bottom: 2rem;
    padding: 1.5rem;
    position: relative;
    z-index: 2;
    margin-top: 0;
}

.filter-row {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-item label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-select {
    padding: 0.6rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    min-width: 150px;
    cursor: pointer;
}

/* Tags Scroll */
.tags-container {
    flex-grow: 1;
    overflow: hidden;
}

.tags-scroll {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}

.tag-pill {
    padding: 0.4rem 1rem;
    background: #f5f6fa;
    color: #666;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.tag-pill:hover {
    background: #e1e4ea;
}

.tag-pill.active {
    background: #3498db;
    color: white;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.3);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.section-header h3 {
    font-size: 1.5rem;
    color: #2c3e50;
}

.view-all {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

/* Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.case-card .card-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.category-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    backdrop-filter: blur(4px);
}

.case-card .card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.case-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    line-height: 1.4;
}

.case-card .meta {
    display: flex;
    gap: 1rem;
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.case-card .meta i {
    margin-right: 4px;
}

.case-card p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.case-card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: #f0f2f5;
    color: #666;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: 500;
}

.btn:hover {
    background: #2980b9;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

/* Alert */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-info {
    background: #e1f5fe;
    color: #0277bd;
    border: 1px solid #b3e5fc;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.footer {
    background: #2c3e50;
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Login Page Specific */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 2.5rem !important;
    border-top: 4px solid #3498db;
}

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

.mb-4 {
    margin-bottom: 1.5rem;
}

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

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

.form-group label i {
    color: #bdc3c7;
    margin-right: 5px;
    width: 16px;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #dde1e6;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #7f8c8d;
    border-top: 1px solid #f1f2f6;
    padding-top: 1.5rem;
}

.login-footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header nav {
        width: 100%;
        justify-content: space-around;
        flex-wrap: wrap;
    }

    .grid {
        grid-template-columns: 1fr;
    }
    
    .hero-banner {
        padding: 2rem 1rem;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-select {
        width: 100%;
    }
}
