/* ==========================================================================
   ErrorTrack - Error Monitoring Platform
   Premium CSS Design System
   ========================================================================== */

/* ==========================================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ========================================================================== */

:root {
    /* Brand Colors */
    --color-error: #DC2626;
    --color-error-light: #FEE2E2;
    --color-error-dark: #991B1B;
    --color-warning: #F59E0B;
    --color-warning-light: #FEF3C7;
    --color-info: #3B82F6;
    --color-info-light: #DBEAFE;
    --color-success: #10B981;
    --color-success-light: #D1FAE5;

    /* Primary (Blue - calming UI) */
    --color-primary-50: #EFF6FF;
    --color-primary-100: #DBEAFE;
    --color-primary-200: #BFDBFE;
    --color-primary-300: #93C5FD;
    --color-primary-400: #60A5FA;
    --color-primary-500: #3B82F6;
    --color-primary-600: #2563EB;
    --color-primary-700: #1D4ED8;
    --color-primary-800: #1E40AF;
    --color-primary-900: #1E3A8A;

    /* Neutral (Cool gray) */
    --color-neutral-50: #F8FAFC;
    --color-neutral-100: #F1F5F9;
    --color-neutral-200: #E2E8F0;
    --color-neutral-300: #CBD5E1;
    --color-neutral-400: #94A3B8;
    --color-neutral-500: #64748B;
    --color-neutral-600: #475569;
    --color-neutral-700: #334155;
    --color-neutral-800: #1E293B;
    --color-neutral-900: #0F172A;
    --color-neutral-950: #020617;

    /* Typography */
    --font-mono: 'Roboto Mono', 'SF Mono', 'Consolas', monospace;
    --font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Typography Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: clamp(2.5rem, 5vw, 3rem);
    --text-6xl: clamp(3rem, 6vw, 3.75rem);
    --text-7xl: clamp(3.5rem, 8vw, 4.5rem);

    /* Spacing Scale (8px base) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-3xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-error: 0 0 0 3px rgba(220, 38, 38, 0.2);
    --shadow-primary: 0 0 0 3px rgba(59, 130, 246, 0.2);
    --shadow-glow-error: 0 0 40px rgba(220, 38, 38, 0.3);
    --shadow-glow-primary: 0 0 40px rgba(59, 130, 246, 0.3);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Z-index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;

    /* Light mode backgrounds */
    --bg-body: var(--color-neutral-50);
    --bg-card: #FFFFFF;
    --bg-card-hover: var(--color-neutral-50);
    --bg-code: var(--color-neutral-900);
    --bg-input: #FFFFFF;

    /* Light mode text */
    --text-primary: var(--color-neutral-900);
    --text-secondary: var(--color-neutral-600);
    --text-tertiary: var(--color-neutral-500);
    --text-inverse: #FFFFFF;

    /* Light mode borders */
    --border-default: var(--color-neutral-200);
    --border-muted: var(--color-neutral-100);
}

/* Dark Mode */
.dark {
    --bg-body: var(--color-neutral-950);
    --bg-card: var(--color-neutral-900);
    --bg-card-hover: var(--color-neutral-800);
    --bg-code: #0D1117;
    --bg-input: var(--color-neutral-800);

    --text-primary: #FFFFFF;
    --text-secondary: var(--color-neutral-300);
    --text-tertiary: var(--color-neutral-400);
    --text-inverse: var(--color-neutral-900);

    --border-default: var(--color-neutral-800);
    --border-muted: var(--color-neutral-800);

    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.5);
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Selection */
::selection {
    background-color: var(--color-primary-500);
    color: white;
}

/* Focus */
:focus-visible {
    outline: 2px solid var(--color-primary-500);
    outline-offset: 2px;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--color-neutral-400);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-neutral-500);
}

