/* ===========================
   M.S.WebFusion — Design System 2026
   =========================== */

:root {
    /* Base */
    --msw-bg-primary: #0a0e27;
    --msw-bg-secondary: #0f1438;
    --msw-bg-tertiary: #141a45;
    --msw-bg-surface: #1a2150;

    /* Accent */
    --msw-cyan: #00d4ff;
    --msw-cyan-light: #5ce1ff;
    --msw-cyan-dark: #0098b8;
    --msw-cyan-glow: rgba(0, 212, 255, 0.15);
    --msw-cyan-muted: rgba(0, 212, 255, 0.08);

    /* Text */
    --msw-text-primary: #f0f4ff;
    --msw-text-secondary: #8892b0;
    --msw-text-muted: #5a6380;

    /* Secondary accents */
    --msw-gold: #f0b429;
    --msw-coral: #ff6b6b;

    /* Gradients */
    --msw-gradient-hero: linear-gradient(135deg, #0a0e27 0%, #0f1438 40%, #141a45 100%);
    --msw-gradient-accent: linear-gradient(135deg, #00d4ff 0%, #0098b8 100%);
    --msw-gradient-gold: linear-gradient(135deg, #f0b429 0%, #e08a1e 100%);
    --msw-gradient-glow: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.12) 0%, transparent 70%);
    --msw-gradient-card: linear-gradient(135deg, rgba(0, 212, 255, 0.06) 0%, rgba(0, 212, 255, 0.02) 100%);

    /* Glass */
    --msw-glass-bg: rgba(15, 20, 56, 0.6);
    --msw-glass-border: rgba(0, 212, 255, 0.1);
    --msw-glass-blur: blur(20px);

    /* Shadows */
    --msw-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --msw-shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
    --msw-shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
    --msw-shadow-glow: 0 0 30px rgba(0, 212, 255, 0.15);

    /* Spacing */
    --msw-section-padding: clamp(5rem, 10vw, 10rem);
    --msw-container-max: 1280px;
    --msw-container-wide: 1440px;

    /* Transitions */
    --msw-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --msw-transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --msw-transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Radius */
    --msw-radius-sm: 8px;
    --msw-radius-md: 12px;
    --msw-radius-lg: 20px;
    --msw-radius-xl: 32px;

    /* Fonts */
    --msw-font-display: 'Space Grotesk', system-ui, sans-serif;
    --msw-font-body: 'Inter', system-ui, sans-serif;
    --msw-font-mono: 'JetBrains Mono', monospace;
}

/* Light mode — warm premium design */
[data-theme="light"] {
    /* Fond legèrement teinte bleu-gris, pas blanc pur */
    --msw-bg-primary: #f0f4f8;
    --msw-bg-secondary: #e8edf4;
    --msw-bg-tertiary: #dce3ed;
    --msw-bg-surface: #ffffff;

    /* Cyan plus profond pour contraste sur fond clair */
    --msw-cyan: #0077b6;
    --msw-cyan-light: #0096d1;
    --msw-cyan-dark: #005a8c;
    --msw-cyan-glow: rgba(0, 119, 182, 0.12);
    --msw-cyan-muted: rgba(0, 119, 182, 0.06);

    /* Texte : gris charbon, pas noir pur */
    --msw-text-primary: #1b2a4a;
    --msw-text-secondary: #475569;
    --msw-text-muted: #94a3b8;

    /* Accents */
    --msw-gold: #d97706;
    --msw-coral: #dc2626;

    /* Gradients riches */
    --msw-gradient-hero: linear-gradient(135deg, #f0f4f8 0%, #e0e7f1 30%, #d1dce8 70%, #e8edf4 100%);
    --msw-gradient-accent: linear-gradient(135deg, #0077b6 0%, #0096d1 100%);
    --msw-gradient-card: linear-gradient(135deg, rgba(0, 119, 182, 0.04) 0%, rgba(255, 255, 255, 0.8) 100%);
    --msw-gradient-glow: radial-gradient(ellipse at center, rgba(0, 119, 182, 0.06) 0%, transparent 70%);

    /* Glass — blanc legerement bleuté */
    --msw-glass-bg: rgba(255, 255, 255, 0.65);
    --msw-glass-border: rgba(0, 119, 182, 0.12);
    --msw-glass-blur: blur(20px);

    /* Ombres plus prononcees pour la profondeur */
    --msw-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --msw-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    --msw-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
    --msw-shadow-glow: 0 0 24px rgba(0, 119, 182, 0.1);
}

/* Light mode specific overrides */
[data-theme="light"] .hero-grid {
    background-image:
        linear-gradient(rgba(0, 119, 182, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 119, 182, 0.04) 1px, transparent 1px);
}

[data-theme="light"] .hero-glow {
    background: radial-gradient(circle, rgba(0, 119, 182, 0.06) 0%, transparent 70%);
}

[data-theme="light"] .hero-glow-2 {
    background: radial-gradient(circle, rgba(217, 119, 6, 0.04) 0%, transparent 70%);
}

[data-theme="light"] .hero-code-window {
    background: rgba(27, 42, 74, 0.95);
    border-color: rgba(0, 119, 182, 0.2);
}

[data-theme="light"] .msw-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 119, 182, 0.08);
    box-shadow: var(--msw-shadow-sm);
}

[data-theme="light"] .msw-card:hover {
    box-shadow: var(--msw-shadow-md), 0 0 20px rgba(0, 119, 182, 0.08);
    border-color: rgba(0, 119, 182, 0.15);
}

[data-theme="light"] .msw-glass {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: var(--msw-shadow-sm);
}

[data-theme="light"] .msw-input {
    background: #ffffff;
    border-color: #cbd5e1;
}

[data-theme="light"] .msw-input:focus {
    background: #ffffff;
    border-color: var(--msw-cyan);
}

[data-theme="light"] .service-icon {
    background: rgba(0, 119, 182, 0.08);
    border-color: rgba(0, 119, 182, 0.1);
}

[data-theme="light"] .tech-tag {
    background: rgba(0, 119, 182, 0.08);
    color: var(--msw-cyan-dark);
}

[data-theme="light"] .review-avatar {
    background: var(--msw-gradient-accent);
}

[data-theme="light"] .cta-glow {
    background: radial-gradient(ellipse, rgba(0, 119, 182, 0.06) 0%, transparent 70%);
}

[data-theme="light"] .footer-glow {
    background: radial-gradient(ellipse, rgba(0, 119, 182, 0.04) 0%, transparent 70%);
}

[data-theme="light"] .msw-header.scrolled {
    background: rgba(240, 244, 248, 0.85);
    border-bottom-color: rgba(0, 119, 182, 0.08);
}

[data-theme="light"] .admin-table th {
    color: var(--msw-text-secondary);
    border-bottom-color: #cbd5e1;
}

[data-theme="light"] .admin-table td {
    border-bottom-color: #e2e8f0;
}

[data-theme="light"] .admin-sidebar {
    background: #e8edf4;
    border-right-color: #cbd5e1;
}

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

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

body {
    font-family: var(--msw-font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--msw-text-primary);
    background: var(--msw-bg-primary);
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--msw-font-display);
    line-height: 1.2;
    color: var(--msw-text-primary);
}

