*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #050508;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --text: #f0f0f5;
    --text-muted: rgba(240, 240, 245, 0.45);
    --accent: #7c6cf0;
    --accent-glow: rgba(124, 108, 240, 0.35);
    --radius: 16px;
    --radius-sm: 10px;
    --font: 'Inter', system-ui, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── Animated background ── */
.bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    animation: float 12s ease-in-out infinite;
}

.orb-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #7c6cf0 0%, transparent 70%);
    top: -15%; left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
    bottom: -10%; right: -8%;
    animation-delay: -4s;
}

.orb-3 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #ec4899 0%, transparent 70%);
    top: 40%; left: 50%;
    transform: translateX(-50%);
    animation-delay: -8s;
    opacity: 0.3;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 100%);
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(30px, -20px) scale(1.05); }
    66%       { transform: translate(-20px, 15px) scale(0.95); }
}

/* ── Layout ── */
.container {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}

/* ── Hero ── */
.hero {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeUp 0.7s ease both;
}

.hero-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.hero-avatar img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.avatar-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #7c6cf0, #06b6d4, #ec4899, #7c6cf0);
    animation: spin 6s linear infinite;
    z-index: 0;
}

.avatar-ring::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--bg);
}

@keyframes spin { to { transform: rotate(360deg); } }

.hero-title {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 30%, rgba(255,255,255,0.6));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.hero-sub {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 20px;
}

.clock {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(12px);
}

.clock-time {
    font-family: var(--mono);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--text);
}

.clock-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

/* ── Search ── */
.search-wrap {
    position: relative;
    margin-bottom: 28px;
    animation: fadeUp 0.7s 0.1s ease both;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition);
}

.search-input {
    width: 100%;
    padding: 16px 80px 16px 50px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    outline: none;
    backdrop-filter: blur(16px);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.search-input::placeholder { color: var(--text-muted); }

.search-input:focus {
    border-color: var(--accent);
    background: rgba(124, 108, 240, 0.06);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.search-input:focus + .search-hint,
.search-wrap:focus-within .search-icon { color: var(--accent); }

.search-hint {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 8px;
    pointer-events: none;
    transition: color var(--transition);
}

/* ── Tabs ── */
.tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 24px;
    scrollbar-width: none;
    animation: fadeUp 0.7s 0.15s ease both;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 100px;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
}

.tab-icon { font-size: 0.9rem; }

.tab:hover {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
}

.tab.active {
    color: var(--text);
    background: rgba(124, 108, 240, 0.15);
    border-color: rgba(124, 108, 240, 0.4);
    box-shadow: 0 0 20px rgba(124, 108, 240, 0.15);
}

/* ── Card grid ── */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
    animation: fadeUp 0.5s var(--delay, 0ms) ease both;
}

.card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 50%, var(--accent, #7c6cf0) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    background: var(--surface-hover);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px var(--border-hover);
}

.card:hover .card-glow { opacity: 0.12; }

.card-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: transform var(--transition);
}

.card:hover .card-icon { transform: scale(1.08); }

.card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.card-name {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-url {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-arrow {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    opacity: 0;
    transform: translate(-4px, 4px);
    transition: opacity var(--transition), transform var(--transition), color var(--transition);
}

.card:hover .card-arrow {
    opacity: 1;
    transform: translate(0, 0);
    color: var(--accent);
}

.card.hidden { display: none; }

/* ── Empty state ── */
.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 48px 0;
    animation: fadeUp 0.4s ease both;
}

/* ── Contact ── */
.contact {
    margin-top: 56px;
    animation: fadeUp 0.7s 0.25s ease both;
}

.contact-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.contact-title-icon { font-size: 1rem; }

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    font-family: var(--font);
    font-size: inherit;
    text-align: left;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
    animation: fadeUp 0.5s var(--delay, 0ms) ease both;
}

.contact-item:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    background: var(--surface-hover);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.contact-item.copied {
    border-color: rgba(52, 211, 153, 0.5);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.15);
}

.contact-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.contact-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.contact-value {
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-copy {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    opacity: 0.5;
    transition: opacity var(--transition), color var(--transition);
}

.contact-item:hover .contact-copy {
    opacity: 1;
    color: var(--accent);
}

/* ── Toast ── */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
    max-width: 360px;
    padding: 14px 18px;
    background: rgba(12, 12, 18, 0.85);
    border: 1px solid rgba(52, 211, 153, 0.35);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 24px rgba(52, 211, 153, 0.12);
    opacity: 0;
    transform: translateX(calc(100% + 24px));
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.hide {
    opacity: 0;
    transform: translateX(calc(100% + 24px));
}

.toast-error {
    border-color: rgba(248, 113, 113, 0.35);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 24px rgba(248, 113, 113, 0.12);
}

.toast-error .toast-icon {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

.toast-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(52, 211, 153, 0.15);
    border-radius: 8px;
    color: #34d399;
}

.toast-icon svg {
    width: 16px;
    height: 16px;
}

.toast-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toast-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
}

.toast-text {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Footer ── */
.footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
    font-size: 0.8rem;
    color: var(--text-muted);
    animation: fadeUp 0.7s 0.3s ease both;
}

.footer-dot { opacity: 0.4; }

/* ── Animations ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .container { padding: 32px 16px 48px; }
    .grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .search-hint { display: none; }
    .hero-title { font-size: 2rem; }
    .toast-container { top: 16px; right: 16px; left: 16px; }
    .toast { min-width: unset; max-width: unset; }
}