.dark ::-webkit-scrollbar-thumb {
    background: var(--color-neutral-600);
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: var(--color-neutral-500);
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

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

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary-400), var(--color-primary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-error {
    background: linear-gradient(135deg, var(--color-error), #FF6B6B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-narrow {
    max-width: 768px;
}

.container-wide {
    max-width: 1536px;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-default);
    transition: all var(--transition-base);
}

.dark .nav {
    background: rgba(2, 6, 23, 0.8);
}

.nav-scrolled {
    box-shadow: var(--shadow-md);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 700;
    font-size: var(--text-xl);
    color: var(--text-primary);
    text-decoration: none;
}

.nav-logo svg {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: none;
    align-items: center;
    gap: var(--space-1);
}

@media (min-width: 1024px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.nav-link.active {
    color: var(--color-primary-500);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.nav-mobile-toggle {
    display: flex;
    padding: var(--space-2);
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

@media (min-width: 1024px) {
    .nav-mobile-toggle {
        display: none;
    }
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-body);
    padding: var(--space-6);
    z-index: var(--z-fixed);
    overflow-y: auto;
}

.mobile-menu.active {
    display: block;
}

@media (min-width: 1024px) {
    .mobile-menu {
        display: none !important;
    }
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.mobile-menu-link {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-lg);
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: background var(--transition-fast);
}

.mobile-menu-link:hover {
    background: var(--bg-card);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--color-primary-500);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-600);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--color-neutral-300);
}

.dark .btn-secondary:hover {
    border-color: var(--color-neutral-700);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-error {
    background: var(--color-error);
    color: white;
}

.btn-error:hover {
    background: var(--color-error-dark);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
}

.btn-icon {
    padding: var(--space-2);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
}

.card-hover:hover {
    border-color: var(--color-neutral-300);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

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

.card-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-default);
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    padding: var(--space-6);
    border-top: 1px solid var(--border-default);
    background: var(--bg-card-hover);
}

/* ==========================================================================
   ERROR DASHBOARD COMPONENT (Signature Element)
   ========================================================================== */

.error-dashboard {
    background: var(--bg-code);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
}

.error-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-6);
    background: linear-gradient(to bottom, rgba(255,255,255,0.05), transparent);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.error-dashboard-dots {
    display: flex;
    gap: var(--space-2);
}

.error-dashboard-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
}

.error-dashboard-dot.red { background: #FF5F56; }
.error-dashboard-dot.yellow { background: #FFBD2E; }
.error-dashboard-dot.green { background: #27C93F; }

.error-dashboard-title {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--color-neutral-400);
}

.error-dashboard-content {
    padding: var(--space-6);
}

/* Error List */
.error-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.error-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-4);
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.error-item:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
}

.error-item.active {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
}

.error-severity {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: var(--radius-full);
    animation: pulse-severity 2s ease-in-out infinite;
}

.error-severity.critical { background: var(--color-error); }
.error-severity.warning { background: var(--color-warning); }
.error-severity.info { background: var(--color-info); }

@keyframes pulse-severity {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.error-content {
    flex: 1;
    min-width: 0;
}

.error-title {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: white;
    margin-bottom: var(--space-1);
}

.error-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    font-size: var(--text-xs);
    color: var(--color-neutral-400);
}

.error-count {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    background: rgba(220, 38, 38, 0.2);
    color: #FCA5A5;
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-md);
}

/* Expanded Error Detail */
.error-detail {
    margin-top: var(--space-4);
    padding: var(--space-4);
    background: rgba(0,0,0,0.3);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.05);
}

.error-detail-section {
    margin-bottom: var(--space-4);
}

.error-detail-section:last-child {
    margin-bottom: 0;
}

.error-detail-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-neutral-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2);
}

/* Stack Trace */
.stack-trace {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    line-height: 1.8;
    color: var(--color-neutral-300);
    overflow-x: auto;
}

.stack-frame {
    display: flex;
    align-items: center;
    padding: var(--space-1) 0;
}

.stack-frame:hover {
    background: rgba(255,255,255,0.02);
}

.stack-frame-line {
    flex-shrink: 0;
    width: 32px;
    color: var(--color-neutral-500);
    text-align: right;
    margin-right: var(--space-3);
}

.stack-frame-file {
    color: var(--color-primary-400);
}

.stack-frame-function {
    color: #A78BFA;
}

.stack-frame-location {
    color: var(--color-neutral-500);
}

/* Context Info */
.context-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

