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

html,
body {
    height: 100%;
    font-family: var(--font-family);
    background-color: var(--bg-app);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--bg-input);
    border-radius: var(--radius-full);
}

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

/* Typography defaults */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-16);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary-hover);
}

/* --- Layout Utility Classes (Tailwind-like) --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-16);
}

/* Flexbox */
.flex {
    display: flex;
}

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

.flex-row {
    flex-direction: row;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-none {
    flex: none;
}

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

.items-start {
    align-items: flex-start;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.gap-2 {
    gap: var(--space-2);
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: 1.5rem;
}

.gap-3 {
    gap: 0.75rem;
    /* 12px */
}

.gap-8 {
    gap: var(--space-8);
}

.gap-16 {
    gap: var(--space-16);
}

/* Grid */
.grid {
    display: grid;
}

/* ... existing grid code ... */

/* Space Utilities (Tailwind-like) */
.space-y-2>*+* {
    margin-top: var(--space-8);
}

/* Sizing & Spacing */
/* ... existing sizing code ... */

.p-3 {
    padding: 0.75rem;
    /* 12px */
}

.p-4 {
    padding: var(--space-16);
}

.p-6 {
    padding: var(--space-24);
}

.p-8 {
    padding: var(--space-32);
}

.py-4 {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
}

.px-6 {
    padding-left: var(--space-24);
    padding-right: var(--space-24);
}

/* Margins */
.mb-2 {
    margin-bottom: var(--space-8);
}

.mb-4 {
    margin-bottom: var(--space-16);
}

.mb-6 {
    margin-bottom: var(--space-24);
}

.mb-8 {
    margin-bottom: var(--space-32);
}

.mr-2 {
    margin-right: var(--space-8);
}

.ml-2 {
    margin-left: var(--space-8);
}

.ml-3 {
    margin-left: var(--space-12);
}

/* Positioning */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.top-0 {
    top: 0;
}

.left-0 {
    left: 0;
}

.right-0 {
    right: 0;
}

.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

/* Visuals */
.overflow-hidden {
    overflow: hidden;
}

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

.overflow-x-hidden {
    overflow-x: hidden;
}

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

.bg-transparent {
    background-color: transparent;
}

.text-white {
    color: #fff;
}

.text-gray-300 {
    color: #d1d5db;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-red-400 {
    color: #f87171;
}

.text-red-500 {
    color: #ef4444;
}

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

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

.border-t {
    border-top-width: 1px;
    border-style: solid;
}

.border-r {
    border-right-width: 1px;
    border-style: solid;
}

.border-white\/10 {
    border-color: rgba(255, 255, 255, 0.1);
}

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

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

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

/* Hover States */
.hover\:bg-white\/5:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.hover\:bg-white\/10:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.hover\:text-white:hover {
    color: #fff;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Components Helpers */
.glass {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

/* Media Queries for Grids */
@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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