/* frontend/style.css */
/* DemoBox Global Stylesheet */

:root {
    --color-bg-primary: #05070f;
    --color-bg-secondary: #101b3f;
    --color-bg-aurora: #0f1d3d;
    --color-surface-glass: rgba(16, 23, 45, 0.55);
    --color-surface-hover: rgba(44, 61, 109, 0.6);
    --color-text-primary: #f3f6ff;
    --color-text-secondary: #9aa4c5;
    --color-text-tertiary: #6c7ca6;
    --color-accent-blue: #3a7bfd;
    --color-accent-purple: #6c4bff;
    --color-accent-cyan: #35ffd2;
    --color-accent-pink: #f472b6;
    --color-accent-mint: #31d3a4;
    --color-border-soft: rgba(118, 144, 255, 0.22);
    --shadow-card: 0 30px 80px rgba(5, 8, 22, 0.55);
    --shadow-soft: 0 16px 40px rgba(7, 14, 43, 0.35);
    --transition-base: 0.3s ease;
    --font-sans: 'Poppins', 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #f4f6f9;
    color: #333;
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
}

a {
    color: inherit;
}

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

/* --- Login Page (AI 科技风) --- */

.login-body {
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(76, 143, 255, 0.4), transparent 45%),
                radial-gradient(circle at 20% 80%, rgba(53, 255, 210, 0.25), transparent 55%),
                radial-gradient(circle at 90% 10%, rgba(134, 76, 255, 0.35), transparent 60%),
                linear-gradient(160deg, var(--color-bg-primary), var(--color-bg-secondary) 60%, #080a1d 100%);
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 24px;
    position: relative;
    overflow: hidden;
}

.background-aurora,
.orbital-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.background-aurora {
    background: radial-gradient(circle at 30% 20%, rgba(58, 123, 253, 0.32), transparent 55%),
                radial-gradient(circle at 70% 70%, rgba(53, 255, 210, 0.15), transparent 60%);
    filter: blur(90px);
    opacity: 0.55;
    animation: aurora-shift 26s ease-in-out infinite alternate;
    will-change: transform, opacity;
}

.orbital-overlay {
    background: conic-gradient(from 120deg at 20% 30%, rgba(58, 123, 253, 0.04), transparent),
                radial-gradient(circle at 75% 25%, rgba(140, 107, 255, 0.14), transparent 55%),
                url('public/login-bg.svg') center/cover no-repeat;
    opacity: 0.3;
    animation: orbital-flow 48s linear infinite;
    will-change: transform, opacity;
}

.landing-shell {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
    display: flex;
    gap: 48px;
    align-items: stretch;
    justify-content: space-between;
    padding: 32px;
    border-radius: 28px;
    background: rgba(9, 15, 42, 0.82);
    border: 1px solid rgba(120, 146, 255, 0.18);
    box-shadow: var(--shadow-card);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .landing-shell {
        background: linear-gradient(135deg, rgba(9, 15, 42, 0.85), rgba(10, 18, 46, 0.58));
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }
}

.hero-panel {
    flex: 1 1 55%;
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
    padding: 32px 36px;
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    border: 1px solid rgba(136, 164, 255, 0.12);
    background: linear-gradient(180deg, rgba(14, 24, 56, 0.75) 0%, rgba(9, 15, 35, 0.1) 100%);
    pointer-events: none;
    z-index: 0;
}

.brand-header,
.features-showcase,
.trust-metrics {
    position: relative;
    z-index: 1;
}