@media (min-width: 768px) {
    .context-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.context-item {
    padding: var(--space-3);
    background: rgba(255,255,255,0.02);
    border-radius: var(--radius-md);
}

.context-label {
    font-size: var(--text-xs);
    color: var(--color-neutral-500);
    margin-bottom: var(--space-1);
}

.context-value {
    font-size: var(--text-sm);
    color: white;
    font-weight: 500;
}

/* ==========================================================================
   ERROR TIMELINE (Signature Element)
   ========================================================================== */

.error-timeline {
    position: relative;
    padding-left: var(--space-8);
}

.error-timeline::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        to bottom,
        var(--color-error),
        var(--color-warning),
        var(--color-info),
        var(--color-success)
    );
    border-radius: var(--radius-full);
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-6);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: calc(-1 * var(--space-8) + 8px);
    top: 0;
    width: 18px;
    height: 18px;
    background: var(--bg-card);
    border: 3px solid currentColor;
    border-radius: var(--radius-full);
}

.timeline-marker.critical { color: var(--color-error); }
.timeline-marker.warning { color: var(--color-warning); }
.timeline-marker.info { color: var(--color-info); }
.timeline-marker.resolved { color: var(--color-success); }

.timeline-time {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-bottom: var(--space-1);
}

.timeline-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.timeline-description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* ==========================================================================
   IMPACT SCORE (Signature Element)
   ========================================================================== */

.impact-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

.impact-ring {
    position: relative;
    width: 160px;
    height: 160px;
}

.impact-ring-bg {
    fill: none;
    stroke: var(--border-default);
    stroke-width: 12;
}

.impact-ring-fill {
    fill: none;
    stroke: var(--color-error);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 440;
    stroke-dashoffset: 440;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.impact-ring-fill.animated {
    stroke-dashoffset: 110; /* 75% of 440 = 330, so 440 - 330 = 110 */
}

.impact-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--text-primary);
}

.impact-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-align: center;
}

/* ==========================================================================
   ERROR GROUPING ANIMATION (Signature Element)
   ========================================================================== */

.error-grouping {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    justify-content: center;
}

.error-group {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    animation: group-float 3s ease-in-out infinite;
}

.error-group:nth-child(2) { animation-delay: 0.5s; }
.error-group:nth-child(3) { animation-delay: 1s; }
.error-group:nth-child(4) { animation-delay: 1.5s; }
.error-group:nth-child(5) { animation-delay: 2s; }

@keyframes group-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.error-group-icon {
    font-size: var(--text-2xl);
}

.error-group-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 24px;
    height: 24px;
    padding: 0 var(--space-2);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-error);
    color: white;
    font-size: var(--text-xs);
    font-weight: 700;
    border-radius: var(--radius-full);
}

/* ==========================================================================
   CODE BLOCKS
   ========================================================================== */

.code-block {
    background: var(--bg-code);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.code-block-lang {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-neutral-400);
}

.code-block-copy {
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    color: var(--color-neutral-400);
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.code-block-copy:hover {
    color: white;
}

.code-block pre {
    margin: 0;
    padding: var(--space-4);
    overflow-x: auto;
}

.code-block code {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: 1.7;
    color: var(--color-neutral-200);
}

/* Syntax Highlighting */
.token-keyword { color: #FF79C6; }
.token-string { color: #F1FA8C; }
.token-function { color: #8BE9FD; }
.token-comment { color: #6272A4; }
.token-number { color: #BD93F9; }
.token-property { color: #50FA7B; }

/* ==========================================================================
   BADGES & TAGS
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-md);
}

.badge-error {
    background: var(--color-error-light);
    color: var(--color-error-dark);
}

.dark .badge-error {
    background: rgba(220, 38, 38, 0.2);
    color: #FCA5A5;
}

.badge-warning {
    background: var(--color-warning-light);
    color: #92400E;
}

.dark .badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #FCD34D;
}

.badge-info {
    background: var(--color-info-light);
    color: var(--color-primary-700);
}

.dark .badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: #93C5FD;
}

.badge-success {
    background: var(--color-success-light);
    color: #065F46;
}

.dark .badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #6EE7B7;
}

.badge-neutral {
    background: var(--color-neutral-100);
    color: var(--color-neutral-700);
}

.dark .badge-neutral {
    background: var(--color-neutral-800);
    color: var(--color-neutral-300);
}

/* ==========================================================================
   FORMS
   ========================================================================== */

.form-group {
    margin-bottom: var(--space-6);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.form-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary-500);
    box-shadow: var(--shadow-primary);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394A3B8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    background-size: 20px;
    padding-right: var(--space-10);
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary-500);
}

/* ==========================================================================
   PRICING
   ========================================================================== */

.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--space-8);
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-2xl);
    transition: all var(--transition-base);
}

.pricing-card.popular {
    border-color: var(--color-primary-500);
    box-shadow: var(--shadow-glow-primary);
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-1) var(--space-4);
    background: var(--color-primary-500);
    color: white;
    font-size: var(--text-xs);
    font-weight: 700;
    border-radius: var(--radius-full);
}

.pricing-name {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.pricing-description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

.pricing-price {
    margin-bottom: var(--space-6);
}

.pricing-amount {
    font-size: var(--text-5xl);
    font-weight: 700;
    color: var(--text-primary);
}

.pricing-period {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.pricing-features {
    flex: 1;
    margin-bottom: var(--space-8);
}

.pricing-feature {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.pricing-feature svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--color-success);
}

/* ==========================================================================
   FEATURE CARDS
   ========================================================================== */

.feature-card {
    padding: var(--space-8);
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-2xl);
    transition: all var(--transition-base);
}

.feature-card:hover {
    border-color: var(--color-primary-300);
    box-shadow: var(--shadow-lg);
}

.dark .feature-card:hover {
    border-color: var(--color-primary-700);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--color-primary-100);
    color: var(--color-primary-600);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-6);
}

