/* ═══════════════════════════════════════════════════
   HeartCare AI — Premium Dark Medical UI
   Modern CSS with custom properties, glassmorphism,
   gradients, and micro-animations.
   ═══════════════════════════════════════════════════ */

/* ─── CSS Custom Properties ─── */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a1f35;
    --bg-card-hover: #1f2541;
    --bg-input: #151a2e;
    --border-color: #2a3050;
    --border-light: #343b5c;

    --text-primary: #e8ecf4;
    --text-secondary: #8b94b2;
    --text-muted: #5a6380;

    --accent-primary: #6366f1;
    --accent-primary-hover: #818cf8;
    --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --accent-glow: rgba(99, 102, 241, 0.2);

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.12);

    --sidebar-width: 260px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-primary-hover);
}

/* ─── App Layout ─── */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ─── Sidebar ─── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.4));
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-ai {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-item.active {
    background: var(--accent-glow);
    color: var(--accent-primary-hover);
    border-left: 3px solid var(--accent-primary);
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

.logout-btn {
    color: var(--danger) !important;
}

.logout-btn:hover {
    background: var(--danger-bg) !important;
}

/* ─── Main Content ─── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 20px;
    padding: 8px 12px;
    border-radius: var(--radius-xs);
    cursor: pointer;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
}

.greeting {
    font-size: 13px;
    color: var(--text-secondary);
}

.content-area {
    flex: 1;
    padding: 24px 32px;
}

/* ─── Flash Messages ─── */
.flash-container {
    padding: 0 32px;
    margin-top: 16px;
}

.auth-flash {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    padding: 0;
}

.flash-message {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    cursor: pointer;
    border: 1px solid;
}

.flash-success {
    background: var(--success-bg);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}

.flash-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.flash-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.3);
}

.flash-info {
    background: var(--info-bg);
    color: var(--info);
    border-color: rgba(59, 130, 246, 0.3);
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    margin-left: 12px;
}

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

/* ─── Cards ─── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2 {
    font-size: 16px;
    font-weight: 700;
}

.card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.card-body {
    padding: 24px;
}

/* ─── Stats Grid ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.stat-patients .stat-icon { background: var(--info-bg); }
.stat-predictions .stat-icon { background: rgba(139, 92, 246, 0.12); }
.stat-healthy .stat-icon { background: var(--success-bg); }
.stat-disease .stat-icon { background: var(--danger-bg); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ─── Dashboard Grid ─── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    align-items: start;
}

.card-wide {
    min-width: 0;
}

/* ─── Forms ─── */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.form-group select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

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

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px 16px;
    margin-bottom: 24px;
}

.form-grid .form-group {
    margin-bottom: 0;
}

.form-divider {
    text-align: center;
    margin: 24px 0 20px;
    position: relative;
}

.form-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.form-divider span {
    background: var(--bg-card);
    padding: 0 16px;
    position: relative;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-xs);
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    color: white;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

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

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-full {
    width: 100%;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 12px;
}

/* ─── Tables ─── */
.table-wrapper {
    overflow-x: auto;
}

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

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-input);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.data-table .row-danger {
    border-left: 3px solid var(--danger);
}

.data-table .row-safe {
    border-left: 3px solid var(--success);
}

.actions-cell {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}

/* ─── Badges ─── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: var(--bg-input);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.id-badge {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--text-muted);
}

.sex-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.sex-m {
    background: var(--info-bg);
    color: var(--info);
}

.sex-f {
    background: rgba(236, 72, 153, 0.12);
    color: #ec4899;
}

.result-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.result-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.result-safe {
    background: var(--success-bg);
    color: var(--success);
}

/* ─── Mini Confidence Bar ─── */
.mini-bar-container {
    width: 60px;
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}

.mini-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.bar-danger {
    background: var(--danger);
}

.bar-safe {
    background: var(--success);
}

.confidence-text {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ─── Empty State ─── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

/* ─── Auth Pages ─── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg-primary);
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 900px;
    width: 100%;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.auth-card {
    padding: 40px 36px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo h1 {
    font-size: 28px;
    font-weight: 800;
    margin-top: 12px;
}

.logo-icon-lg {
    font-size: 48px;
    display: block;
    filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.4));
}

.auth-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-info {
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-info-content {
    color: white;
    text-align: center;
}

.auth-info h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 12px;
}

.auth-info p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 28px;
    line-height: 1.7;
}

.auth-info-patient {
    background: linear-gradient(135deg, #10b981, #059669);
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.12);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(4px);
}

.feature-icon {
    font-size: 18px;
}

/* ─── Predict Page ─── */
.predict-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}

.card-predict {
    grid-row: 1 / 3;
}

.card-result .result-body {
    text-align: center;
    padding: 40px 32px;
}

.result-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: pulseIcon 1.5s ease infinite;
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.result-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
}