h1 { font-size: clamp(2.75rem, 6vw, 5rem); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: clamp(2.25rem, 4.5vw, 3.75rem); font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; }
h4 { font-size: clamp(1.125rem, 2vw, 1.5rem); font-weight: 500; }

a {
    color: var(--msw-cyan);
    text-decoration: none;
    transition: color var(--msw-transition-fast);
}

a:hover {
    color: var(--msw-cyan-light);
}

::selection {
    background: var(--msw-cyan);
    color: var(--msw-bg-primary);
}

::-moz-selection {
    background: var(--msw-cyan);
    color: var(--msw-bg-primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* Utility classes */
.msw-container {
    max-width: var(--msw-container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.msw-section {
    padding: var(--msw-section-padding) 0;
    position: relative;
}

.msw-section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.msw-section-header h2 {
    margin-bottom: 1rem;
}

.msw-section-header p {
    color: var(--msw-text-secondary);
    font-size: 1.125rem;
    max-width: 640px;
    margin: 0 auto;
}

.msw-label {
    display: inline-block;
    font-family: var(--msw-font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--msw-cyan);
    margin-bottom: 0.75rem;
}

.msw-gradient-text {
    background: linear-gradient(135deg, var(--msw-cyan), var(--msw-cyan-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.msw-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    font-family: var(--msw-font-body);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--msw-radius-sm);
    cursor: pointer;
    transition: all var(--msw-transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.msw-btn-primary {
    background: var(--msw-gradient-accent);
    color: white;
}

.msw-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
    color: white;
}

.msw-btn-outline {
    background: transparent;
    color: var(--msw-cyan);
    border: 1px solid var(--msw-cyan);
}

.msw-btn-outline:hover {
    background: var(--msw-cyan-muted);
    transform: translateY(-2px);
}

.msw-btn-ghost {
    background: transparent;
    color: var(--msw-cyan);
    padding: 0.5rem 0;
}

.msw-btn-ghost:hover {
    color: var(--msw-cyan-light);
}

.msw-btn-ghost::after {
    content: ' \2192';
    transition: transform var(--msw-transition-fast);
}

.msw-btn-ghost:hover::after {
    transform: translateX(4px);
}

/* Cards */
.msw-card {
    background: var(--msw-gradient-card);
    border: 1px solid var(--msw-glass-border);
    border-radius: var(--msw-radius-lg);
    padding: 2rem;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.3s ease,
                box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.msw-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 212, 255, 0.25);
    box-shadow: var(--msw-shadow-md), var(--msw-shadow-glow), inset 0 1px 0 rgba(0, 212, 255, 0.08);
}

/* Glass card */
.msw-glass {
    background: var(--msw-glass-bg);
    backdrop-filter: var(--msw-glass-blur);
    -webkit-backdrop-filter: var(--msw-glass-blur);
    border: 1px solid var(--msw-glass-border);
    border-radius: var(--msw-radius-lg);
}

/* Scroll animations */
.msw-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.msw-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.msw-reveal-delay-1 { transition-delay: 0.1s; }
.msw-reveal-delay-2 { transition-delay: 0.2s; }
.msw-reveal-delay-3 { transition-delay: 0.3s; }
.msw-reveal-delay-4 { transition-delay: 0.4s; }

/* Elements that slide in from left or right */
.fx-slide {
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Stagger delay based on --i variable */
.fx-slide[style*="--i:0"] { transition-delay: 0s; }
.fx-slide[style*="--i:1"] { transition-delay: 0.08s; }
.fx-slide[style*="--i:2"] { transition-delay: 0.16s; }
.fx-slide[style*="--i:3"] { transition-delay: 0.24s; }
.fx-slide[style*="--i:4"] { transition-delay: 0.32s; }

.fx-slide.fx-from-left {
    opacity: 0;
    transform: translateX(-100px);
}

.fx-slide.fx-from-right {
    opacity: 0;
    transform: translateX(100px);
}

.fx-slide.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Page hero fade-in */
.page-hero {
    animation: fadeInDown 0.6s ease-out;
}

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

/* Glow breathing animation */
@keyframes glowFloat {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) translate(15px, -10px) scale(1.1); opacity: 0.7; }
}

/* Pulse animation for placeholders */
@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.5; }
}

/* Code window breathing glow */
@keyframes codePulse {
    0%, 100% { box-shadow: var(--msw-shadow-lg), 0 0 30px rgba(0, 212, 255, 0.1); }
    50% { box-shadow: var(--msw-shadow-lg), 0 0 50px rgba(0, 212, 255, 0.2); }
}

/* Grid system */
.msw-grid {
    display: grid;
    gap: 2rem;
}

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

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

@media (max-width: 640px) {
    .msw-grid-4, .msw-grid-3, .msw-grid-2 {
        grid-template-columns: 1fr;
    }

    .msw-container {
        padding: 0 1rem;
    }
}

/* Form elements */
.msw-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--msw-bg-surface);
    border: 1px solid var(--msw-glass-border);
    border-radius: var(--msw-radius-sm);
    color: var(--msw-text-primary);
    font-family: var(--msw-font-body);
    font-size: 0.9rem;
    transition: border-color var(--msw-transition-fast);
    outline: none;
}

