:root {
    --bg-app: #1A0A0A;
    /* Deep Dark Red/Black */
    --bg-panel: rgba(45, 15, 15, 0.6);
    /* Translucent Crimson tint */
    --bg-input: #110505;
    --bg-darker: #0D0404;

    --border: rgba(214, 48, 49, 0.2);
    --border-hover: rgba(214, 48, 49, 0.4);
    --border-white-10: rgba(255, 255, 255, 0.1);

    --text-main: #F8FAFC;
    --text-muted: #FCA5A5;
    /* Lighter red tint for muted text */
    --text-gray-300: #E2E8F0;

    --primary: #D63031;
    /* Crimson Red */
    --primary-hover: #E74C3C;
    --primary-10: rgba(214, 48, 49, 0.15);

    --secondary: #FF7675;
    /* Lighter Coral/Pink */
    --accent: #00CEC9;
    /* Cyan contrast */

    --font-sans: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius: 12px;
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-app);
    color: var(--text-main);
    height: 100vh;
    display: flex;
    overflow: hidden;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

/* Utils */
.hidden {
    display: none !important;
}

.space-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

.flex-1 {
    flex: 1;
}

.w-full {
    width: 100%;
}

.full-width {
    width: 100%;
}

.max-w-4xl {
    max-width: 56rem;
}

.max-w-sm {
    max-width: 24rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mt-1 {
    margin-top: 0.25rem;
}

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

.mt-3 {
    margin-top: 0.75rem;
}

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

.mt-6 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.p-5 {
    padding: 1.25rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.pb-6 {
    padding-bottom: 1.5rem;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-6 {
    gap: 1.5rem;
}

.grid {
    display: grid;
}

.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.col-span-2 {
    grid-column: span 2 / span 2;
}

.col-span-1 {
    grid-column: span 1 / span 1;
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-md {
    font-size: 1rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.text-muted {
    color: var(--text-muted);
}

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

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

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

.text-gray-300 {
    color: var(--text-gray-300);
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.font-mono {
    font-family: var(--font-mono);
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wide {
    letter-spacing: 0.05em;
}

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

.block {
    display: block;
}

.bg-dark {
    background: var(--bg-app);
}

.bg-darker {
    background: var(--bg-darker);
}

.bg-panel {
    background: var(--bg-panel);
}

.border-right {
    border-right: 1px solid var(--border);
}

.border-bottom {
    border-bottom: 1px solid var(--border);
}

.border-white-10 {
    border-color: var(--border-white-10);
}

.border-b {
    border-bottom-width: 1px;
}

.border-accent {
    border-color: rgba(0, 206, 201, 0.3) !important;
}

.border-primary-10 {
    border-color: var(--primary-10);
}

.rounded-lg {
    border-radius: var(--radius);
}

.overflow-hidden {
    overflow: hidden;
}

.scroll-y {
    overflow-y: auto;
}

.scroll-x {
    overflow-x: auto;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

/* Custom Base */
.glass {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.card {
    transition: border-color 0.3s ease;
}

.card:hover {
    border-color: var(--border-hover);
}

.inp {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s;
    font-family: var(--font-sans);
    font-size: 0.9rem;
}

.inp:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-10);
}

.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon .icon {
    position: absolute;
    left: 0.8rem;
    pointer-events: none;
}

.input-icon .inp {
    padding-left: 2.2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    transition: all 0.2s;
    text-decoration: none;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn.outline {
    background: transparent;
    border-color: var(--border-white-10);
}

.btn.outline:hover {
    border-color: var(--border-hover);
    color: var(--text-main);
}

.btn.text-btn {
    background: transparent;
    border-color: transparent;
}

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

.btn.sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--primary-10);
    color: var(--secondary);
    border: 1px solid rgba(255, 118, 117, 0.2);
}

/* Layout */
.app-layout {
    display: flex;
    width: 100%;
    height: 100%;
}

.sidebar {
    width: 300px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-radius: 0;
    border-left: none;
    border-top: none;
    border-bottom: none;
    z-index: 5;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand h1 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.brand-icon {
    background: var(--primary);
    color: white;
    display: flex;
    padding: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(214, 48, 49, 0.3);
}

.nav-link {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    color: var(--text-gray-300);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
    cursor: pointer;
}

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

.nav-link.active {
    background: var(--primary-10);
    color: var(--primary);
    font-weight: 600;
    border-color: rgba(214, 48, 49, 0.2);
}

.workspace {
    flex-grow: 1;
}

.empty-state {
    opacity: 1;
    transition: opacity 0.3s;
}

/* Lists and Tables */
.bullet-list {
    list-style: none;
    padding-left: 1.5rem;
}

.bullet-list li {
    position: relative;
    line-height: 1.5;
}

.bullet-list li::before {
    content: '';
    position: absolute;
    left: -1.25rem;
    top: 0.5rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.do-list li::before {
    background: var(--primary);
}

.dont-list li::before {
    background: var(--secondary);
}

table {
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-white-10);
    vertical-align: top;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Code Highlights */
pre {
    margin: 0;
}

code {
    font-family: var(--font-mono);
}

.hl-tag {
    color: #FF7675;
}

.hl-attr {
    color: #00CEC9;
}

.hl-val {
    color: #A8DF65;
}

@media (max-width: 900px) {
    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: 35vh;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .grid.cols-3,
    .grid.cols-2 {
        grid-template-columns: 1fr;
    }

    .col-span-2,
    .col-span-1 {
        grid-column: span 1 / span 1;
    }

    .p-8 {
        padding: 1.5rem;
    }
}