/* CSS Variables - 红红火火喜庆主题 */
:root {
    --bg-primary: #1a0505;
    --bg-secondary: #2a0a0a;
    --bg-card: rgba(60, 15, 15, 0.85);
    --bg-card-hover: rgba(80, 20, 20, 0.95);
    --text-primary: #fff5e6;
    --text-secondary: #d4a574;
    --red-primary: #e53935;
    --red-bright: #ff1744;
    --red-deep: #b71c1c;
    --red-light: #ff5252;
    --gold-primary: #ffd700;
    --gold-light: #ffec8b;
    --gold-deep: #daa520;
    --orange-warm: #ff6b35;
    --border-gold: rgba(255, 215, 0, 0.4);
    --shadow-red: rgba(229, 57, 53, 0.5);
    --shadow-gold: rgba(255, 215, 0, 0.3);
    --card-radius: 16px;
    --transition-fast: 0.25s ease;
    --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 喜庆背景 */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(229, 57, 53, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 23, 68, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 60%),
        linear-gradient(180deg, #1a0505 0%, #2a0808 30%, #1a0505 100%);
}

/* 祥云图案背景 */
.background-effects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(255, 215, 0, 0.05) 2px, transparent 2px),
        radial-gradient(circle at 90% 20%, rgba(255, 215, 0, 0.05) 2px, transparent 2px),
        radial-gradient(circle at 30% 80%, rgba(255, 215, 0, 0.05) 2px, transparent 2px),
        radial-gradient(circle at 70% 70%, rgba(255, 215, 0, 0.05) 2px, transparent 2px);
    background-size: 100px 100px;
    animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* 动态红色光球 */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    mix-blend-mode: screen;
    animation: lanternFloat 8s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--red-bright) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    opacity: 0.5;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--gold-primary) 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
    opacity: 0.4;
    animation-delay: -3s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--orange-warm) 0%, transparent 70%);
    top: 50%;
    left: 30%;
    opacity: 0.35;
    animation-delay: -6s;
}

@keyframes lanternFloat {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }
    50% { 
        transform: translate(20px, -30px) scale(1.1);
        opacity: 0.6;
    }
}

/* 粒子容器 */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

/* 鼠标跟随光效 */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.15) 0%, rgba(229, 57, 53, 0.1) 50%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 50px 24px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 70px;
    animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* 标题 - 金色渐变 */
.header h1 {
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 700;
    background: linear-gradient(
        135deg, 
        var(--gold-light) 0%, 
        var(--gold-primary) 25%,
        var(--gold-deep) 50%,
        var(--gold-primary) 75%,
        var(--gold-light) 100%
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: goldShimmer 3s ease infinite;
    margin-bottom: 16px;
    letter-spacing: 0.1em;
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.5);
    position: relative;
}

/* 标题装饰 */
.header h1::before,
.header h1::after {
    content: '✦';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    -webkit-text-fill-color: var(--gold-primary);
    animation: starTwinkle 1.5s ease-in-out infinite;
}

.header h1::before {
    left: -40px;
    animation-delay: 0s;
}

.header h1::after {
    right: -40px;
    animation-delay: 0.75s;
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.3; transform: translateY(-50%) scale(0.8); }
    50% { opacity: 1; transform: translateY(-50%) scale(1.2); }
}

@keyframes goldShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 40px;
    letter-spacing: 0.15em;
    animation: fadeIn 1s ease-out 0.3s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Search Box - 红金风格 */
.search-box {
    position: relative;
    max-width: 550px;
    margin: 0 auto;
    animation: fadeIn 1s ease-out 0.5s both;
}

.search-box input {
    width: 100%;
    padding: 18px 28px;
    padding-left: 55px;
    font-size: 1.05rem;
    font-family: inherit;
    background: rgba(40, 10, 10, 0.9);
    border: 2px solid var(--border-gold);
    border-radius: 50px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-smooth);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 0 20px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(255, 215, 0, 0.05);
}

.search-box input::placeholder {
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.search-box input:focus {
    border-color: var(--gold-primary);
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.3),
        0 0 60px rgba(229, 57, 53, 0.2),
        inset 0 0 20px rgba(255, 215, 0, 0.1);
}

.search-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    pointer-events: none;
    filter: drop-shadow(0 0 5px var(--gold-primary));
}

/* Navigation Content */
.nav-content {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* Category Section */
.category {
    animation: slideInUp 0.8s ease-out both;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.95);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.category:nth-child(1) { animation-delay: 0.1s; }
.category:nth-child(2) { animation-delay: 0.2s; }
.category:nth-child(3) { animation-delay: 0.3s; }
.category:nth-child(4) { animation-delay: 0.4s; }
.category:nth-child(5) { animation-delay: 0.5s; }
.category:nth-child(6) { animation-delay: 0.6s; }

.category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 28px;
    padding-bottom: 15px;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--gold-primary), var(--red-primary), transparent) 1;
    position: relative;
}

