:root {
    --bg: #0a0e17;
    --surface: #141a29;
    --surface-2: #1a2136;
    --surface-3: #0f1522;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --blue: #3b82f6;
    --purple: #8b5cf6;
    --green: #22c55e;
    --red: #ef4444;
    --yellow: #f5a623;
    --orange: #f59e0b;
    --navbar-bg: rgba(10, 14, 23, 0.88);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --radius: 14px;
}

html[data-theme="light"] {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --surface-3: #e2e8f0;
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.14);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --navbar-bg: rgba(255, 255, 255, 0.88);
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* ---------- Comprehensive Bootstrap 5 & Theme Compatibility System ---------- */
html[data-theme="dark"],
html:not([data-theme="light"]) {
    color-scheme: dark;
    --bs-body-bg: var(--bg);
    --bs-body-color: var(--text-primary);
    --bs-secondary-color: var(--text-secondary);
    --bs-tertiary-bg: var(--surface-2);
    --bs-tertiary-bg-rgb: 26, 33, 54;
    --bs-secondary-bg: var(--surface-2);
    --bs-secondary-bg-rgb: 26, 33, 54;
    --bs-border-color: var(--border);
    --bs-border-color-translucent: var(--border);
    --bs-heading-color: var(--text-primary);
    --bs-emphasis-color: var(--text-primary);
    --bs-primary-text-emphasis: #60a5fa;
    --bs-body-color-rgb: 241, 245, 249;
    --bs-link-color: #60a5fa;
    --bs-link-hover-color: #93c5fd;
}

html[data-theme="light"] {
    color-scheme: light;
    --bs-body-bg: var(--bg);
    --bs-body-color: var(--text-primary);
    --bs-secondary-color: var(--text-secondary);
    --bs-tertiary-bg: var(--surface-2);
    --bs-tertiary-bg-rgb: 241, 245, 249;
    --bs-secondary-bg: var(--surface-2);
    --bs-secondary-bg-rgb: 241, 245, 249;
    --bs-border-color: var(--border);
    --bs-border-color-translucent: var(--border);
    --bs-heading-color: var(--text-primary);
    --bs-emphasis-color: var(--text-primary);
    --bs-primary-text-emphasis: #1d4ed8;
    --bs-body-color-rgb: 15, 23, 42;
    --bs-link-color: #2563eb;
    --bs-link-hover-color: #1d4ed8;
}

/* Background & Utility Classes Theme Adaptations */
.bg-body-tertiary-subtle,
.bg-body-tertiary,
.bg-body-secondary {
    background-color: var(--surface-2) !important;
}

.bg-body {
    background-color: var(--surface) !important;
}

