/* 
   VedSAAS 5.0 Design System 
   "Nebula-Flow"
*/

:root {
    /* -- Palette: Void (Dark) -- */
    --bg-void: #050507;
    --bg-deep: #0a0a0f;
    --bg-card: rgba(255, 255, 255, 0.03);
    /* Lighter, more premium glass */
    --bg-input: rgba(255, 255, 255, 0.06);

    --border-subtle: rgba(255, 255, 255, 0.1);
    --border-active: rgba(255, 255, 255, 0.3);

    /* Dynamic Gradients */
    --gradient-glow: linear-gradient(135deg, #00f0ff 0%, #7000ff 100%);
    --gradient-body: radial-gradient(circle at 50% -20%, #1a1a2e 0%, #050507 60%);

    --accent-cyan: #00f0ff;
    --accent-purple: #7000ff;
    --accent-pink: #ff0055;

    --text-primary: #ffffff;
    --text-secondary: #9494a0;

    /* -- Effects -- */
    --glass-blur: blur(25px);
    --shadow-card: 0 20px 80px -20px rgba(0, 0, 0, 0.7);
    --glow-cyan: 0 0 30px rgba(0, 240, 255, 0.2);
    --glow-text: 0 0 10px rgba(255, 255, 255, 0.1);

    /* -- Typography -- */
    --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* -- Reset & Baselines -- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-void);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(112, 0, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(0, 240, 255, 0.08) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-ui);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* -- Animated Background Mesh -- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

/* -- Utility: Layout -- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

/* -- Utility: Components -- */

/* Premium Glass Card */
.card-glass {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.card-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.card-glass:hover {
    transform: translateY(-8px);
    border-color: var(--border-active);
    box-shadow: var(--shadow-card), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.05);
}

.card-glass:hover::before {
    transform: translateX(100%);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--text-primary);
    color: #000;
    border: 1px solid var(--text-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

/* Typography Gradient */
.text-gradient {
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
}

/* -- Layout: Navbar Placeholder -- */
#navbar-placeholder {
    min-height: 80px;
}

/* -- Branding: Navbar -- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(5, 5, 7, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

.brand-logo {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* -- Animations -- */
.fade-in-up {
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -- Specifics: Ticker -- */
.ticker-container {
    overflow: hidden;
    position: relative;
    padding: 60px 0;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.02) 50%, transparent);
}

.ticker-track {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: scroll 60s linear infinite;
}

.ticker-pill {
    padding: 10px 20px;
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: 99px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(5px);
    transition: 0.3s;
}

.ticker-pill:hover {
    border-color: var(--accent-cyan);
    color: var(--text-primary);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }

    100% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* -- Specifics: Ecosystem Stats -- */

/* ChatGPT-style History Item */
.history-item {
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: #ececf1;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s, color 0.2s;
    position: relative;
    overflow: hidden;
}

.history-item:hover,
.history-item.active {
    background: #2a2b32;
}

.history-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Delete Button - Hidden by default, visible on group hover */
.history-del-btn {
    background: transparent;
    border: none;
    color: #8e8ea0;
    cursor: pointer;
    padding: 4px;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-item:hover .history-del-btn {
    opacity: 1;
}

.history-del-btn:hover {
    color: #ef4444;
    /* Red on hover */
}

.stat-item {
    text-align: center;
    padding: 40px 20px;
}

.stat-num {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(to bottom, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}