.msw-input:focus {
    border-color: var(--msw-cyan);
    box-shadow: 0 0 0 3px var(--msw-cyan-glow), 0 0 20px rgba(0, 212, 255, 0.06);
    background: var(--msw-bg-tertiary);
}

.msw-input::placeholder {
    color: var(--msw-text-muted);
}

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

/* Constellation progress ring (global — CSS isolation breaks SVG animation) */
.cst-progress-ring {
    position: absolute;
    inset: -6px;
    width: calc(100% + 12px);
    height: calc(100% + 12px);
    transform: rotate(-90deg);
    pointer-events: none;
    z-index: 2;
}

.cst-progress-ring circle {
    fill: none;
    stroke: var(--msw-cyan);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    filter: drop-shadow(0 0 4px rgba(0, 212, 255, 0.8)) drop-shadow(0 0 10px rgba(0, 212, 255, 0.4));
}

.cst-node.active .cst-progress-ring circle {
    animation: ringFill 5s linear forwards;
}

@keyframes ringFill {
    from { stroke-dashoffset: 220; }
    to { stroke-dashoffset: 0; }
}

/* Inner fill — liquid rising from bottom */
.cst-node-dot::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -2px;
    right: -2px;
    height: 0%;
    background: linear-gradient(0deg, rgba(0,212,255,0.7) 0%, rgba(0,212,255,0.2) 100%);
    border-radius: 0 0 50% 50%;
    z-index: 0;
}