.brand-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.logo-mark {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    border-radius: 22px;
    background: radial-gradient(circle at top left, rgba(58, 123, 253, 0.85), rgba(108, 75, 255, 0.55) 65%, rgba(6, 9, 28, 0.95));
    border: 1px solid rgba(160, 188, 255, 0.25);
    box-shadow: 0 18px 40px rgba(31, 64, 181, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.logo-mark::after {
    content: "AI";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(245, 249, 255, 0.85);
    text-shadow: 0 0 12px rgba(99, 147, 255, 0.6);
}

.logo-mark img {
    opacity: 0.18;
    mix-blend-mode: screen;
    width: 140%;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.brand-kicker {
    font-size: 14px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(190, 204, 255, 0.6);
}

.brand-copy h1 {
    font-size: clamp(28px, 2.7vw, 40px);
    line-height: 1.16;
    font-weight: 700;
}

.brand-subtitle {
    color: var(--color-text-secondary);
    font-size: 16px;
    max-width: 520px;
}

.value-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.value-tags span {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(134, 160, 255, 0.28);
    background: linear-gradient(135deg, rgba(36, 48, 92, 0.9), rgba(16, 22, 48, 0.4));
    color: rgba(215, 224, 255, 0.85);
    font-size: 13px;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.value-tags span::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(58, 123, 253, 0.9), rgba(76, 255, 244, 0.8));
    box-shadow: 0 0 8px rgba(76, 255, 244, 0.65);
}

.hero-cta {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(58, 123, 253, 0.85), rgba(108, 75, 255, 0.7));
    box-shadow: 0 12px 30px rgba(40, 72, 185, 0.4);
    color: rgba(245, 248, 255, 0.92);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hero-cta::after {
    content: "→";
    font-size: 16px;
    transition: transform var(--transition-base);
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(44, 86, 220, 0.45);
}

.hero-cta:hover::after {
    transform: translateX(4px);
}

.features-showcase {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-tile {
    border-radius: 20px;
    padding: 22px;
    background: linear-gradient(160deg, rgba(20, 31, 70, 0.95), rgba(14, 20, 52, 0.65));
    border: 1px solid rgba(114, 149, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(180, 199, 255, 0.12);
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
    overflow: hidden;
}

.feature-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(58, 123, 253, 0.12), rgba(53, 255, 210, 0.08));
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.feature-tile:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(148, 176, 255, 0.55);
    box-shadow: var(--shadow-soft);
}

.feature-tile:hover::after {
    opacity: 1;
}

.feature-tile--cta {
    border: 1px solid rgba(140, 190, 255, 0.32);
    background: linear-gradient(160deg, rgba(27, 42, 98, 0.92), rgba(22, 32, 78, 0.7));
}

.feature-header--cta {
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.feature-icon--cta {
    font-size: 22px;
    font-weight: 600;
    color: rgba(245, 249, 255, 0.9);
    text-shadow: 0 0 8px rgba(96, 140, 255, 0.6);
}

.feature-badge--outline {
    background: rgba(24, 37, 84, 0.65);
    border: 1px solid rgba(120, 168, 255, 0.55);
    color: rgba(210, 222, 255, 0.85);
}

.feature-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: radial-gradient(circle at top, rgba(76, 255, 244, 0.32), rgba(58, 123, 253, 0.18));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0 8px 16px rgba(44, 104, 255, 0.28);
}

.feature-icon img {
    filter: drop-shadow(0 0 6px rgba(82, 154, 255, 0.4));
}

.feature-badge {
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: none;
    padding: 6px 10px;
    border-radius: 999px;
    color: rgba(8, 9, 18, 0.85);
    background: linear-gradient(135deg, #4cf7f4, #31d3a4);
    font-weight: 600;
}

.feature-badge--purple {
    background: linear-gradient(135deg, #9b6bff, #6c4bff);
    color: #f5f2ff;
}

.feature-badge--mint {
    background: linear-gradient(135deg, #3ef9d8, #2aa98f);
}

.feature-badge--pink {
    background: linear-gradient(135deg, #ff8ad8, #f472b6);
    color: #ffeefe;
}

.feature-badge--cyan {
    background: linear-gradient(135deg, #49e9ff, #3a7bfd);
    color: #06294a;
}

.feature-badge--blue {
    background: linear-gradient(135deg, #6fd3ff, #3a7bfd);
    color: #06294a;
}

.feature-tile h3 {
    font-size: 18px;
    font-weight: 600;
}

.feature-tile p {
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.feature-action {
    color: rgba(198, 212, 255, 0.9);
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    line-height: 1.5;
}

.feature-action::after {
    content: "→";
    font-size: 14px;
    transition: transform var(--transition-base);
}

.feature-action--cta {
    padding: 10px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(76, 255, 244, 0.18), rgba(58, 123, 253, 0.25));
    box-shadow: inset 0 1px 0 rgba(200, 236, 255, 0.2);
}

.feature-tile--cta:hover .feature-action--cta {
    background: linear-gradient(135deg, rgba(76, 255, 244, 0.28), rgba(58, 123, 253, 0.35));
}

.feature-tile:hover .feature-action::after {
    transform: translateX(4px);
}

.floating {
    animation: tile-float 6s ease-in-out infinite;
    will-change: transform;
}

.delay-1 { animation-delay: 0.6s; }
.delay-2 { animation-delay: 1.2s; }
.delay-3 { animation-delay: 1.8s; }
.delay-4 { animation-delay: 2.4s; }
.delay-5 { animation-delay: 3s; }

.trust-metrics {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.metric-card {
    flex: 1 1 160px;
    padding: 18px 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(24, 36, 75, 0.95), rgba(13, 19, 45, 0.55));
    border: 1px solid rgba(110, 140, 255, 0.22);
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: inset 0 1px 0 rgba(180, 199, 255, 0.12);
}

.metric-label {
    font-size: 14px;
    letter-spacing: 0.02em;
    line-height: 1.5;
    color: rgba(195, 206, 255, 0.75);
}

.metric-value {
    font-size: 22px;
    font-family: var(--font-mono);
    color: var(--color-text-primary);
}

.metric-value span {
    color: #4cf7f4;
}

.login-card {
    flex: 1 1 45%;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 32px 36px;
    background: rgba(16, 23, 45, 0.68);
    border-radius: 28px;
    border: 1px solid var(--color-border-soft);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: visible;
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .login-card {
        background: var(--color-surface-glass);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }
}

.login-card::after {
    content: "";
    position: absolute;
    inset: -40% -60% 65% 45%;
    background: radial-gradient(circle at center, rgba(58, 123, 253, 0.32), transparent 70%);
    opacity: 0.8;
    pointer-events: none;
    transform: rotate(12deg);
}

@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;
    }

    .background-aurora,
    .orbital-overlay,
    .floating {
        animation: none !important;
    }

    .background-aurora,
    .orbital-overlay {
        filter: blur(60px);
        opacity: 0.35;
    }
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.card-badge {
    align-self: flex-start;
    padding: 6px 12px;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: none;
    border-radius: 999px;
    border: 1px solid rgba(138, 166, 255, 0.4);
    background: rgba(34, 46, 92, 0.55);
    color: rgba(210, 218, 255, 0.75);
}

.card-header h2 {
    font-size: clamp(24px, 2.2vw, 32px);
    font-weight: 600;
}

.card-subtitle {
    color: var(--color-text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.card-benefits {
    list-style: none;
    display: grid;
    gap: 8px;
    padding-left: 0;
    color: rgba(203, 214, 255, 0.85);
    font-size: 14px;
}

.card-benefits li::before {
    content: "✔";
    margin-right: 8px;
    color: #4cf7f4;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    font-size: 14px;
    letter-spacing: 0.02em;
    text-transform: none;
    color: rgba(182, 196, 255, 0.78);
}

.input-field input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(128, 154, 255, 0.28);
    background: rgba(10, 16, 40, 0.75);
    color: var(--color-text-primary);
    font-size: 15px;
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.input-field input::placeholder {
    color: rgba(152, 166, 210, 0.6);
}

.input-field input:focus {
    outline: none;
    border-color: rgba(76, 255, 244, 0.6);
    box-shadow: 0 0 0 3px rgba(76, 255, 244, 0.18), 0 12px 24px rgba(34, 140, 255, 0.24);
    transform: translateY(-1px);
}

.form-extra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    line-height: 1.5;
}

.form-link {
    color: rgba(198, 212, 255, 0.85);
    text-decoration: none;
    position: relative;
}

.form-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(58, 123, 253, 0.6), rgba(108, 75, 255, 0.8));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.form-link:hover::after {
    transform: scaleX(1);
}

.primary-button {
    position: relative;
    overflow: hidden;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(90, 134, 255, 0.45);
    background: linear-gradient(135deg, rgba(58, 123, 253, 0.9), rgba(108, 75, 255, 0.85));
    color: #f8fbff;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 18px 42px rgba(58, 123, 253, 0.42);
}

.primary-button::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), transparent 55%);
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 52px rgba(58, 123, 253, 0.52);
}

.primary-button:hover::after {
    opacity: 1;
}

.primary-button:active {
    transform: translateY(0);
}

.primary-button.loading {
    pointer-events: none;
    opacity: 0.85;
}

.primary-button.loading::before {
    content: "";
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(248, 251, 255, 0.55);
    border-top-color: rgba(248, 251, 255, 0.9);
    animation: spin 0.8s linear infinite;
    display: inline-block;
    margin-right: 6px;
}

.primary-button.loading .button-label {
    opacity: 0.7;
}

.error-message {
    display: none;
    margin-top: -4px;
    font-size: 13px;
    color: #ff8ad8;
}

.error-message[style*="block"],
.error-message.show {
    display: block;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    position: relative;
    z-index: 1;
}

.quick-button {
    border-radius: 14px;
    padding: 12px;
    border: 1px solid rgba(124, 150, 255, 0.25);
    background: rgba(20, 28, 64, 0.65);
    color: rgba(212, 222, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
    transition: transform var(--transition-base), border-color var(--transition-base), background var(--transition-base);
}

.quick-button:hover {
    transform: translateY(-2px);
    border-color: rgba(148, 176, 255, 0.6);
    background: rgba(32, 46, 92, 0.8);
}

.quick-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 255, 244, 0.4);
}

.security-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 14px;
    color: rgba(190, 203, 255, 0.82);
    letter-spacing: 0.02em;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.security-item {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(22, 32, 76, 0.55);
    border: 1px solid rgba(110, 140, 255, 0.18);
}

.login-hint {
    font-size: 13px;
    color: var(--color-text-tertiary);
    position: relative;
    z-index: 1;
}

/* --- Dashboard & General Layout --- */

.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

header h1 {
    font-size: 28px;
}

/* --- Feature Cards (内页) --- */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.feature-card h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 18px;
}

.feature-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
}

.feature-link {
    display: inline-block;
    padding: 10px 22px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.2s;
    align-self: flex-start;
}

.feature-link:hover {
    background: #218838;
}

/* --- Feature Page Specifics --- */

.feature-container {
    max-width: 900px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.feature-container textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 16px;
    min-height: 120px;
}

.feature-container button {
    padding: 12px 25px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.result-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    min-height: 100px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

footer {
    margin-top: 40px;
    text-align: center;
}

footer a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

/* --- Responsive Adjustments for Login Page --- */

@media (max-width: 1080px) {
    .landing-shell {
        flex-direction: column;
        padding: 28px;
    }

    .hero-panel,
    .login-card {
        flex: 1 1 auto;
    }

    .features-showcase {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .quick-actions {
        grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    }
}

@media (max-width: 768px) {
    .login-body {
        padding: 32px 18px;
    }

    .landing-shell {
        padding: 24px;
        gap: 28px;
    }

    .hero-panel {
        gap: 24px;
    }

    .brand-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .features-showcase {
        grid-template-columns: 1fr;
    }

    .trust-metrics {
        gap: 12px;
    }

    .login-card {
        padding: 28px;
    }

    .quick-actions {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 600px) {
    .features-showcase,
    .quick-actions {
        grid-template-columns: 1fr;
    }

    .form-extra {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .security-badges {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .landing-shell {
        padding: 20px 18px;
        border-radius: 24px;
    }

    .hero-panel::before {
        border-radius: 20px;
    }

    .login-card {
        border-radius: 22px;
    }
}

/* --- Animations --- */

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

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

@keyframes aurora-shift {
    0% {
        transform: translate3d(-2%, -3%, 0) scale(1.02);
    }
    100% {
        transform: translate3d(3%, 4%, 0) scale(1.05);
    }
}

@keyframes orbital-flow {
    0% {
        transform: rotate(0deg) scale(1.02);
    }
    100% {
        transform: rotate(1turn) scale(1.02);
    }
}


/* --- System Diagnostics Page --- */

body.diagnostics-body {
    min-height: 100vh;
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-text-primary);
    background: radial-gradient(circle at 12% 18%, rgba(58, 123, 253, 0.3), transparent 55%),
                radial-gradient(circle at 88% 22%, rgba(108, 75, 255, 0.24), transparent 60%),
                radial-gradient(circle at 52% 78%, rgba(53, 255, 210, 0.16), transparent 65%),
                linear-gradient(165deg, var(--color-bg-primary), #050816 52%, #03040c 100%);
    position: relative;
    overflow-x: hidden;
    padding: 72px 24px 96px;
}

body.diagnostics-body .background-aurora,
body.diagnostics-body .orbital-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
    filter: blur(60px);
}

body.diagnostics-body .background-aurora {
    background: radial-gradient(circle at 28% 22%, rgba(58, 123, 253, 0.28), transparent 58%),
                radial-gradient(circle at 74% 68%, rgba(53, 255, 210, 0.18), transparent 62%),
                linear-gradient(180deg, rgba(10, 16, 36, 0.75), rgba(9, 14, 32, 0.2));
}

body.diagnostics-body .orbital-overlay {
    mix-blend-mode: screen;
    background: radial-gradient(circle at 20% 34%, rgba(108, 75, 255, 0.22), transparent 60%),
                radial-gradient(circle at 80% 26%, rgba(53, 160, 255, 0.2), transparent 58%),
                linear-gradient(140deg, rgba(6, 10, 24, 0.5), rgba(4, 6, 15, 0.1));
}

body.diagnostics-body a {
    color: inherit;
}

.diagnostics-shell {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.glass-panel {
    background: linear-gradient(140deg, rgba(15, 21, 42, 0.88), rgba(10, 16, 36, 0.72));
    border: 1px solid rgba(120, 146, 255, 0.22);
    border-radius: 26px;
    box-shadow: 0 26px 80px rgba(6, 10, 28, 0.55);
    backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(150deg, rgba(58, 123, 253, 0.16), transparent 45%),
                linear-gradient(320deg, rgba(53, 255, 210, 0.12), transparent 55%);
    opacity: 0.7;
    pointer-events: none;
}

.diagnostics-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    padding: 36px 40px;
}

.diagnostics-header > * {
    position: relative;
    z-index: 1;
}

.diagnostics-intro {
    max-width: 620px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.diagnostics-eyebrow {
    letter-spacing: 0.38em;
    text-transform: uppercase;
    font-size: 13px;
    color: rgba(203, 214, 255, 0.65);
}

.diagnostics-subtitle {
    color: var(--color-text-secondary);
    font-size: 16px;
    line-height: 1.7;
}

.diagnostics-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(58, 123, 253, 0.12);
    border: 1px solid rgba(92, 140, 255, 0.3);
    color: rgba(214, 224, 255, 0.8);
    font-size: 13px;
}

.meta-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent-cyan);
    box-shadow: 0 0 8px rgba(53, 255, 210, 0.8);
}

.diagnostics-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    min-width: 220px;
}

.primary-action,
.ghost-action {
    width: 100%;
    border-radius: 18px;
    padding: 13px 18px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

.primary-action {
    background: linear-gradient(135deg, rgba(58, 123, 253, 0.92), rgba(108, 75, 255, 0.88));
    border-color: rgba(92, 140, 255, 0.4);
    color: #f4f7ff;
    box-shadow: 0 20px 50px rgba(58, 123, 253, 0.35);
}

.primary-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 60px rgba(58, 123, 253, 0.45);
}

.ghost-action {
    background: rgba(22, 32, 58, 0.55);
    border-color: rgba(66, 82, 136, 0.35);
    color: rgba(210, 222, 255, 0.85);
}

.ghost-action:hover {
    transform: translateY(-2px);
    background: rgba(28, 42, 74, 0.62);
}

.last-run {
    font-size: 13px;
    color: rgba(198, 210, 255, 0.7);
}

.last-run.running {
    color: rgba(244, 214, 128, 0.9);
}

.status-legend {
    padding: 30px 36px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.status-legend h2 {
    font-size: 20px;
}

.status-legend p {
    color: rgba(198, 210, 255, 0.78);
    font-size: 15px;
}

.legend-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.diagnostics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.diagnostics-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 32px 34px;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.section-heading h2 {
    font-size: 22px;
}

.section-subtitle {
    color: rgba(198, 210, 255, 0.75);
    font-size: 14px;
    margin-top: 6px;
    line-height: 1.7;
}

.section-meta {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(24, 34, 66, 0.6);
    border: 1px solid rgba(96, 122, 210, 0.35);
    color: rgba(204, 214, 255, 0.85);
    font-size: 13px;
    height: fit-content;
}

.test-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.test-item {
    background: rgba(15, 22, 46, 0.7);
    border: 1px solid rgba(96, 122, 210, 0.28);
    border-radius: 18px;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

.test-item:hover {
    border-color: rgba(116, 148, 255, 0.6);
    box-shadow: 0 18px 46px rgba(12, 20, 48, 0.4);
    transform: translateY(-2px);
}

.test-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.test-name {
    font-weight: 600;
    color: rgba(230, 236, 255, 0.95);
}

.test-status {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.status-success {
    background: rgba(49, 211, 164, 0.18);
    color: #52f5c8;
    border: 1px solid rgba(49, 211, 164, 0.38);
}

.status-error {
    background: rgba(255, 99, 132, 0.16);
    color: #ff9ba8;
    border: 1px solid rgba(255, 99, 132, 0.36);
}

.status-running {
    background: rgba(253, 213, 89, 0.18);
    color: #ffd369;
    border: 1px solid rgba(253, 213, 89, 0.4);
}

.status-pending {
    background: rgba(130, 162, 255, 0.18);
    color: #a9c3ff;
    border: 1px solid rgba(130, 162, 255, 0.36);
}

.latency-chip {
    font-size: 12px;
    color: rgba(189, 202, 255, 0.82);
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(28, 40, 72, 0.7);
    border: 1px solid rgba(92, 120, 210, 0.28);
}

.response-toggle {
    background: rgba(30, 44, 80, 0.6);
    color: rgba(204, 218, 255, 0.85);
    border: 1px solid rgba(92, 120, 210, 0.35);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-base), transform var(--transition-base);
}

.response-toggle:hover {
    background: rgba(44, 62, 110, 0.72);
    transform: translateY(-1px);
}

.test-response {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    background: rgba(11, 17, 34, 0.75);
    border: 1px solid rgba(74, 102, 180, 0.35);
    border-radius: 14px;
    padding: 16px;
    color: rgba(198, 210, 255, 0.88);
    max-height: 260px;
    overflow: auto;
    white-space: pre-wrap;
}

@media (max-width: 768px) {
    body.diagnostics-body {
        padding: 56px 18px 80px;
    }

    .diagnostics-header {
        padding: 28px 26px;
    }

    .diagnostics-actions {
        width: 100%;
        align-items: stretch;
    }

    .primary-action,
    .ghost-action {
        width: 100%;
    }

    .diagnostics-section {
        padding: 26px 24px;
    }

    .test-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .test-status {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .primary-action,
    .ghost-action,
    .response-toggle,
    .test-item {
        transition: none;
    }
}
