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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    color: #e0e0e0;
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #00d4ff, #7c3aed, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #888;
    font-size: 1.1em;
    margin-bottom: 30px;
}

/* Weather Card */
.weather-card {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    border-radius: 16px;
    padding: 25px 40px;
    display: inline-block;
    min-width: 300px;
    box-shadow: 0 10px 40px rgba(0, 150, 255, 0.2);
}

.weather-loading {
    color: #aaa;
}

.weather-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.weather-icon {
    font-size: 3em;
}

.weather-info {
    text-align: left;
}

.weather-temp {
    font-size: 2.5em;
    font-weight: 300;
    color: #fff;
}

.weather-desc {
    color: #b0d4f1;
    font-size: 0.95em;
}

.weather-meta {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 0.85em;
    color: #8fb8d8;
}

.time-display {
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 16px;
    border-radius: 8px;
    margin-left: 20px;
}

.time-display .date {
    font-size: 0.85em;
    color: #aaa;
}

.time-display .time {
    font-size: 1.5em;
    font-weight: 600;
    color: #00d4ff;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab {
    flex: 1;
    min-width: 150px;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #aaa;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.tab.active {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: #fff;
    border-color: transparent;
}

/* Panels */
.panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.panel.active {
    display: block;
}

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

/* Search Box */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 1em;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input::placeholder {
    color: #666;
}

.search-box input:focus {
    border-color: #00d4ff;
    background: rgba(255, 255, 255, 0.08);
}

.search-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.search-btn:hover {
    transform: scale(1.05);
}

/* Country Filter */
.country-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #aaa;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.filter-btn.active {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    color: #00d4ff;
}

/* Data Grid */
.data-grid, .patent-links, .paper-sources {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.data-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
}

.data-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-3px);
}

.data-card h4 {
    color: #fff;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.data-card p {
    color: #888;
    font-size: 0.9em;
    line-height: 1.4;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    margin-top: 10px;
    background: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
}

.badge.free {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.badge.cn {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Info Sections */
.patent-info h3, .academic-links h3 {
    color: #fff;
    margin: 30px 0 15px;
    font-size: 1.2em;
}

/* Results */
.results {
    margin-top: 20px;
}

.result-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
}

.result-item h4 {
    color: #00d4ff;
    margin-bottom: 8px;
}

.result-item p {
    color: #aaa;
    font-size: 0.9em;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 0.9em;
}

footer a {
    color: #00d4ff;
    text-decoration: none;
}

.update-info {
    color: #888;
    font-size: 0.85em;
    margin-top: 10px;
}

/* Data Status */
.data-status {
    margin-top: 20px;
    padding: 8px 16px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 8px;
    font-size: 0.9em;
    color: #22c55e;
}

.data-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Hot Grid */
.hot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.hot-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.hot-card h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hot-card h3 .icon {
    font-size: 1.2em;
}

.hot-card .source-badge {
    margin-left: auto;
    font-size: 0.75em;
    padding: 4px 8px;
    background: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
    border-radius: 6px;
}

.hot-list {
    list-style: none;
    padding: 0;
}

.hot-item {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 12px;
}

.hot-item:last-child {
    border-bottom: none;
}

.hot-rank {
    min-width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
    font-weight: 600;
    color: #fff;
}

.hot-rank.rank-1 { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); }
.hot-rank.rank-2 { background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%); }
.hot-rank.rank-3 { background: linear-gradient(135deg, #cd7f32 0%, #a0522d 100%); }

.hot-content {
    flex: 1;
}

.hot-title {
    color: #e0e0e0;
    font-size: 0.95em;
    line-height: 1.4;
    margin-bottom: 4px;
}

.hot-title a {
    color: inherit;
    text-decoration: none;
}

.hot-title a:hover {
    color: #00d4ff;
}

.hot-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8em;
    color: #666;
}

.hot-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.loading {
    text-align: center;
    color: #888;
    padding: 40px;
}

/* Gov Realtime */
.gov-realtime, .academic-realtime {
    margin-bottom: 25px;
}

.gov-realtime h3, .academic-realtime h3 {
    color: #fff;
    font-size: 1.2em;
    margin-bottom: 15px;
}

.gov-cards, .paper-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.gov-item, .paper-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 15px;
}

.gov-item h4, .paper-item h4 {
    color: #00d4ff;
    font-size: 0.95em;
    margin-bottom: 6px;
}

.gov-item p, .paper-item p {
    color: #888;
    font-size: 0.85em;
}

.paper-item .paper-authors {
    color: #666;
    font-size: 0.8em;
    margin-top: 6px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8em;
    }
    
    .weather-card {
        padding: 20px;
        width: 100%;
    }
    
    .weather-content {
        flex-direction: column;
    }
    
    .time-display {
        margin-left: 0;
        margin-top: 15px;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab {
        min-width: auto;
    }
}