.cst-node.active .cst-node-dot::after {
    animation: liquidFill 5s linear forwards;
}

@keyframes liquidFill {
    0% { height: 0%; border-radius: 0 0 50% 50%; }
    50% { border-radius: 40%; }
    100% { height: 100%; border-radius: 50%; }
}

/* ===========================
   Planet 3D Sphere Effect
   =========================== */
.hx-planet {
    background: #0a0e27 !important;
    border: none !important;
    box-shadow:
        /* Ombre portee — donne du volume */
        6px 8px 20px rgba(0, 0, 0, 0.6),
        /* Lueur externe subtile */
        0 0 15px rgba(0, 212, 255, 0.06) !important;
}

/* Image du projet — remplit la sphere */
.hx-planet img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Eclairage 3D — lumiere en haut-gauche, ombre en bas-droite */
.hx-planet::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        /* Reflet lumineux fort */
        radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.35) 0%, transparent 35%),
        /* Zone sombre large en bas-droite */
        radial-gradient(circle at 75% 80%, rgba(0, 0, 0, 0.7) 0%, transparent 50%),
        /* Assombrissement general des bords */
        radial-gradient(circle at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Atmosphere glow — anneau lumineux */
.hx-planet::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 212, 255, 0.1);
    box-shadow:
        0 0 8px rgba(0, 212, 255, 0.06),
        inset 0 0 6px rgba(0, 212, 255, 0.03);
    pointer-events: none;
}

.hx-planet.focused::after {
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow:
        0 0 30px rgba(0, 212, 255, 0.25),
        0 0 60px rgba(0, 212, 255, 0.1),
        inset 0 0 10px rgba(0, 212, 255, 0.05);
}

/* Nom masque */
.hx-planet-name {
    display: none !important;
}

/* ===========================
   Space Hero — shared across all pages
   =========================== */
.space-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2rem;
    background: #060918;
}