.text-primary-emphasis {
    color: var(--text-primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Form Controls Theme Integration */
/* Modern SaaS Form Input & Controls Design System */
.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 7px;
    letter-spacing: -0.01em;
}

.form-control,
.form-select {
    background-color: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.925rem;
    font-weight: 400;
    min-height: 44px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.form-control-sm,
.form-select-sm {
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.925rem;
    min-height: 44px;
}

.form-control:hover,
.form-select:hover {
    border-color: rgba(59, 130, 246, 0.4);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--surface);
    color: var(--text-primary);
    border-color: var(--blue, #3b82f6) !important;
    box-shadow: 0 0 0 3.5px rgba(59, 130, 246, 0.18) !important;
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
    font-weight: 400;
    opacity: 0.7;
}

/* Input Group Styling */
.input-group {
    border-radius: 10px;
    transition: all 0.2s ease;
}

.input-group:focus-within {
    box-shadow: 0 0 0 3.5px rgba(59, 130, 246, 0.18);
    border-radius: 10px;
}

.input-group .form-control:focus,
.input-group .form-select:focus {
    box-shadow: none !important;
}

.input-group-text {
    background-color: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border-strong);
    font-size: 0.925rem;
    padding: 10px 16px;
    min-height: 44px;
    transition: all 0.2s ease;
}

.input-group:focus-within .input-group-text {
    border-color: var(--blue, #3b82f6);
    color: var(--blue, #3b82f6);
}

/* Seamless Rounded Corners for Input Groups */
.input-group > :first-child {
    border-top-left-radius: 10px !important;
    border-bottom-left-radius: 10px !important;
}

.input-group > :last-child {
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
}

.input-group-sm > :first-child {
    border-top-left-radius: 10px !important;
    border-bottom-left-radius: 10px !important;
}

.input-group-sm > :last-child {
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
}

/* Textarea Custom Focus & Counter */
.py-1-5 {
    padding-top: 0.375rem !important;
    padding-bottom: 0.375rem !important;
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

/* Dropdowns & Modals Theme Integration */
.dropdown-menu {
    background-color: var(--surface);
    color: var(--text-primary);
    border-color: var(--border-strong);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.dropdown-item {
    color: var(--text-secondary);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--surface-2);
    color: var(--text-primary);
}

.dropdown-item.active {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--blue);
    font-weight: 600;
}

.modal-content {
    background-color: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
}

html[data-theme="dark"] .btn-close,
html:not([data-theme="light"]) .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Tables & Activity Feed Theme Integration */
.table {
    --bs-table-color: var(--text-primary);
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--border);
    --bs-table-hover-bg: var(--surface-2);
    --bs-table-hover-color: var(--text-primary);
    color: var(--text-primary);
}

.table th {
    color: var(--text-muted);
    background-color: var(--surface-2);
}

kbd,
.kbd {
    background-color: var(--surface-3);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

* {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

/* ---------- Theme Custom Scrollbar (WebKit) ---------- */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 10px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Specific Inner Containers Scrollbars */
.notification-list::-webkit-scrollbar,
.tab-nav::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.heatmap-wrap::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.notification-list::-webkit-scrollbar-thumb,
.tab-nav::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.heatmap-wrap::-webkit-scrollbar-thumb {
    background: rgba(137, 146, 166, 0.3);
    border-radius: 10px;
}

.notification-list::-webkit-scrollbar-thumb:hover,
.tab-nav::-webkit-scrollbar-thumb:hover,
.table-wrap::-webkit-scrollbar-thumb:hover,
.heatmap-wrap::-webkit-scrollbar-thumb:hover {
    background: var(--blue);
}

body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: "Inter", system-ui, sans-serif;
    transition:
        background 0.2s ease,
        color 0.2s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
}

/* ---------- Bootstrap Navbar Styling Integration ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
}

.site-header .navbar {
    border-color: var(--border) !important;
}

.site-header .navbar > .container-fluid {
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: space-between;
}

.header-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary) !important;
}

.navbar-nav .nav-link {
    color: var(--text-secondary);
    font-size: 0.92rem;
    padding: 6px 4px;
    transition: color 0.15s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--text-primary) !important;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    width: 250px;
    transition:
        width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.25s ease;
}

.header-search i {
    color: var(--text-muted);
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.header-search:focus-within {
    width: 340px;
    background: var(--surface);
    border-color: var(--blue);
    box-shadow:
        0 0 0 3.5px rgba(59, 130, 246, 0.22),
        0 6px 20px -4px rgba(59, 130, 246, 0.15);
}

.header-search:focus-within i {
    color: var(--blue);
    transform: scale(1.12);
}

.header-search input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    width: 100%;
}

.header-search input::placeholder {
    color: var(--text-muted);
    transition: opacity 0.2s ease;
}

.header-search:focus-within input::placeholder {
    opacity: 0.75;
}

.search-kbd-hint {
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
    line-height: 1.2;
    flex-shrink: 0;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.header-search:focus-within .search-kbd-hint {
    opacity: 0;
    transform: scale(0.85);
    pointer-events: none;
}

/* ---------- Mobile Search Bar Collapse ---------- */
.mobile-search-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-search-bar .header-search {
    width: 100% !important;
}

.header-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    position: relative;
    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.header-icon-btn:hover {
    background: var(--surface-2);
    color: var(--text-primary);
}

.dot-badge {
    position: absolute;
    top: 6px;
    right: 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red);
    border: 1.5px solid var(--bg);
}

.header-avatar-btn img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--border-strong);
}

.mobile-nav-drawer {
    background: var(--surface);
    color: var(--text-primary);
}

.mobile-nav-drawer .header-brand a {
    color: var(--text-primary) !important;
    text-decoration: none;
}

[data-theme="dark"] .mobile-nav-drawer .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.mobile-nav-drawer .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
}

.mobile-nav-drawer .nav-link.active {
    color: var(--blue) !important;
}

/* ---------- Notification Dropdown Menu ---------- */
.notification-dropdown-menu {
    width: 360px;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.3) !important;
    padding: 0 !important;
    margin-top: 10px !important;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.notification-list {
    max-height: 340px;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.15s ease;
    position: relative;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: var(--surface-2);
    color: var(--text-primary);
}

.notification-item.unread {
    background: rgba(59, 130, 246, 0.04);
}

.notification-item.unread::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue);
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.notification-icon.trophy {
    background: rgba(245, 158, 11, 0.15);
    color: var(--orange);
}