.category-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px var(--gold-primary));
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(-5deg); }
    75% { transform: translateY(-3px) rotate(5deg); }
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gold-primary);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    letter-spacing: 0.1em;
}

/* Sites Grid */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Site Card - 红金喜庆风格 */
.site-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    background: linear-gradient(
        135deg,
        rgba(60, 15, 15, 0.95) 0%,
        rgba(80, 20, 20, 0.9) 100%
    );
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--card-radius);
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* 卡片金色边框动画 */
.site-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--card-radius);
    padding: 2px;
    background: linear-gradient(
        135deg,
        var(--gold-primary),
        var(--red-primary),
        var(--gold-deep),
        var(--red-bright),
        var(--gold-primary)
    );
    background-size: 300% 300%;
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
    animation: borderRotate 4s linear infinite;
}

@keyframes borderRotate {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* 卡片光泽效果 */
.site-card::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        transparent 30%,
        rgba(255, 215, 0, 0.15) 50%,
        transparent 70%
    );
    transition: 0.6s;
}

.site-card:hover::after {
    top: 100%;
    left: 100%;
}

.site-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--gold-primary);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(255, 215, 0, 0.2),
        0 0 60px rgba(229, 57, 53, 0.15),
        inset 0 0 30px rgba(255, 215, 0, 0.05);
}

.site-card:hover::before {
    opacity: 1;
}

.site-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
    z-index: 1;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(229, 57, 53, 0.15));
    border-radius: 14px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    transition: var(--transition-fast);
}

.site-card:hover .site-icon {
    transform: scale(1.15) rotate(8deg);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
    border-color: var(--gold-primary);
}

.site-info {
    flex: 1;
    min-width: 0;
    z-index: 1;
}

.site-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    transition: var(--transition-fast);
    letter-spacing: 0.02em;
}

.site-card:hover .site-name {
    color: var(--gold-primary);
    text-shadow: 0 0 15px var(--gold-primary);
}

.site-description {
    font-size: 0.88rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-arrow {
    font-size: 1.4rem;
    color: var(--gold-primary);
    opacity: 0;
    transform: translateX(-15px);
    transition: var(--transition-fast);
    z-index: 1;
    text-shadow: 0 0 10px var(--gold-primary);
}

.site-card:hover .site-arrow {
    opacity: 1;
    transform: translateX(0);
    animation: arrowBounce 0.8s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(8px); }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px var(--red-primary));
    animation: iconBounce 2s ease-in-out infinite;
}

.no-results-text {
    font-size: 1.2rem;
    letter-spacing: 0.05em;
}

/* Hidden */
.hidden {
    display: none !important;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 100px;
    padding-top: 40px;
    border-top: 2px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--gold-primary), var(--red-primary), var(--gold-primary), transparent) 1;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer code {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(229, 57, 53, 0.15));
    padding: 6px 14px;
    border-radius: 8px;
    font-family: 'Fira Code', 'Consolas', monospace;
    color: var(--gold-primary);
    border: 1px solid rgba(255, 215, 0, 0.3);
    text-shadow: 0 0 10px var(--gold-primary);
}

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 20px;
    gap: 24px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 215, 0, 0.2);
    border-top-color: var(--gold-primary);
    border-right-color: var(--red-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 
        0 0 20px var(--gold-primary),
        inset 0 0 20px rgba(255, 215, 0, 0.1);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Error State */
.error {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, rgba(183, 28, 28, 0.2), rgba(255, 107, 53, 0.15));
    border: 2px solid rgba(255, 107, 53, 0.4);
    border-radius: var(--card-radius);
    box-shadow: 0 0 40px rgba(229, 57, 53, 0.2);
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(255, 107, 53, 0.5));
}

.error-title {
    font-size: 1.4rem;
    color: var(--orange-warm);
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.error-message {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 30px 16px;
    }

    .header {
        margin-bottom: 50px;
    }

    .header h1 {
        font-size: 2.5rem;
    }

    .header h1::before,
    .header h1::after {
        display: none;
    }

    .sites-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .site-card {
        padding: 18px;
    }

    .category {
        margin-bottom: 40px;
    }

    .gradient-orb {
        opacity: 0.3;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2rem;
    }

    .search-box input {
        padding: 16px 22px;
        padding-left: 48px;
    }

    .site-icon {
        width: 48px;
        height: 48px;
        font-size: 1.8rem;
    }
}

/* Scrollbar - 红金风格 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-primary), var(--red-primary));
    border-radius: 5px;
    box-shadow: 0 0 10px var(--gold-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gold-light), var(--red-bright));
}

/* Selection */
::selection {
    background: var(--red-primary);
    color: var(--gold-light);
    text-shadow: 0 0 10px var(--red-primary);
}