.space-hero canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.space-hero-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
    animation: spaceHeroFadeUp 0.8s ease-out;
}

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

.space-hero-inner h1 {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.space-hero-inner p {
    color: var(--msw-text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Force transparent on EVERYTHING inside hero — no white box */
.space-hero-inner h1,
.space-hero-inner h1 *,
.space-hero-inner p,
.space-hero-inner span {
    background: transparent !important;
    background-color: transparent !important;
    -webkit-tap-highlight-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Gradient text — cyan only, no background-clip */
.hx-gradient-text {
    color: #00d4ff !important;
    -webkit-text-fill-color: #00d4ff !important;
}

/* Typing text — kill every possible white box on Android */
.hx-title,
.hx-title *,
h1.hx-title,
.hx-typing-line,
.typing-text,
.hx-cursor {
    background: transparent !important;
    background-color: transparent !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-appearance: none !important;
    -webkit-text-stroke: 0 !important;
    paint-order: stroke fill;
}

.typing-text {
    color: #00d4ff !important;
    -webkit-text-fill-color: #00d4ff !important;
}

.hx-cursor {
    color: #00d4ff !important;
    -webkit-text-fill-color: #00d4ff !important;
    animation: cursorBlink 0.7s step-end infinite;
}

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

/* Cursor glow — follows mouse on desktop */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    top: 0;
    left: 0;
    will-change: transform;
    transition: opacity 0.3s;
}

[data-theme="light"] .cursor-glow {
    background: radial-gradient(circle, rgba(0, 119, 182, 0.04) 0%, transparent 70%);
}

/* ===========================
   Custom Cursor — dot + ring
   =========================== */
.custom-cursor-dot,
.custom-cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    will-change: transform;
    transition: opacity 0.3s ease;
}

/* Small dot — precise position */
.custom-cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--msw-cyan);
    box-shadow:
        0 0 6px  rgba(0, 212, 255, 0.9),
        0 0 14px rgba(0, 212, 255, 0.5);
    margin: -3px 0 0 -3px;
    transition: transform 0.1s ease, opacity 0.3s ease, background 0.2s ease;
}

/* Large ring — lags slightly behind (set via JS) */
.custom-cursor-ring {
    width: 38px;
    height: 38px;
    border: 1.5px solid rgba(0, 212, 255, 0.5);
    margin: -19px 0 0 -19px;
    background: transparent;
    box-shadow:
        0 0 10px rgba(0, 212, 255, 0.15),
        inset 0 0 8px rgba(0, 212, 255, 0.05);
    transition: transform 0.08s linear, width 0.25s ease, height 0.25s ease,
                margin 0.25s ease, border-color 0.25s ease, opacity 0.3s ease;
}

/* Expand ring on hover over interactive elements */
body.cursor-hover .custom-cursor-ring {
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    border-color: rgba(0, 212, 255, 0.7);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.25), inset 0 0 14px rgba(0, 212, 255, 0.08);
}

body.cursor-hover .custom-cursor-dot {
    transform: scale(1.8);
    background: var(--msw-cyan-light);
}

/* Hide custom cursor on touch devices */
@media (hover: none) {
    .custom-cursor-dot,
    .custom-cursor-ring {
        display: none;
    }
}

[data-theme="light"] .custom-cursor-dot {
    background: var(--msw-cyan);
    box-shadow: 0 0 6px rgba(0, 119, 182, 0.7), 0 0 14px rgba(0, 119, 182, 0.3);
}

[data-theme="light"] .custom-cursor-ring {
    border-color: rgba(0, 119, 182, 0.4);
}

/* ===========================
   Section Dividers
   =========================== */
.section-divider {
    position: relative;
    height: 1px;
    width: 100%;
    overflow: visible;
    margin: 0;
}

.section-divider::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 212, 255, 0.08) 15%,
        rgba(0, 212, 255, 0.25) 35%,
        rgba(0, 212, 255, 0.4) 50%,
        rgba(0, 212, 255, 0.25) 65%,
        rgba(0, 212, 255, 0.08) 85%,
        transparent 100%
    );
}

