/**
 * Utility Classes - Tailwind-like utilities
 * Scentia - Custom Implementation
 */

/* Additional Color Variables */
:root {
    --color-primary: #5B8DEF;
    --color-secondary: #8B5CF6;
    --color-text: #ffffff;
    --color-text-muted: rgba(255, 255, 255, 0.6);
    --color-text-subtle: rgba(255, 255, 255, 0.7);
    --color-border: rgba(255, 255, 255, 0.1);
    --color-success: #10b981;
    --spacing-unit: 8px;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Layout */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container { max-width: 640px; }
}

@media (min-width: 768px) {
    .container { max-width: 768px; }
}

@media (min-width: 1024px) {
    .container { max-width: 1024px; }
}

@media (min-width: 1280px) {
    .container { max-width: 1280px; }
}

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }

/* Flexbox */
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.space-x-1 > * + * { margin-left: 0.25rem; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }

/* Position */
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.top-20 { top: 5rem; }
.right-4 { right: 1rem; }
.bottom-4 { bottom: 4rem; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.-top-40 { top: -10rem; }
.-right-40 { right: -10rem; }
.-left-40 { left: -10rem; }
.-bottom-40 { bottom: -10rem; }
.top-1\/2 { top: 50%; }
.right-1\/3 { right: 33.333333%; }
.top-full { top: 100%; }

/* Z-index */
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.-z-10 { z-index: -10; }

/* Sizing */
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-32 { width: 8rem; }
.w-80 { width: 20rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-16 { height: 4rem; }
.h-80 { height: 20rem; }
.min-h-screen { min-height: 100vh; }
.max-w-sm { max-width: 24rem; }

/* Spacing */
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.pt-32 { padding-top: 8rem; }
.pb-20 { padding-bottom: 5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-12 { margin-top: 3rem; }
.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-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }

/* Sizing */
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-32 { width: 8rem; }
.w-80 { width: 20rem; }
.w-full { width: 100%; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-16 { height: 4rem; }
.h-80 { height: 20rem; }
.min-h-screen { min-height: 100vh; }
.max-w-sm { max-width: 24rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-md { max-width: 28rem; }

/* Typography */
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.leading-relaxed { line-height: 1.625; }
.uppercase { text-transform: uppercase; }
.text-center { text-align: center; }

/* Lists */
.list-disc { list-style-type: disc; }

/* Colors */
.text-white { color: #fff; }
.text-gray-100 { color: #f3f4f6; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-green-200 { color: #bbf7d0; }
.text-green-300 { color: #86efac; }
.text-green-400 { color: #4ade80; }
.text-red-200 { color: #fecaca; }
.text-red-300 { color: #fca5a5; }
.text-red-400 { color: #f87171; }
.text-primary-400 { color: #818cf8; }
.bg-dark-950 { background-color: #0a0a0f; }
.bg-white\/5 { background-color: rgba(255, 255, 255, 0.05); }
.bg-green-500\/10 { background-color: rgba(34, 197, 94, 0.1); }
.bg-red-500\/10 { background-color: rgba(239, 68, 68, 0.1); }
.bg-primary-500 { background-color: #6366f1; }
.bg-primary-600 { background-color: #4f46e5; }
.bg-primary-500\/10 { background-color: rgba(99, 102, 241, 0.1); }
.bg-primary-500\/20 { background-color: rgba(99, 102, 241, 0.2); }
.bg-accent-500\/15 { background-color: rgba(6, 182, 212, 0.15); }
.bg-gray-700 { background-color: #374151; }
.bg-gray-600 { background-color: #4b5563; }

/* Borders */
.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-t { border-top-width: 1px; }
.border-white\/5 { border-color: rgba(255, 255, 255, 0.05); }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }
.border-green-500\/30 { border-color: rgba(34, 197, 94, 0.3); }
.border-red-500\/30 { border-color: rgba(239, 68, 68, 0.3); }
.border-primary-500\/30 { border-color: rgba(99, 102, 241, 0.3); }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Flex & Grid Gap */
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(0.75rem * var(--tw-space-y-reverse)); }

/* Effects */
.antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.pointer-events-none { pointer-events: none; }
.opacity-0 { opacity: 0; }
.invisible { visibility: hidden; }
.blur-\[120px\] { filter: blur(120px); }

/* Tables */
.border-collapse { border-collapse: collapse; }

/* Typography Extras */
.tracking-wider { letter-spacing: 0.05em; }

/* Transitions */
.transition-all { transition-property: all; }
.transition-colors { transition-property: color, background-color, border-color; }
.duration-200 { transition-duration: 200ms; }

/* Hover States */
.hover\:text-white:hover { color: #fff; }
.hover\:text-green-300:hover { color: #86efac; }
.hover\:text-red-300:hover { color: #fca5a5; }
.hover\:bg-white\/5:hover { background-color: rgba(255, 255, 255, 0.05); }
.hover\:bg-primary-600:hover { background-color: #4f46e5; }
.hover\:bg-gray-600:hover { background-color: #4b5563; }

/* Group Hover */
.group:hover .group-hover\:from-primary-400 {
    --tw-gradient-from: #818cf8;
}
.group:hover .group-hover\:to-accent-400 {
    --tw-gradient-to: #22d3ee;
}
.group:hover .group-hover\:opacity-100 { opacity: 1; }
.group:hover .group-hover\:visible { visibility: visible; }

/* Gradient Utilities */
.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}
.from-white { --tw-gradient-from: #fff; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 255, 255, 0)); }
.to-gray-400 { --tw-gradient-to: #9ca3af; }
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}
.text-transparent { color: transparent; }

/* Responsive */
@media (min-width: 640px) {
    .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .sm\:flex-row { flex-direction: row; }
    .sm\:mt-0 { margin-top: 0; }
}

@media (min-width: 768px) {
    .md\:hidden { display: none !important; }
    .md\:flex { display: flex !important; }
    .md\:px-8 { padding-left: 2rem; padding-right: 2rem; }
    .md\:p-12 { padding: 3rem; }
    .md\:text-5xl { font-size: 3rem; }
    .md\:col-span-1 { grid-column: span 1 / span 1; }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

/* Utility for max-w-sm */
@media (max-width: 384px) {
    .max-w-sm {
        max-width: 100%;
    }
}

/* Grid utilities */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2 / span 2; }

@media (min-width: 768px) {
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .md\:col-span-2 { grid-column: span 2 / span 2; }
}

/* Base Body Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #0a0a0f;
    color: #f3f4f6;
}

/* Navigation */
.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #ffffff;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #5B8DEF;
    color: white;
}

.btn-primary:hover {
    background-color: #4a7dd9;
    transform: translateY(-1px);
}

.btn-ghost {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-ghost:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Container adjustments */
.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Shadow utilities */
.shadow-lg {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
