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

:root {
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --text-primary: #2d3436;
    --text-secondary: rgba(45, 52, 54, 0.7);
    --accent: #6c5ce7;
    --accent-gradient: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    overflow-x: hidden;
}

.bg-blobs {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: #ff6b9d;
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: #4ecdc4;
    bottom: -100px;
    right: -50px;
    animation-delay: -7s;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: #ffe66d;
    top: 40%;
    left: 60%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.95); }
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 36px;
}

.site-title {
    font-size: 2.6rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    margin-bottom: 8px;
}

.site-subtitle {
    color: rgba(255,255,255,0.85);
    font-size: 1.05rem;
    margin-bottom: 12px;
}

.clock {
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
}

/* Search */
.search-section {
    max-width: 720px;
    margin: 0 auto 48px;
}

.search-engine-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.engine-tab {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.25s ease;
}

.engine-tab:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.engine-tab.active {
    background: var(--accent-gradient);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.search-box {
    display: flex;
    gap: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 6px 6px 6px 24px;
    box-shadow: var(--glass-shadow);
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 1rem;
    color: #fff;
}

.search-box input::placeholder {
    color: rgba(255,255,255,0.7);
}

.search-btn {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: transform 0.2s ease;
}

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

/* Search History */
.search-history {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    margin-top: 10px;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
}

.clear-history {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.clear-history:hover {
    color: #ff6b6b;
}

.history-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 6px 0;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.15s;
    color: #fff;
    font-size: 0.9rem;
}

.history-item:hover {
    background: rgba(255,255,255,0.12);
}

.history-item .del-history {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    font-size: 1rem;
    padding: 2px 8px;
    transition: color 0.2s;
}

.history-item .del-history:hover {
    color: #ff6b6b;
}

.history-empty {
    padding: 16px;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

/* Nav Grid */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.nav-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.card-icon {
    font-size: 1.4rem;
}

.card-icon-img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    border-radius: 6px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.link-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
}

.link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 6px;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    transition: all 0.2s ease;
    background: rgba(255,255,255,0.08);
}

.link-item:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.link-icon {
    font-size: 1.5rem;
}

.link-icon-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
}

.link-name {
    font-size: 0.78rem;
    text-align: center;
    line-height: 1.2;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 48px;
    padding-top: 24px;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

.admin-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.admin-link:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 640px) {
    .site-title { font-size: 1.8rem; }
    .nav-grid { grid-template-columns: 1fr; }
    .search-engine-tabs { gap: 6px; }
    .engine-tab { font-size: 0.78rem; padding: 5px 10px; }
}
