:root {
    /* Hyper-Modern 2.0 Color Palette (Glass-Dark Aesthetic) */
    --bg-dark: #0a0c10;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 16px;

    --accent-primary: #8b5cf6;
    --accent-secondary: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);

    --text-high: #f8fafc;
    --text-mid: #94a3b8;
    --text-low: #64748b;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-lg: 12px;
    /* Reduced from 20px */
    --radius-md: 8px;
    /* Reduced from 12px */

    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.25);
    --transition-smooth: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-high);
    line-height: 1.4;
    /* Reduced from 1.6 */
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background Mesh Gradients */
.mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(6, 182, 212, 0.15) 0%, transparent 50%);
}

.mesh-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: floating 20s infinite alternate ease-in-out;
}

@keyframes floating {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(100px, 50px) scale(1.2);
    }
}

/* Glassmorphism Utilities */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.glass-hover:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
    /* Reduced opacity for a cleaner look */
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
    /* Smaller lift */
}

/* Typography Overrides */
h1,
h2,
h3 {
    letter-spacing: -0.02em;
    font-weight: 700;
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar (Compact Floating) */
.navbar {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 96%;
    max-width: 1400px;
    height: 52px;
    /* Reduced from 70px */
    z-index: 1000;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

.nav-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-high);
    text-decoration: none;
}

.logo i {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-links a {
    color: var(--text-mid);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-high);
}

/* Buttons (Compact) */
.btn {
    padding: 0.45rem 1rem;
    /* Compact padding */
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    font-size: 0.8rem;
    /* Compact font */
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: scale(1.02);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-high);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
}

/* Dashboard Shell (Compact) */
.app-container {
    display: flex;
    min-height: 100vh;
    padding-top: 62px;
    /* Adjusted for smaller navbar */
}

.sidebar {
    width: 220px;
    /* Reduced from 280px */
    padding: 1rem 0.75rem;
    /* Compact padding */
    position: sticky;
    top: 62px;
    height: calc(100vh - 62px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    margin-right: 1.5rem;
    /* Breathing room */
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    /* Compact padding */
    color: var(--text-mid);
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: 0.2rem;
    font-size: 0.85rem;
    /* Smaller font */
    transition: var(--transition-smooth);
}

.sidebar-link:hover {
    color: var(--text-high);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-link.active {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(139, 92, 246, 0.15);
}

.main-content {
    flex: 1;
    padding: 1.5rem 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Dashboard Elements (Compact) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1rem 1.25rem;
    /* Reduced from 2rem */
}

.stat-value {
    font-size: 1.5rem;
    /* Reduced from 2.5rem */
    font-weight: 800;
    margin: 0.1rem 0;
}

.stat-label {
    color: var(--text-mid);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* High-Density Link Cards */
.link-card {
    padding: 0.6rem 1rem;
    /* Compact padding */
    margin-bottom: 0.5rem;
    /* Compact margin */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.link-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    min-width: 0;
}

.link-info h4 {
    font-size: 0.9rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.link-url-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.link-url {
    color: var(--accent-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-target {
    font-size: 0.7rem;
    color: var(--text-low);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

/* Modal Overlay (Compact) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

/* Custom Inputs */
.modern-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    color: var(--text-high);
    font-size: 1rem;
    width: 100%;
    outline: none;
    transition: var(--transition-smooth);
}

.modern-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

/* Utility */
.mt-2 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

.text-secondary {
    color: var(--text-mid);
}

.hidden {
    display: none !important;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 2000;
}

.toast {
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    animation: toastSlideIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}