/* Optional glowing dot in center */
.section-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--msw-cyan);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.8), 0 0 25px rgba(0, 212, 255, 0.4);
}

[data-theme="light"] .section-divider::before {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 119, 182, 0.06) 15%,
        rgba(0, 119, 182, 0.18) 35%,
        rgba(0, 119, 182, 0.3) 50%,
        rgba(0, 119, 182, 0.18) 65%,
        rgba(0, 119, 182, 0.06) 85%,
        transparent 100%
    );
}

[data-theme="light"] .section-divider::after {
    background: var(--msw-cyan);
    box-shadow: 0 0 8px rgba(0, 119, 182, 0.5);
}

/* ===========================
   CRT Scan Lines overlay
   =========================== */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99998;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.018) 2px,
        rgba(0, 0, 0, 0.018) 4px
    );
    /* Very subtle — just enough for texture without being distracting */
    opacity: 1;
}

[data-theme="light"] body::after {
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.008) 2px,
        rgba(0, 0, 0, 0.008) 4px
    );
}

@media (prefers-reduced-motion: reduce) {
    body::after { display: none; }
}

/* ===========================
   Gradient border animation keyframes
   (shared — used by home panels etc.)
   =========================== */
@property --gradient-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

@keyframes borderSpin {
    to { --gradient-angle: 360deg; }
}

/* Hover glow — all interactive elements */
a:not(.msw-btn):hover,
button:not(.msw-btn):hover {
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.35);
}

.msw-btn:hover,
button.msw-btn:hover {
    outline: none;
}

.msw-btn:focus-visible {
    outline: 2px solid var(--msw-cyan);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.15);
}

/* Global hover glow on interactive elements in dark mode */
[data-theme="dark"] a:not([class]):hover {
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

/* Neon border on hover */
.neon-border {
    position: relative;
}

.neon-border::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--msw-cyan), transparent, var(--msw-gold));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.neon-border:hover::after {
    opacity: 1;
}

/* Blazor specific */
#blazor-error-ui {
    display: none;
}

.valid.modified:not([type=checkbox]) {
    outline: none;
}

.invalid {
    outline: none;
    border-color: var(--msw-coral) !important;
}

.validation-message {
    color: var(--msw-coral);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* ===========================
   Admin Styles
   =========================== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h1 { margin: 0; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--msw-glass-border);
    color: var(--msw-text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--msw-glass-border);
    vertical-align: middle;
    transition: background 0.2s ease;
}

.admin-table tbody tr:hover td {
    background: var(--msw-cyan-muted);
}

.admin-table tr.unread td {
    background: var(--msw-cyan-muted);
    font-weight: 500;
}

.admin-table .actions {
    display: flex;
    gap: 0.5rem;
}

.admin-thumb {
    width: 48px;
    height: 36px;
    object-fit: contain;
    border-radius: 4px;
    background: var(--msw-bg-tertiary);
}

.tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    background: var(--msw-cyan-muted);
    color: var(--msw-cyan);
    border-radius: 4px;
    font-family: var(--msw-font-mono);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.btn-danger {
    background: var(--msw-coral);
    color: white;
    border: none;
}

.btn-danger:hover {
    opacity: 0.9;
}

.admin-form {
    max-width: 800px;
}

.admin-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.admin-form .form-group {
    margin-bottom: 1.25rem;
}

.admin-form .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--msw-text-secondary);
    margin-bottom: 0.5rem;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1.5rem;
}

.save-success {
    color: var(--msw-cyan);
    font-size: 0.85rem;
}

.settings-section {
    margin-bottom: 3rem;
    max-width: 600px;
}

