/* ============================================
   SENTINELKEY - Global Design System
   Dark Cyberpunk Theme with Glassmorphism
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;700&family=Inter:wght@300;400;500;600;700&family=Orbitron:wght@400;500;600;700;800;900&display=swap');

/* === CSS CUSTOM PROPERTIES === */
:root {
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Orbitron', monospace;
    --font-mono: 'Fira Code', monospace;

    --color-bg: #030712;
    --color-bg-card: rgba(17, 24, 39, 0.7);
    --color-text: #f3f4f6;
    --color-text-dim: #9ca3af;
    --color-text-faint: #6b7280;

    --color-emerald: #10b981;
    --color-emerald-dim: rgba(16, 185, 129, 0.15);
    --color-blue: #3b82f6;
    --color-blue-dim: rgba(59, 130, 246, 0.15);
    --color-red: #ef4444;
    --color-red-dim: rgba(239, 68, 68, 0.2);
    --color-amber: #f59e0b;
    --color-amber-dim: rgba(245, 158, 11, 0.15);
    --color-purple: #c084fc;
    --color-rose: #f43f5e;

    --color-border: rgba(16, 185, 129, 0.15);
    --color-border-dim: rgba(55, 65, 81, 0.6);

    --glass-blur: blur(12px);
    --shadow-dark: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --shadow-glow-green: 0 0 20px rgba(16, 185, 129, 0.2);
    --shadow-glow-red: 0 0 20px rgba(239, 68, 68, 0.2);
    --shadow-glow-blue: 0 0 20px rgba(59, 130, 246, 0.2);

    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    background-image:
        radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(139, 92, 246, 0.04) 0px, transparent 50%);
    color: var(--color-text);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(3, 7, 18, 0.9); }
::-webkit-scrollbar-thumb { background: rgba(16, 185, 129, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(16, 185, 129, 0.6); }

/* === TYPOGRAPHY === */
.font-cyber { font-family: var(--font-display); }
.font-mono-cyber { font-family: var(--font-mono); }

.text-neon-green { text-shadow: 0 0 10px rgba(16, 185, 129, 0.5), 0 0 20px rgba(16, 185, 129, 0.2); }
.text-neon-blue { text-shadow: 0 0 10px rgba(59, 130, 246, 0.5), 0 0 20px rgba(59, 130, 246, 0.2); }
.text-neon-red { text-shadow: 0 0 10px rgba(239, 68, 68, 0.5), 0 0 20px rgba(239, 68, 68, 0.2); }

.text-gradient {
    background: linear-gradient(to right, var(--color-emerald), var(--color-blue), #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === CYBER GRID BACKGROUND === */
.cyber-grid {
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(16, 185, 129, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(16, 185, 129, 0.03) 1px, transparent 1px);
}

/* === SCANLINES EFFECT === */
.scanlines { position: relative; overflow: hidden; }
.scanlines::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

/* === GLASSMORPHISM CARDS === */
.cyber-glass {
    background: var(--color-bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-dark);
    transition: var(--transition-smooth);
}
.cyber-glass:hover { border-color: rgba(16, 185, 129, 0.35); box-shadow: 0 8px 32px 0 rgba(16, 185, 129, 0.1); }

.cyber-glass-blue {
    background: var(--color-bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--color-blue-dim);
    box-shadow: var(--shadow-dark);
    transition: var(--transition-smooth);
}

.cyber-glass-red {
    background: rgba(17, 24, 39, 0.75);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--color-red-dim);
    box-shadow: var(--shadow-dark);
    transition: var(--transition-smooth);
}

/* === ANIMATIONS === */
@keyframes cyber-pulse {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}
@keyframes slide-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes ping {
    75%, 100% { transform: scale(2); opacity: 0; }
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-slide-in { animation: slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-fade-in { animation: fade-in 0.4s ease-out forwards; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-ping { animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; }
.animate-bounce { animation: bounce 1s infinite; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.cyber-pulse-glow { animation: cyber-pulse 4s infinite ease-in-out; }

/* === UTILITY CLASSES === */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow { flex-grow: 1; }
.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-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

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

.w-full { width: 100%; }
.max-w-md { max-width: 28rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-7xl { max-width: 80rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.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; }
.mb-16 { margin-bottom: 4rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-auto { margin-top: auto; }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

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

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.z-100 { z-index: 100; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.shrink-0 { flex-shrink: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break-all { word-break: break-all; }
.select-all { user-select: all; }
.pointer-events-none { pointer-events: none; }
.cursor-pointer { cursor: pointer; }
.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.tracking-tight { letter-spacing: -0.025em; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.625; }

.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* Color utility */
.text-emerald { color: var(--color-emerald); }
.text-blue { color: var(--color-blue); }
.text-red { color: var(--color-red); }
.text-amber { color: var(--color-amber); }
.text-purple { color: var(--color-purple); }
.text-rose { color: var(--color-rose); }
.text-gray-100 { color: #f3f4f6; }
.text-gray-200 { color: #e5e7eb; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }

.bg-gray-900 { background-color: #111827; }
.bg-gray-950 { background-color: #030712; }

/* === RESPONSIVE === */
@media (min-width: 640px) {
    .sm-flex-row { flex-direction: row; }
    .sm-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .sm-block { display: block; }
}

@media (min-width: 768px) {
    .md-flex-row { flex-direction: row; }
    .md-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .md-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .md-flex { display: flex; }
    .md-hidden { display: none; }
    .md-block { display: block; }
    .md-text-left { text-align: left; }
    .md-text-right { text-align: right; }
    .md-col-span-1 { grid-column: span 1; }
    .md-col-span-2 { grid-column: span 2; }
    .md-col-span-3 { grid-column: span 3; }
    .md-max-w-xs { max-width: 20rem; }
}

@media (min-width: 1024px) {
    .lg-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .lg-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .lg-col-span-1 { grid-column: span 1; }
    .lg-col-span-2 { grid-column: span 2; }
    .lg-col-span-3 { grid-column: span 3; }
}

/* === MATRIX OVERLAY === */
.matrix-overlay {
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.9) 0%, rgba(3, 7, 18, 0.6) 50%, rgba(3, 7, 18, 0.9) 100%);
}

/* Main content area */
main { flex-grow: 1; }
