html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-smooth iframe {
    pointer-events: none;
}

:root {
    --bg-primary: #09090b;
    --bg-secondary: #0e0e10;
    --bg-tertiary: #18181b;
    --bg-card: #0f0f11;
    --sidebar-bg: #0a0a0c;

    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    --accent: #9146ff;
    --accent-hover: #7c3aed;
    --accent-glow: rgba(145, 70, 255, 0.3);

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    --gradient: linear-gradient(135deg, #9146ff 0%, #db2777 100%);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;

    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

img[src*="logo.svg"] {
    -webkit-user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}


* {
    scrollbar-width: thin;
    scrollbar-color: var(--bg-secondary) var(--bg-primary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@keyframes fadeInSoft {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

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

body {
    font-family: 'Roobert', 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

code {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Consolas', monospace;
}

.badge {
    display: inline-block;
    background: rgba(145, 70, 255, 0.1);
    color: #a78bfa;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    border: 1px solid rgba(145, 70, 255, 0.2);
}

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-large {
    padding: 14px 32px;
    font-size: 1.1rem;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-icon:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-warning {
    color: var(--warning);
}

.btn-warning:hover {
    background: rgba(245, 158, 11, 0.1);
}

.btn-success {
    color: var(--success);
}

.btn-success:hover {
    background: rgba(16, 185, 129, 0.1);
}

.btn-block {
    width: 100%;
    margin-top: 15px;
}

.ml-auto {
    margin-left: auto;
}

.toast-container {
    position: fixed;
    top: 90px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: rgba(14, 14, 16, 0.95);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s ease;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast i {
    font-size: 1.2rem;
}

.toast.success i {
    color: var(--success);
}

.toast.error i {
    color: var(--danger);
}

.toast.hiding {
    animation: fadeOutRight 0.3s forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

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

@keyframes fadeOutRight {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    grid-column: 1 / -1;
}

.loading i {
    font-size: 2rem;
    color: var(--accent);
}

.loading p {
    margin-top: 15px;
    font-size: 0.95rem;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.empty-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.empty-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.error-state {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius);
}

.error-icon {
    font-size: 3rem;
    color: var(--danger);
    margin-bottom: 20px;
}

.error-state h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.error-state p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
}

.info-icon {
    color: var(--text-muted);
    cursor: help;
    transition: color 0.2s;
    position: relative;
    font-size: 1.1rem;
}

.info-icon:hover {
    color: var(--accent);
}

.info-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    right: -10px;
    transform: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: 8px;
    width: 240px;
    font-size: 0.85rem;
    color: var(--text-primary);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 100;
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    text-align: left;
    margin-bottom: 10px;
    line-height: 1.4;
    white-space: normal;
}

.info-icon:hover::after {
    opacity: 1;
    transform: translateY(-5px);
}

.text-primary-color {
    color: var(--text-primary) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-accent {
    color: var(--accent) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-gold {
    color: #FFD700 !important;
}

.text-bold {
    font-weight: 600 !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.textarea-xl {
    width: 100%;
    min-height: 180px;
    resize: vertical;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 18px;
    border-radius: var(--radius);
    line-height: 1.6;
    outline: none;
    transition: all 0.2s;
}

.textarea-xl:focus {
    border-color: var(--accent);
    background: rgba(145, 70, 255, 0.02);
}

.card-footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.mt-5 {
    margin-top: 5px !important;
}

.mt-10 {
    margin-top: 10px !important;
}

.mt-20 {
    margin-top: 20px !important;
}

.mb-10 {
    margin-bottom: 10px !important;
}

.mb-20 {
    margin-bottom: 20px !important;
}

.mr-5 {
    margin-right: 5px !important;
}

.w-60 {
    width: 60px !important;
}

.p-40 {
    padding: 40px !important;
}

.flex-1 {
    flex: 1;
}

@media (max-width: 600px) {
    .card-footer-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        text-align: center;
    }

    .card-footer-flex p {
        max-width: 100% !important;
    }

    .toast-container {
        right: 0;
        left: 0;
        padding: 0 20px;
        align-items: center;
        width: 100%;
        top: auto;
        bottom: 20px;
    }

    .toast {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .btn-large,
    .btn-block {
        width: 100%;
        justify-content: center;
    }

    .loading {
        padding: 30px 10px;
    }
}