.settings-section h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.settings-desc {
    color: var(--msw-text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.detail-row td {
    background: var(--msw-bg-surface);
}

.message-detail { padding: 1rem 0; }
.message-detail p { margin-bottom: 0.5rem; color: var(--msw-text-secondary); font-size: 0.9rem; }
.message-body {
    background: var(--msw-bg-tertiary);
    padding: 1rem;
    border-radius: var(--msw-radius-sm);
    white-space: pre-wrap;
    font-size: 0.9rem;
    color: var(--msw-text-primary);
    margin-top: 0.5rem;
}

.confirm-delete {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--msw-coral);
    font-weight: 500;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--msw-glass-border);
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--msw-text-secondary);
    font-family: var(--msw-font-mono);
}

@media (max-width: 768px) {
    .admin-form .form-row { grid-template-columns: 1fr; }
    .admin-table { font-size: 0.8rem; }
    .admin-table .actions { flex-direction: column; }
}

/* ===========================
   Contact page
   =========================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--msw-text-secondary);
    margin-bottom: 0.5rem;
}

.form-error { color: var(--msw-coral); font-size: 0.85rem; margin-top: 1rem; }

.success-message { text-align: center; padding: 3rem 2rem; }
.success-message svg { margin-bottom: 1.5rem; }
.success-message h3 { margin-bottom: 0.75rem; }
.success-message p { color: var(--msw-text-secondary); }

.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }

.contact-card { padding: 2rem; }
.contact-card h3 { font-size: 1.125rem; margin-bottom: 1.5rem; }
.contact-card p { color: var(--msw-text-secondary); font-size: 0.9rem; line-height: 1.6; margin-bottom: 0.5rem; }

.contact-item { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.contact-item strong { display: block; font-size: 0.85rem; margin-bottom: 0.25rem; }
.contact-item p, .contact-item a { color: var(--msw-text-secondary); font-size: 0.9rem; line-height: 1.5; }

@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}

/* ===========================
   Legal pages
   =========================== */
.legal-content { background: var(--msw-bg-primary); }

.legal-body { max-width: 800px; margin: 0 auto; }
.legal-body h2 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--msw-glass-border); }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p { color: var(--msw-text-secondary); line-height: 1.8; margin-bottom: 1rem; }
.legal-body ul { margin-bottom: 1rem; padding-left: 1.5rem; }
.legal-body li { color: var(--msw-text-secondary); line-height: 1.8; list-style: disc; margin-bottom: 0.25rem; }

/* ===========================
   Print products page
   =========================== */
.print-categories { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 4rem; }
.print-category-card { text-align: center; padding: 2rem 1.5rem; }
.print-cat-icon { width: 56px; height: 56px; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; background: var(--msw-cyan-muted); border-radius: var(--msw-radius-md); }
.print-category-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.print-category-card p { font-size: 0.85rem; color: var(--msw-text-secondary); }

.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.product-card { padding: 0; overflow: hidden; }
.product-image { aspect-ratio: 16 / 9; background: var(--msw-bg-tertiary); display: flex; align-items: center; justify-content: center; }
.product-placeholder { opacity: 0.3; }
.product-info { padding: 1.5rem; }
.product-info h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.product-info p { color: var(--msw-text-secondary); font-size: 0.85rem; line-height: 1.6; margin-bottom: 1rem; }
.product-formats { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.format-tag { font-size: 0.7rem; padding: 0.2rem 0.6rem; background: var(--msw-cyan-muted); color: var(--msw-cyan); border-radius: 4px; font-family: var(--msw-font-mono); }
.product-price { font-size: 0.95rem; color: var(--msw-text-secondary); margin-bottom: 1.25rem; }
.product-price strong { font-size: 1.25rem; color: var(--msw-cyan); }
.print-partner { margin-top: 3rem; text-align: center; }
.partner-card { padding: 2rem; max-width: 500px; margin: 0 auto; }
.partner-card p { font-size: 1rem; margin-bottom: 0.5rem; }
.partner-card span { color: var(--msw-text-muted); font-size: 0.85rem; }

@media (max-width: 640px) {
    .products-grid { grid-template-columns: 1fr; }
    .print-categories { grid-template-columns: repeat(2, 1fr); }
}
