/* ===========================
   Custom CSS for react-alert-box Website
   =========================== */

/* Root Variables */
:root {
    --cyan-400: #06b6d4;
    --cyan-500: #0891b2;
    --blue-400: #60a5fa;
    --blue-600: #2563eb;
    --purple-400: #a78bfa;
    --purple-600: #7c3aed;
    --slate-950: #030712;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
}

/* ===========================
   Animations
   =========================== */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(6, 182, 212, 0.6);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

/* ===========================
   Utility Classes
   =========================== */

.animate-scale-in {
    animation: scaleIn 0.4s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

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

.animate-shimmer {
    background-image: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

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

.animate-bounce-slow {
    animation: bounce 2s ease-in-out infinite;
}

/* ===========================
   Custom Scrollbar
   =========================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--slate-950);
}

::-webkit-scrollbar-thumb {
    background: var(--slate-700);
    border-radius: 5px;
}

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

/* ===========================
   Text Selection
   =========================== */

::selection {
    background-color: var(--cyan-400);
    color: var(--slate-950);
}

/* ===========================
   Code Block Styling
   =========================== */

pre {
    font-family: 'JetBrains Mono', monospace;
}

code {
    font-family: 'JetBrains Mono', monospace;
}

/* ===========================
   Button Enhancements
   =========================== */

button {
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::before {
    width: 300px;
    height: 300px;
}

/* ===========================
   Gradient Text
   =========================== */

.gradient-text {
    background: linear-gradient(135deg, var(--cyan-400), var(--blue-600), var(--purple-600));
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 6s ease infinite;
}

/* ===========================
   Cards with Hover Effects
   =========================== */

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    border-color: var(--cyan-400);
    box-shadow: 0 20px 40px rgba(6, 182, 212, 0.2);
}

/* ===========================
   Links with Underline Animation
   =========================== */

.menu-item {
    position: relative;
}

.menu-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cyan-400);
    transition: width 0.3s ease;
}

.menu-item:hover::after {
    width: 100%;
}

/* ===========================
   Input Focus States
   =========================== */

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--cyan-400);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

/* ===========================
   Loading Spinner
   =========================== */

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ===========================
   Backdrop Blur
   =========================== */

.backdrop-blur-xl {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ===========================
   Text Gradient
   =========================== */

.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--inherit));
}

/* ===========================
   Hero Section Enhancements
   =========================== */

.hero-title {
    font-size: 4rem;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -0.02em;
    animation: fadeInDown 0.8s ease-out 0.1s both;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

/* ===========================
   Feature Grid
   =========================== */

.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(6, 182, 212, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

/* ===========================
   Table Styling
   =========================== */

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 2px solid var(--slate-700);
    color: var(--cyan-400);
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
}

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

/* ===========================
   Alert Modal Styling
   =========================== */

#demoAlertOverlay {
    animation: fadeInDown 0.3s ease-out;
}

#demoAlertOverlay.hidden {
    display: none !important;
}

.alert-box {
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    pre {
        font-size: 0.75rem;
    }
}

/* ===========================
   Print Styles
   =========================== */

@media print {
    .no-print {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}

/* ===========================
   Dark Mode Enhancement
   =========================== */

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }

    body {
        background-color: var(--slate-950);
        color: var(--slate-300);
    }
}

/* ===========================
   Accessibility
   =========================== */

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

/* ===========================
   Focus Visible for Keyboard Navigation
   =========================== */

:focus-visible {
    outline: 2px solid var(--cyan-400);
    outline-offset: 2px;
}

/* ===========================
   Smooth Scrolling
   =========================== */

html {
    scroll-behavior: smooth;
}

/* ===========================
   Custom Gradient Backgrounds
   =========================== */

.bg-gradient-custom {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(37, 99, 235, 0.1));
}

.bg-gradient-hover {
    transition: background 0.3s ease;
}

.bg-gradient-hover:hover {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(37, 99, 235, 0.2));
}

/* ===========================
   Shadow Effects
   =========================== */

.shadow-glow {
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.4);
}

.shadow-glow-purple {
    box-shadow: 0 0 30px rgba(167, 139, 250, 0.4);
}

/* ===========================
   Border Animations
   =========================== */

.border-animate {
    position: relative;
    border: 2px solid var(--slate-700);
}

.border-animate::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(90deg, var(--cyan-400), var(--blue-600));
    border-radius: inherit;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.border-animate:hover::after {
    opacity: 0.2;
}

/* ===========================
   Stagger Animation Delays
   =========================== */

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ===========================
   Parallax Support
   =========================== */

.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ===========================
   Tooltip Styling
   =========================== */

[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--slate-900);
    color: var(--cyan-400);
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* ===========================
   Code Syntax Highlighting
   =========================== */

.code-keyword { color: #a78bfa; }
.code-string { color: #86efac; }
.code-comment { color: #64748b; }
.code-function { color: #06b6d4; }
.code-number { color: #fb923c; }

/* ===========================
   Performance Optimizations
   =========================== */

* {
    will-change: auto;
}

button, a {
    will-change: transform, box-shadow;
}

/* ===========================
   Print Optimization
   =========================== */

@page {
    margin: 2cm;
}

@media print {
    nav, footer, .cta-section {
        display: none;
    }
}