/*
 * @File name   : app.css
 * @Project     : URL Shortener Pro
 * @Author      : Saieed Rahman
 * @Copyright   : SidMan Solution
 * @Description : Public design system — dark glassmorphism, variables, components.
 */

/* ── Variables ────────────────────────────────────────────── */
:root {
    --primary:   #6366F1;
    --accent:    #EC4899;
    --teal:      #14B8A6;
    --bg:        #0F0F1A;
    --surface:   rgba(255,255,255,0.04);
    --border:    rgba(255,255,255,0.08);
    --text:      #F8FAFC;
    --text-muted:#94A3B8;
    --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html { font-family: var(--font-sans); }

body { background: var(--bg); color: var(--text); }

/* ── Glassmorphism card ───────────────────────────────────── */
.glass-card {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
}

/* ── Navbar blur ──────────────────────────────────────────── */
.navbar-blur {
    background: rgba(15,15,26,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ── Gradient text ────────────────────────────────────────── */
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Animated mesh background ────────────────────────────── */
.mesh-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 30%, rgba(99,102,241,0.15) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 70%, rgba(236,72,153,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(20,184,166,0.10) 0%, transparent 60%);
    animation: meshShift 12s ease-in-out infinite alternate;
}
@keyframes meshShift {
    0%  { opacity: 0.8; transform: scale(1)    rotate(0deg); }
    100%{ opacity: 1;   transform: scale(1.05) rotate(2deg); }
}
.animate-pulse-slow { animation: pulse 4s cubic-bezier(0.4,0,0.6,1) infinite; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4F46E5);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 8px 25px rgba(99,102,241,0.35); }
.btn-primary:active { transform: translateY(0); }

.btn-copy {
    background: rgba(255,255,255,0.08);
    color: #94A3B8;
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    transition: all 0.15s;
}
.btn-copy:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ── Inputs ───────────────────────────────────────────────── */
.input-field {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #F8FAFC;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: var(--font-sans);
}
.input-field:focus {
    border-color: rgba(99,102,241,0.5);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.input-field::placeholder { color: rgba(148,163,184,0.5); }
select.input-field option { background: #1E1E3A; }

/* ── Feature card hover ───────────────────────────────────── */
.feature-card { transition: transform 0.2s, box-shadow 0.2s; }
.feature-card:hover { box-shadow: 0 20px 60px rgba(99,102,241,0.15); }

/* ── Spinner ──────────────────────────────────────────────── */
.spinner-sm {
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── Badges ───────────────────────────────────────────────── */
.badge-green { padding: 2px 8px; border-radius: 9999px; font-size: 0.7rem; background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
.badge-red   { padding: 2px 8px; border-radius: 9999px; font-size: 0.7rem; background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.2);  }

/* ── Icon button ──────────────────────────────────────────── */
.icon-btn { cursor: pointer; padding: 4px 6px; border-radius: 6px; background: transparent; transition: background 0.15s; font-size: 1rem; color: #64748B; }
.icon-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ── Toggle switch ────────────────────────────────────────── */
.toggle-switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.toggle-switch input[type=checkbox] { display: none; }
.toggle-slider {
    width: 44px; height: 24px; background: rgba(255,255,255,0.1); border-radius: 12px;
    transition: background 0.2s; position: relative;
}
.toggle-slider::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 18px; height: 18px; background: #fff; border-radius: 50%;
    transition: transform 0.2s; box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.toggle-switch input:checked ~ .toggle-slider { background: var(--primary); }
.toggle-switch input:checked ~ .toggle-slider::after { transform: translateX(20px); }