.dark .feature-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--color-primary-400);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.feature-description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==========================================================================
   PLATFORM/SDK CARDS
   ========================================================================== */

.sdk-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-6);
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    text-decoration: none;
    transition: all var(--transition-base);
}

.sdk-card:hover {
    border-color: var(--color-primary-300);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.dark .sdk-card:hover {
    border-color: var(--color-primary-700);
}

.sdk-icon {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-4);
}

.sdk-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.sdk-version {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}

/* ==========================================================================
   INTEGRATION CARDS
   ========================================================================== */

.integration-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    text-decoration: none;
    transition: all var(--transition-base);
}

.integration-card:hover {
    border-color: var(--color-primary-300);
    background: var(--bg-card-hover);
}

.dark .integration-card:hover {
    border-color: var(--color-primary-700);
}

.integration-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-neutral-100);
    border-radius: var(--radius-lg);
}

.dark .integration-icon {
    background: var(--color-neutral-800);
}

.integration-icon svg,
.integration-icon img {
    width: 28px;
    height: 28px;
}

.integration-info {
    flex: 1;
}

.integration-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.integration-category {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

/* ==========================================================================
   BLOG CARDS
   ========================================================================== */

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    overflow: hidden;
    text-decoration: none;
    transition: all var(--transition-base);
}

.blog-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.blog-card-image {
    aspect-ratio: 16/9;
    background: var(--color-neutral-200);
    overflow: hidden;
}

.dark .blog-card-image {
    background: var(--color-neutral-800);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: var(--space-6);
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-bottom: var(--space-3);
}

.blog-card-category {
    color: var(--color-primary-500);
    font-weight: 600;
}

.blog-card-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
    line-height: 1.4;
}

.blog-card-excerpt {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==========================================================================
   CHANGELOG
   ========================================================================== */

.changelog-entry {
    position: relative;
    padding-left: var(--space-8);
    padding-bottom: var(--space-12);
}

.changelog-entry::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 28px;
    bottom: 0;
    width: 2px;
    background: var(--border-default);
}

.changelog-entry:last-child::before {
    display: none;
}

.changelog-entry:last-child {
    padding-bottom: 0;
}

.changelog-dot {
    position: absolute;
    left: 0;
    top: 8px;
    width: 12px;
    height: 12px;
    background: var(--color-primary-500);
    border-radius: var(--radius-full);
}

.changelog-date {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    margin-bottom: var(--space-2);
}

.changelog-version {
    display: inline-flex;
    padding: var(--space-1) var(--space-2);
    background: var(--color-primary-100);
    color: var(--color-primary-700);
    font-size: var(--text-xs);
    font-weight: 600;
    font-family: var(--font-mono);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
}