.result-title.result-healthy { color: var(--success); }
.result-title.result-disease { color: var(--danger); }

.prob-bar-container {
    width: 100%;
    height: 12px;
    background: var(--bg-input);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.prob-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 1s ease;
}

.prob-bar.prob-safe { background: var(--success); }
.prob-bar.prob-danger { background: var(--danger); }

.prob-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
}

.result-note {
    font-size: 12px;
    color: var(--text-muted);
    margin: 20px 0;
    line-height: 1.6;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius-xs);
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ─── Info Panel ─── */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.info-item {
    padding: 10px 14px;
    background: var(--bg-input);
    border-radius: var(--radius-xs);
    border-left: 3px solid var(--accent-primary);
}

.info-item strong {
    font-size: 13px;
    display: block;
    margin-bottom: 2px;
}

.info-item p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.model-info {
    padding: 16px;
    background: var(--accent-glow);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.model-info h3 {
    font-size: 14px;
    margin-bottom: 8px;
}

.model-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 4px 0;
}

/* ─── Filter Bar ─── */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.filter-form {
    display: flex;
    align-items: end;
    gap: 12px;
}

.filter-form .form-group {
    margin: 0;
    min-width: 220px;
}

.filter-info {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .predict-layout {
        grid-template-columns: 1fr;
    }

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

    .auth-container {
        grid-template-columns: 1fr;
    }

    .auth-info {
        display: none;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .top-bar {
        padding: 12px 16px;
    }

    .content-area {
        padding: 16px;
    }

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

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

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

    .greeting {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 24px 20px;
    }
}

/* ═══════════════════════════════════════════════════
   Home / Landing Page
   ═══════════════════════════════════════════════════ */

.home-page {
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── Home Nav ─── */
.home-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}

.home-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.home-nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.home-link {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

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

.home-menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 20px;
    padding: 8px 12px;
    border-radius: var(--radius-xs);
    cursor: pointer;
}

/* ─── Hero Section ─── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 32px 80px;
    overflow: hidden;
}

.hero-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
}

.hero-orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(99, 102, 241, 0.3);
    top: 10%;
    left: -5%;
}

.hero-orb-2 {
    width: 350px;
    height: 350px;
    background: rgba(139, 92, 246, 0.25);
    bottom: 10%;
    right: -5%;
    animation-delay: -3s;
}

.hero-orb-3 {
    width: 250px;
    height: 250px;
    background: rgba(239, 68, 68, 0.2);
    top: 40%;
    right: 25%;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--accent-glow);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-primary-hover);
    margin-bottom: 28px;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); }
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
}

.hero-gradient-text {
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 36px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-top: 56px;
    padding: 24px 36px;
    background: rgba(26, 31, 53, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    backdrop-filter: blur(8px);
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-stat-value {
    font-size: 28px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

/* ─── Home Sections ─── */
.home-section {
    padding: 80px 32px;
}

.home-section-alt {
    background: var(--bg-secondary);
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-glow);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-primary-hover);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.section-desc {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ─── Features Grid ─── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: var(--transition);
}

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

.feature-card-icon {
    font-size: 36px;
    margin-bottom: 18px;
    display: block;
}

.feature-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
}

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

/* ─── Steps Grid ─── */
.steps-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.step-card {
    flex: 1;
    max-width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    transition: var(--transition);
}

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

.step-number {
    font-size: 40px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.step-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
}

.step-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.step-connector {
    font-size: 24px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ─── Tech Grid ─── */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.tech-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 28px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.tech-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-light);
    box-shadow: var(--shadow);
}

.tech-icon {
    font-size: 32px;
}

.tech-name {
    font-size: 14px;
    font-weight: 700;
}

.tech-role {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ─── CTA Section ─── */
.home-cta {
    padding: 80px 32px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.08));
    border-top: 1px solid rgba(99, 102, 241, 0.15);
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}

.cta-content {
    text-align: center;
}

.cta-content h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
}

.cta-content p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* ─── Footer ─── */
.home-footer {
    padding: 40px 32px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.footer-copy {
    font-size: 12px;
    color: var(--text-muted);
}

/* ─── Home Page Responsive ─── */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .steps-grid {
        flex-direction: column;
    }

    .step-connector {
        transform: rotate(90deg);
    }

    .step-card {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .home-nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 14, 26, 0.95);
        backdrop-filter: blur(16px);
        padding: 20px 32px;
        border-bottom: 1px solid var(--border-color);
        gap: 16px;
    }

    .home-nav-links.open {
        display: flex;
    }

    .home-menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-desc {
        font-size: 16px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .hero-stat-divider {
        width: 60px;
        height: 1px;
    }

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

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

    .section-title {
        font-size: 28px;
    }

    .home-section {
        padding: 56px 20px;
    }

    .home-cta {
        padding: 56px 20px;
    }

    .cta-content h2 {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 20px 60px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

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