.notification-icon.verdict {
    background: rgba(34, 197, 94, 0.15);
    color: var(--green);
}

.notification-icon.blog {
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue);
}

.notification-icon.mention {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple);
}

.notification-content {
    flex: 1;
    font-size: 0.84rem;
    line-height: 1.4;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.notification-footer {
    padding: 10px 18px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    text-align: center;
}

.notification-footer a {
    color: var(--blue);
    font-size: 0.82rem;
    font-weight: 600;
    transition: color 0.15s ease;
}

.notification-footer a:hover {
    color: #2563eb;
}

/* ---------- Profile Dropdown Menu ---------- */
.profile-dropdown-menu {
    width: 270px;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.3) !important;
    padding: 0 !important;
    margin-top: 10px !important;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-dropdown-header {
    padding: 16px 18px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.profile-dropdown-user-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.profile-dropdown-user-handle {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.profile-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.profile-dropdown-menu .dropdown-item i {
    font-size: 0.92rem;
    width: 16px;
    text-align: center;
    color: var(--text-muted);
    transition: color 0.15s ease;
}

.profile-dropdown-menu .dropdown-item:hover {
    background: var(--surface-2);
    color: var(--text-primary);
}

.profile-dropdown-menu .dropdown-item:hover i {
    color: var(--blue);
}

.profile-dropdown-menu .dropdown-item.text-danger:hover i {
    color: var(--red) !important;
}

.profile-dropdown-menu .dropdown-divider {
    margin: 4px 0;
    border-top-color: var(--border);
    opacity: 1;
}

@media (max-width: 575.98px) {
    .header-brand {
        font-size: 1.2rem !important;
        white-space: nowrap;
    }

    .header-brand i {
        font-size: 1.05rem;
    }

    .header-icon-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .header-avatar-btn img {
        width: 35px;
        height: 35px;
        flex-shrink: 0;
    }

    .notification-dropdown-menu {
        position: fixed !important;
        top: 56px !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: calc(100vw - 24px) !important;
        margin: 0 auto !important;
        transform: none !important;
    }

    .profile-dropdown-menu {
        position: fixed !important;
        top: 56px !important;
        right: 12px !important;
        left: auto !important;
        width: 270px !important;
        max-width: calc(100vw - 24px) !important;
        margin: 0 !important;
        transform: none !important;
    }
}

/* ---------- Main Content Shell & Breadcrumb ---------- */
.page-main {
    width: 100%;
    padding: 22px 24px 40px;
    flex: 1;
}

.page-sub-header {
    margin-bottom: 16px;
}

.breadcrumb-list {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.breadcrumb-list a {
    color: var(--text-muted);
}

.breadcrumb-list a:hover {
    color: var(--text-primary);
}

.breadcrumb-list .sep {
    margin: 0 6px;
}

.breadcrumb-list .current {
    color: var(--text-secondary);
}

.btn-share-profile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-share-profile:hover {
    background: var(--surface-2);
}

/* ---------- Profile Header & Meta ---------- */
.avatar-wrap {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    padding: 3px;
    flex-shrink: 0;
    background: conic-gradient(
        from 180deg,
        #3b82f6,
        #8b5cf6,
        #f59e0b,
        #ef4444,
        #22c55e,
        #3b82f6
    );
}

.avatar-wrap img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--surface);
    display: block;
}

.verified-badge {
    color: var(--blue);
    font-size: 1rem;
}

.profile-role-title {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

.profile-location-text {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 4px;
}

.profile-action-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-edit-profile {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.btn-edit-profile:hover {
    background: var(--surface-2);
    color: var(--text-primary);
}

.social-link-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
    background: transparent;
    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.social-link-btn:hover {
    background: var(--surface-2);
    color: var(--text-primary);
}

.profile-meta-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-meta-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.profile-meta-item .meta-label {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.profile-meta-item .meta-value {
    font-size: 0.87rem;
    font-weight: 700;
    margin-top: 2px;
}

.profile-meta-item .sync-icon {
    color: var(--green);
    font-size: 0.85rem;
}

/* ---------- Tabs System ---------- */
.tab-nav {
    display: flex;
    gap: 26px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 22px;
    overflow-x: auto;
}

.tab-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 10px 2px 12px;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition:
        color 0.15s ease,
        border-color 0.15s ease;
}

.tab-button.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.tab-button:hover:not(.active) {
    color: var(--text-primary);
}

/* ---------- Bootstrap Card Component System ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--text-primary);
    transition:
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, box-shadow;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow:
        0 14px 28px -6px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(59, 130, 246, 0.2);
}

html[data-theme="light"] .card:hover {
    box-shadow:
        0 14px 30px -8px rgba(15, 23, 42, 0.1),
        0 0 0 1px rgba(59, 130, 246, 0.25);
}

/* ---------- SaaS Directory Table Styles ---------- */
.saas-directory-table {
    min-width: 960px;
}

.saas-directory-table thead.sticky-top {
    z-index: 10 !important;
}

.saas-directory-table th {
    background: var(--surface-2);
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.03em;
}

.saas-table-row {
    transition: background 0.15s ease;
}

.saas-table-row:hover {
    background: var(--surface-2) !important;
}

/* Platform Directory Toolbar & Search Styling */
.saas-header-toolbar {
    position: relative;
    z-index: 30;
}

.saas-header-toolbar .dropdown-menu {
    z-index: 1050 !important;
}

.platform-filter-pill {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    transition: all 0.15s ease;
    cursor: pointer;
}

.platform-filter-pill:hover {
    background: var(--surface-2);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.platform-filter-pill.active {
    background: rgba(59, 130, 246, 0.12);
    color: var(--blue, #3b82f6);
    border-color: rgba(59, 130, 246, 0.35);
    font-weight: 600;
}

.platform-search-wrapper input {
    background: var(--surface);
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.platform-search-wrapper input:focus {
    border-color: var(--blue, #3b82f6) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

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

.btn-ghost-secondary:hover {
    background: var(--surface-2);
    color: var(--text-primary);
}

.btn-icon {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

/* Card Modifiers & Panels */
.panel {
    padding: 20px 22px;
    margin-bottom: 20px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.panel-title {
    font-size: 1rem;
    font-weight: 700;
}

.panel-select {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 8px;
    outline: none;
}

/* ---------- Stat Cards Grid ---------- */
.stat-card {
    border-radius: 12px;
    padding: 16px;
    height: 100%;
}

.stat-card .stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover .stat-value {
    transform: scale(1.04);
}

.stat-card .stat-value-positive {
    color: var(--green);
}

.stat-card .stat-value-negative {
    color: var(--red);
}

/* ---------- Table Styles ---------- */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.87rem;
    min-width: 560px;
}

.table-wrap thead th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0 10px 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table-wrap tbody td {
    padding: 13px 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    white-space: nowrap;
}

.table-wrap tbody tr:last-child td {
    border-bottom: none;
}

.table-wrap a.contest-link {
    color: var(--blue);
    font-weight: 600;
    white-space: normal;
}

.table-wrap .rc-pos {
    color: var(--green);
    font-weight: 700;
}

.table-wrap .rc-neg {
    color: var(--red);
    font-weight: 700;
}

/* ---------- Badges & Chips ---------- */
.badge-diff {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-diff.easy {
    background: rgba(34, 197, 94, 0.15);
    color: var(--green);
}

.badge-diff.medium {
    background: rgba(245, 166, 35, 0.15);
    color: var(--yellow);
}

.badge-diff.hard {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

.badge-diff.master {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple);
}

.badge-verdict {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-verdict.ac {
    background: rgba(34, 197, 94, 0.15);
    color: var(--green);
}

.badge-verdict.wa {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

.badge-verdict.tle {
    background: rgba(245, 166, 35, 0.15);
    color: var(--yellow);
}

.badge-verdict.rte {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple);
}

.badge-expert {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue);
}

.tag-chip {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
}

/* ---------- Mobile Contest Cards ---------- */
.contest-card-list {
    display: none;
    flex-direction: column;
    gap: 10px;
}

.contest-card {
    padding: 13px 14px;
}

.contest-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.contest-card-top a.contest-link {
    color: var(--blue);
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.3;
}

.contest-card-change {
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.contest-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.contest-card-meta b {
    color: var(--text-secondary);
    font-weight: 600;
}

/* ---------- GitHub Profile Heatmap Widget ---------- */
.github-heatmap-container {
    overflow-x: auto;
    padding: 10px 0 4px;
}

.github-heatmap-inner {
    min-width: 680px;
}

.heatmap-months-row {
    display: flex;
    justify-content: space-between;
    padding-left: 30px;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 6px;
}

.heatmap-body-wrap {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.heatmap-days-col {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 95px;
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
    padding-top: 2px;
}

.github-heatmap-grid {
    display: grid;
    grid-template-rows: repeat(7, 11px);
    grid-auto-flow: column;
    gap: 3px;
}

.github-heatmap-grid .hm-cell,
.heatmap-legend-list .hm-cell {
    width: 11px;
    height: 11px;
    border-radius: 2px;
    transition:
        transform 0.15s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.15s ease;
    cursor: pointer;
}

.github-heatmap-grid .hm-cell:hover {
    transform: scale(1.4);
    z-index: 10;
    outline: 1.5px solid var(--blue);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Light Theme GitHub Green Palette */
html[data-theme="light"] .hm-cell.level-0 {
    background: #ebedf0;
    border: 1px solid rgba(27, 31, 35, 0.06);
}

html[data-theme="light"] .hm-cell.level-1 {
    background: #9be9a8;
}

html[data-theme="light"] .hm-cell.level-2 {
    background: #40c463;
}

html[data-theme="light"] .hm-cell.level-3 {
    background: #30a14e;
}

html[data-theme="light"] .hm-cell.level-4 {
    background: #216e39;
}

/* Dark Theme GitHub Green Palette */
html[data-theme="dark"] .hm-cell.level-0 {
    background: #161b22;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .hm-cell.level-1 {
    background: #0e4429;
}

html[data-theme="dark"] .hm-cell.level-2 {
    background: #006d32;
}

html[data-theme="dark"] .hm-cell.level-3 {
    background: #26a641;
}

html[data-theme="dark"] .hm-cell.level-4 {
    background: #39d353;
}

.heatmap-legend-list {
    display: flex;
    gap: 3px;
    list-style: none;
    padding: 0;
    margin: 0 4px;
}

/* Floating Tooltip */
.heatmap-tooltip {
    position: absolute;
    display: none;
    background: #1e293b;
    color: #f8fafc;
    padding: 6px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
    pointer-events: none;
    white-space: nowrap;
    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: translateX(-50%);
    z-index: 1050;
    transition: opacity 0.12s ease;
}

html[data-theme="light"] .heatmap-tooltip {
    background: #0f172a;
    color: #ffffff;
}

.heatmap-tooltip::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: #1e293b;
}

html[data-theme="light"] .heatmap-tooltip::after {
    background: #0f172a;
}

/* ---------- Responsive Breakpoints ---------- */

@media (max-width: 767px) {
    .page-main {
        padding: 16px 14px 40px;
    }

    .avatar-wrap {
        width: 96px;
        height: 96px;
    }

    .panel {
        padding: 16px 15px;
    }

    .table-wrap.responsive-table {
        display: none;
    }

    .contest-card-list {
        display: flex;
    }
}

@media (max-width: 480px) {
    .avatar-wrap {
        width: 84px;
        height: 84px;
    }

    .stat-card {
        padding: 13px 12px;
    }

    .stat-card .stat-value {
        font-size: 1.25rem;
    }

    .header-container {
        padding: 10px 14px;
        gap: 14px;
    }

    .header-brand {
        font-size: 1rem;
    }

    .btn-share-profile {
        width: 100%;
        justify-content: center;
    }
}

/* ---------- Site Footer ---------- */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: auto;
    color: var(--text-secondary);
}

.footer-top-section {
    padding: 60px 0 45px;
}

.footer-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 18px;
    max-width: 380px;
}

.footer-status-badge {
    display: flex;
    align-items: center;
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--green);
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.25);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

@keyframes pulse-status-dot {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
    animation: pulse-status-dot 2s infinite;
}

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

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.social-icon:hover {
    background: var(--blue);
    color: #ffffff;
    border-color: var(--blue);
    transform: translateY(-2px);
}

.footer-heading {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.footer-links li a {
    color: var(--text-muted);
    font-size: 0.86rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition:
        color 0.15s ease,
        transform 0.15s ease;
}

.footer-links li a i {
    font-size: 0.65rem;
    opacity: 0.4;
    transition:
        opacity 0.15s ease,
        transform 0.15s ease,
        color 0.15s ease;
}

.footer-links li a:hover {
    color: var(--text-primary);
    transform: translateX(4px);
}

.footer-links li a:hover i {
    opacity: 1;
    color: var(--blue);
}

.footer-newsletter-text {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

.footer-newsletter-form .input-group {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    transition: border-color 0.2s ease;
}

.footer-newsletter-form .input-group:focus-within {
    border-color: var(--blue);
}

.footer-newsletter-form .form-control {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    padding: 8px 12px;
    outline: none;
}

.footer-newsletter-form .form-control:focus {
    box-shadow: none;
    background: transparent;
    color: var(--text-primary);
}

.footer-newsletter-form .form-control::placeholder {
    color: var(--text-muted);
}

.btn-subscribe {
    background: var(--blue);
    border: none;
    border-radius: 8px !important;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 18px;
    transition:
        background 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.btn-subscribe:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.footer-bottom-section {
    border-top: 1px solid var(--border);
    padding: 22px 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.05);
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-legal a {
    color: var(--text-muted);
    transition: color 0.15s ease;
}

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

.footer-legal .dot {
    opacity: 0.3;
}

@media (max-width: 991px) {
    .footer-top-section {
        padding: 48px 0 32px;
    }
}

@media (max-width: 767px) {
    .footer-container {
        padding: 0 16px;
    }

    .footer-top-section {
        padding: 38px 0 24px;
    }

    .footer-bottom-section {
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
    }
}

/* ---------- Experience Timeline ---------- */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: var(--border-strong);
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

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

.timeline-dot {
    position: absolute;
    left: -28px;
    top: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--surface);
    border: 3px solid var(--blue);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

/* ---------- Skills Progress Bars ---------- */
.skill-progress-wrap {
    background: var(--surface-2);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.skill-progress-bar {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--blue), var(--purple));
    transition: width 0.4s ease;
}

/* ---------- Project & Achievement Cards ---------- */
.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.achievement-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.achievement-icon.gold {
    background: rgba(245, 166, 35, 0.15);
    color: var(--yellow);
}

.achievement-icon.blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue);
}

.achievement-icon.purple {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple);
}

.achievement-icon.green {
    background: rgba(34, 197, 94, 0.15);
    color: var(--green);
}

/* ---------- Settings & Account Management System ---------- */
.settings-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    position: relative;
}

.settings-nav-link i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    transition: color 0.15s ease;
}

.settings-nav-link:hover {
    background: var(--surface-2);
    color: var(--text-primary);
}

.settings-nav-link.active {
    background: var(--surface-2) !important;
    color: var(--text-primary) !important;
    font-weight: 600;
}

.settings-nav-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background-color: var(--blue, #3b82f6);
}

.avatar-upload-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3px solid var(--surface-2);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.avatar-upload-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-upload-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--blue, #3b82f6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2.5px solid var(--surface);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition:
        transform 0.15s ease,
        background 0.15s ease;
}

.avatar-upload-badge:hover {
    transform: scale(1.1);
    background: #2563eb;
}

.social-input-prefix {
    width: 42px;
    justify-content: center;
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--text-muted);
}

/* ---------- Select2 Custom SaaS Theme Integration ---------- */
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    background-color: var(--surface) !important;
    border: 1px solid var(--border-strong) !important;
    border-radius: 10px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.select2-container--default .select2-selection--single:hover {
    border-color: rgba(59, 130, 246, 0.4) !important;
}

.select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
    color: var(--text-primary) !important;
    font-size: 0.925rem !important;
    font-weight: 400 !important;
    padding-left: 14px !important;
    padding-right: 30px !important;
    line-height: 42px !important;
}

.select2-container--default
    .select2-selection--single
    .select2-selection__arrow {
    height: 42px !important;
    right: 10px !important;
}

.select2-container--default
    .select2-selection--single
    .select2-selection__arrow
    b {
    border-color: var(--text-muted) transparent transparent transparent !important;
    border-width: 5px 4px 0 4px !important;
}

.select2-container--default.select2-container--open
    .select2-selection--single
    .select2-selection__arrow
    b {
    border-color: transparent transparent var(--text-muted) transparent !important;
    border-width: 0 4px 5px 4px !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--blue, #3b82f6) !important;
    box-shadow: 0 0 0 3.5px rgba(59, 130, 246, 0.18) !important;
}

/* Select2 Dropdown Popup Window */
.select2-dropdown {
    background-color: var(--surface) !important;
    border: 1px solid var(--border-strong) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35) !important;
    overflow: hidden !important;
    z-index: 1070 !important;
}

.select2-search--dropdown {
    padding: 8px !important;
}

.select2-search--dropdown .select2-search__field {
    background-color: var(--surface-2) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-strong) !important;
    border-radius: 8px !important;
    padding: 6px 10px !important;
    font-size: 0.825rem !important;
    outline: none !important;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: var(--blue, #3b82f6) !important;
}

.select2-results__option {
    padding: 8px 12px !important;
    font-size: 0.84rem !important;
    color: var(--text-secondary) !important;
    transition: background 0.15s ease !important;
}

.select2-container--default
    .select2-results__option--highlighted[aria-selected] {
    background-color: var(--surface-2) !important;
    color: var(--text-primary) !important;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: rgba(59, 130, 246, 0.12) !important;
    color: var(--blue, #3b82f6) !important;
    font-weight: 600 !important;
}

/* ---------- Connected Platforms Table Padding & Spacing ---------- */
#connected-platforms-table th {
    padding: 16px 20px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    background-color: var(--surface-2) !important;
    border-bottom: 1px solid var(--border-strong) !important;
}

#connected-platforms-table td {
    padding: 16px 20px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid var(--border) !important;
}

#connected-platforms-table tbody tr:last-child td {
    border-bottom: none !important;
}

/* ---------- Contests Hub System ---------- */
.contest-card {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
    overflow: hidden;
}

.contest-card:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.fixed-card,
.fixed-card:hover {
    transform: none !important;
    box-shadow: none !important;
    transition: none !important;
}

.badge-live-pulse {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-live-pulse .pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulse-red 1.6s infinite;
}

@keyframes pulse-red {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.countdown-box {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.platform-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
}

.platform-tag.cf {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.platform-tag.lc {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.platform-tag.ac {
    background: rgba(6, 182, 212, 0.12);
    color: #06b6d4;
}

.platform-tag.cc {
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
}

.platform-tag.hr {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.platform-tag.kg {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

/* Contests Table Cell Custom Styling */
.contest-action-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    transition: all 0.15s ease;
}

/* ---------- Problems Hub Select2 Multi-Select ---------- */
.select2-container--default .select2-selection--multiple {
    background-color: var(--surface) !important;
    border: 1px solid var(--border-strong) !important;
    border-radius: 10px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    padding: 2px 8px !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.select2-container--default
    .select2-selection--multiple
    .select2-selection__choice {
    background-color: var(--surface-2) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    border-radius: 6px !important;
    padding: 2px 8px !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    margin: 2px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.select2-container--default
    .select2-selection--multiple
    .select2-selection__choice__remove {
    color: var(--text-muted) !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    order: 2 !important;
}

.select2-container--default
    .select2-selection--multiple
    .select2-selection__choice__remove:hover {
    color: var(--red) !important;
    background: transparent !important;
}

.select2-container--default.select2-container--focus
    .select2-selection--multiple {
    border-color: var(--blue, #3b82f6) !important;
    box-shadow: 0 0 0 3.5px rgba(59, 130, 246, 0.18) !important;
}

.select2-container--default
    .select2-selection--multiple
    .select2-search__field {
    margin-top: 0 !important;
    color: var(--text-primary) !important;
    font-size: 0.86rem !important;
    padding-left: 6px !important;
}

/* Hover micro-animation for table links */
.problem-title-link {
    transition: color 0.15s ease;
    text-decoration: none;
}

.problem-title-link:hover {
    color: var(--blue) !important;
    text-decoration: underline !important;
}

/* Solved date badge */
.solved-date-cell {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   JUDGEARENA SAAS HOMEPAGE DESIGN SYSTEM (v2)
   ========================================================================== */

/* Main Container Layout Override for Homepage */
.landing-main {
    width: 100%;
    overflow-x: hidden;
    padding: 0 !important;
}

/* Landing Section Helper */
.landing-section {
    padding: 90px 0;
    position: relative;
}

.landing-section-sm {
    padding: 50px 0;
}

.landing-section-muted {
    background-color: var(--surface-3);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* Section Header Typography */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Hero Section Styling */
.hero-section {
    padding: 90px 0 70px;
    position: relative;
    overflow: hidden;
}

.hero-glow-bg {
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 550px;
    background: radial-gradient(
        circle,
        rgba(59, 130, 246, 0.15) 0%,
        rgba(139, 92, 246, 0.08) 40%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
    filter: blur(50px);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.75rem, 5vw, 4.25rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.hero-gradient-text {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 1.8vw, 1.2rem);
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 36px;
}

.btn-hero-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 32px;
    border-radius: 12px;
    border: none;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.45);
    color: #ffffff !important;
}

.btn-hero-secondary {
    background: var(--surface-2);
    color: var(--text-primary) !important;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 28px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-hero-secondary:hover {
    background: var(--surface);
    border-color: var(--blue);
    color: var(--blue) !important;
    transform: translateY(-2px);
}

.hero-trust-list {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hero-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Mockup Browser Window */
.mockup-browser {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    box-shadow:
        0 25px 60px -15px rgba(0, 0, 0, 0.3),
        0 0 0 1px var(--border);
    overflow: hidden;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

html[data-theme="light"] .mockup-browser {
    box-shadow:
        0 25px 60px -15px rgba(15, 23, 42, 0.12),
        0 0 0 1px var(--border);
}

.mockup-browser-header {
    background: var(--surface-2);
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mockup-browser-dots {
    display: flex;
    align-items: center;
    gap: 7px;
}

.dot-red {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
}

.dot-yellow {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f59e0b;
}

.dot-green {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
}

.mockup-browser-address {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px 16px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-family: "JetBrains Mono", monospace;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 50%;
    justify-content: center;
}

.mockup-browser-body {
    padding: 24px;
}

/* Platform Marquee Showcase */
.platform-marquee-wrapper {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    mask-image: linear-gradient(
        to right,
        transparent,
        black 10%,
        black 90%,
        transparent
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent,
        black 10%,
        black 90%,
        transparent
    );
}

.platform-marquee-track {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    animation: marqueeScroll 35s linear infinite;
}

.platform-marquee-track:hover {
    animation-play-state: paused;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.platform-card-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.platform-card-pill:hover {
    border-color: var(--blue);
    transform: translateY(-2px);
}

/* Feature SaaS Cards */
.saas-feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.saas-feature-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .saas-feature-card:hover {
    box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.08);
}

.saas-feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 24px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue);
}

.saas-feature-card.purple .saas-feature-icon {
    background: rgba(139, 92, 246, 0.1);
    color: var(--purple);
}

.saas-feature-card.green .saas-feature-icon {
    background: rgba(34, 197, 94, 0.1);
    color: var(--green);
}

.saas-feature-card.orange .saas-feature-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--orange);
}

.saas-feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.saas-feature-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* UNIFIED PROFILE CONVERSION FLOW */
.flow-node-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s ease;
}

.flow-node-card:hover {
    border-color: var(--blue);
    transform: translateX(4px);
}

.flow-arrow-down {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
    color: var(--blue);
    font-size: 1.2rem;
    animation: pulseArrow 2s infinite;
}

@keyframes pulseArrow {
    0%,
    100% {
        transform: translateY(0);
        opacity: 0.6;
    }

    50% {
        transform: translateY(4px);
        opacity: 1;
    }
}

.unified-hero-result-card {
    background: linear-gradient(
        135deg,
        rgba(59, 130, 246, 0.08) 0%,
        rgba(139, 92, 246, 0.08) 100%
    );
    border: 2px solid var(--blue);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.15);
}

/* Analytics Tab Buttons */
.analytics-tab-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.analytics-tab-btn.active,
.analytics-tab-btn:hover {
    background: var(--surface-2);
    color: var(--blue);
    border-color: var(--blue);
}

/* Submission Heatmap Grid */
.heatmap-mini-grid {
    display: grid;
    grid-template-columns: repeat(26, 1fr);
    gap: 4px;
}

.heatmap-cell {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 3px;
    background: var(--surface-2);
}

.heatmap-cell.lvl-1 {
    background: rgba(34, 197, 94, 0.3);
}

.heatmap-cell.lvl-2 {
    background: rgba(34, 197, 94, 0.55);
}

.heatmap-cell.lvl-3 {
    background: rgba(34, 197, 94, 0.85);
}

.heatmap-cell.lvl-4 {
    background: #22c55e;
}

/* Community Preview Module Card */
.community-module-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    height: 100%;
    transition: all 0.25s ease;
}

.community-module-card:hover {
    border-color: var(--blue);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Stat Counter Card */
.stat-counter-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    height: 100%;
    transition: all 0.25s ease;
}

.stat-counter-card:hover {
    border-color: var(--blue);
    transform: translateY(-3px);
}

.stat-counter-number {
    font-size: clamp(2.25rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    line-height: 1.1;
}

.stat-counter-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
}

/* Roadmap Milestone Item */
.roadmap-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    height: 100%;
    position: relative;
    transition: all 0.25s ease;
}

.roadmap-card:hover {
    border-color: var(--purple);
    transform: translateY(-3px);
}

.roadmap-phase-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 14px;
}

.roadmap-phase-badge.current {
    background: rgba(59, 130, 246, 0.12);
    color: var(--blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.roadmap-phase-badge.upcoming {
    background: rgba(139, 92, 246, 0.12);
    color: var(--purple);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.roadmap-phase-badge.future {
    background: rgba(34, 197, 94, 0.12);
    color: var(--green);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* CTA Banner Container */
.cta-banner {
    background: linear-gradient(
        135deg,
        rgba(59, 130, 246, 0.12) 0%,
        rgba(139, 92, 246, 0.12) 100%
    );
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 24px;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .cta-banner {
        padding: 40px 20px;
    }
}

.form-switch .form-check-input {
    width: 2.5em !important;
    height: 1.3em !important;
}