.dark .changelog-version {
    background: rgba(59, 130, 246, 0.15);
    color: var(--color-primary-400);
}

.changelog-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.changelog-changes {
    list-style: none;
    padding: 0;
    margin: 0;
}

.changelog-change {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.changelog-change-type {
    flex-shrink: 0;
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.changelog-change-type.added {
    background: var(--color-success-light);
    color: #065F46;
}

.dark .changelog-change-type.added {
    background: rgba(16, 185, 129, 0.2);
    color: #6EE7B7;
}

.changelog-change-type.fixed {
    background: var(--color-info-light);
    color: var(--color-primary-700);
}

.dark .changelog-change-type.fixed {
    background: rgba(59, 130, 246, 0.2);
    color: #93C5FD;
}

.changelog-change-type.improved {
    background: var(--color-warning-light);
    color: #92400E;
}

.dark .changelog-change-type.improved {
    background: rgba(245, 158, 11, 0.2);
    color: #FCD34D;
}

/* ==========================================================================
   STATUS PAGE
   ========================================================================== */

.status-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
}

.status-dot.operational {
    background: var(--color-success);
    box-shadow: 0 0 8px var(--color-success);
}

.status-dot.degraded {
    background: var(--color-warning);
    box-shadow: 0 0 8px var(--color-warning);
}

.status-dot.outage {
    background: var(--color-error);
    box-shadow: 0 0 8px var(--color-error);
    animation: pulse-status 1.5s ease-in-out infinite;
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-bar {
    display: flex;
    gap: 2px;
    height: 32px;
}

.status-bar-day {
    flex: 1;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.status-bar-day:hover {
    transform: scaleY(1.2);
}

.status-bar-day.operational {
    background: var(--color-success);
}

.status-bar-day.degraded {
    background: var(--color-warning);
}

.status-bar-day.outage {
    background: var(--color-error);
}

.uptime-value {
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--color-success);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
    padding: var(--space-16) 0 var(--space-8);
    background: var(--bg-card);
    border-top: 1px solid var(--border-default);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr repeat(4, 1fr);
    }
}

.footer-brand {
    max-width: 280px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: var(--space-4);
}

.footer-logo svg {
    width: 32px;
    height: 32px;
}

.footer-description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-6);
}

.footer-social {
    display: flex;
    gap: var(--space-3);
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-card-hover);
    color: var(--text-secondary);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.footer-social-link:hover {
    background: var(--color-primary-500);
    color: white;
}

.footer-social-link svg {
    width: 20px;
    height: 20px;
}

.footer-column-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-link {
    margin-bottom: var(--space-3);
}

.footer-link a {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-link a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    padding-top: var(--space-8);
    border-top: 1px solid var(--border-default);
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-copyright {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.footer-legal {
    display: flex;
    gap: var(--space-6);
}

.footer-legal a {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* Hover effects */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Typing animation */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--color-error); }
}

.typing-effect {
    overflow: hidden;
    border-right: 2px solid var(--color-error);
    white-space: nowrap;
    animation: typing 2s steps(40, end), blink-caret 0.75s step-end infinite;
}

/* Gradient animation */
@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* Float animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Error pulse */
@keyframes error-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    50% { box-shadow: 0 0 0 20px rgba(220, 38, 38, 0); }
}

.animate-error-pulse {
    animation: error-pulse 2s ease-in-out infinite;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only:focus {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: auto;
    height: auto;
    padding: var(--space-4);
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: var(--bg-card);
    color: var(--text-primary);
}

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

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid { display: grid; }

.w-full { width: 100%; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }

.mx-auto { margin-left: auto; margin-right: auto; }
.mt-auto { margin-top: auto; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }

.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }
.py-20 { padding-top: var(--space-20); padding-bottom: var(--space-20); }
.py-24 { padding-top: var(--space-24); padding-bottom: var(--space-24); }

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

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

.bg-gradient-mesh {
    background:
        radial-gradient(at 40% 20%, rgba(220, 38, 38, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
}

.bg-grid {
    background-image:
        linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

.dark .bg-grid {
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1;
        transform: none;
    }

    .typing-effect {
        animation: none;
        border-right: none;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .nav,
    .footer,
    .btn,
    .mobile-menu {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }
}
