/* ===== CSS Custom Properties ===== */
:root {
    --bg-deep: #0f0f17;
    --bg-surface: #161622;
    --text-primary: #e4e4ec;
    --text-secondary: #9898a8;
    --text-muted: #5c5c6e;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.06);
    --card-hover-bg: rgba(255, 255, 255, 0.06);
    --card-hover-border: rgba(255, 255, 255, 0.12);
    --accent: #7c7c9a;
    --accent-glow: rgba(124, 124, 154, 0.15);
    --radius: 14px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, #1e1e32 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 0% 80%, #181830 0%, transparent 50%),
        radial-gradient(ellipse 50% 50% at 100% 70%, #161628 0%, transparent 50%),
        var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* ===== Background Texture ===== */
.bg-noise {
    position: fixed;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* ===== Ambient Orbs ===== */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

.orb-1 {
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, rgba(100, 100, 160, 0.4), transparent);
    top: -15%;
    left: -10%;
    animation: orbDrift 20s ease-in-out infinite;
}

.orb-2 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(120, 100, 140, 0.3), transparent);
    bottom: -12%;
    right: -8%;
    animation: orbDrift 24s ease-in-out infinite reverse;
}

@keyframes orbDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%      { transform: translate(30px, -20px) scale(1.05); }
    50%      { transform: translate(-15px, 25px) scale(0.95); }
    75%      { transform: translate(-25px, -10px) scale(1.02); }
}

/* ===== Main Container ===== */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    padding: 48px 32px;
}

/* ===== Navigation Title ===== */
.nav-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin-bottom: 40px;
    background: linear-gradient(135deg, #d4d4e0 0%, #a0a0b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Link Grid ===== */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

/* ===== Link Card ===== */
.link-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-secondary);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: background var(--transition),
                border-color var(--transition),
                transform var(--transition),
                box-shadow var(--transition);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.link-card:hover {
    background: var(--card-hover-bg);
    border-color: var(--card-hover-border);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.link-card:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}

.link-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0;
    transition: background var(--transition),
                color var(--transition);
}

.link-card:hover .link-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #b0b0c8;
}

.link-name {
    font-size: 0.95rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== Empty State ===== */
.empty-hint {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

/* ===== Responsive ===== */
@media (max-width: 520px) {
    .container {
        padding: 36px 16px;
    }

    .nav-title {
        font-size: 1.5rem;
        margin-bottom: 28px;
    }

    .link-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .link-card {
        padding: 16px 18px;
    }
}
