/* ============================================
   Facebook Followers Checker - Premium Dark UI
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a2235;
    --bg-card-hover: #1e2942;
    --bg-input: #0f172a;
    --bg-glass: rgba(26, 34, 53, 0.85);
    --border-color: rgba(99, 102, 241, 0.15);
    --border-glow: rgba(99, 102, 241, 0.35);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #6366f1;
    --accent-purple: #8b5cf6;
    --accent-cyan: #22d3ee;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-orange: #f59e0b;
    --accent-pink: #ec4899;
    --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
    --gradient-success: linear-gradient(135deg, #10b981, #34d399);
    --gradient-danger: linear-gradient(135deg, #ef4444, #f87171);
    --gradient-header: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    --gradient-bg: linear-gradient(180deg, #0a0e1a 0%, #0f172a 50%, #0a0e1a 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    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);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ============== ANIMATED BACKGROUND ============== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
    animation: float 20s ease-in-out infinite;
}

.bg-orb:nth-child(1) {
    width: 500px;
    height: 500px;
    background: var(--accent-blue);
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}

.bg-orb:nth-child(2) {
    width: 400px;
    height: 400px;
    background: var(--accent-purple);
    top: 50%;
    right: -10%;
    animation-delay: -7s;
}

.bg-orb:nth-child(3) {
    width: 350px;
    height: 350px;
    background: var(--accent-cyan);
    bottom: -5%;
    left: 30%;
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -40px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 30px) scale(0.95);
    }

    75% {
        transform: translate(40px, 20px) scale(1.02);
    }
}

/* ============== LAYOUT ============== */
.app-container {
    position: relative;
    z-index: 1;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

/* ============== HEADER ============== */
.header {
    padding: 28px 0;
    margin-bottom: 32px;
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: var(--shadow-glow);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
    }

    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.4);
    }
}

.header-title {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.header-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.header-badge .badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* ============== STATS BAR ============== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: rgba(99, 102, 241, 0.15);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.15);
}

.stat-icon.purple {
    background: rgba(139, 92, 246, 0.15);
}

.stat-icon.cyan {
    background: rgba(34, 211, 238, 0.15);
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============== HISTORY SECTION ============== */
#historySection {
    background: linear-gradient(165deg, var(--bg-card), rgba(99, 102, 241, 0.05));
    border-left: 4px solid var(--accent-purple);
}

#historyTable tr {
    cursor: default;
}

#historyTable tr:hover {
    background: rgba(139, 92, 246, 0.08) !important;
}

#historyDateFilter::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.5;
    cursor: pointer;
}

#historyDateFilter::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* History Modal Specifics */
#historySummaryBar {
    background: rgba(2, 6, 23, 0.5);
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

/* ============== INPUT SECTION ============== */
.input-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 28px;
    margin-bottom: 32px;
    transition: var(--transition);
}

.input-section:hover {
    border-color: var(--border-glow);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .icon {
    font-size: 20px;
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.input-group {
    position: relative;
}

.input-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-label .hint {
    font-weight: 400;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
    font-size: 12px;
}

textarea.input-field {
    width: 100%;
    min-height: 160px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    color: var(--text-primary);
    font-family: 'Inter', monospace;
    font-size: 13px;
    line-height: 1.8;
    resize: vertical;
    transition: var(--transition);
    outline: none;
}

textarea.input-field:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

textarea.input-field::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* ============== BUTTONS ============== */
.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: var(--transition);
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.45);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.45);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1.5px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--border-glow);
    color: var(--text-primary);
    background: var(--bg-card);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-icon {
    padding: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ============== LOADING SPINNER ============== */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 26, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
}

.loading-spinner-lg {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.loading-progress {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ============== TABLE SECTION ============== */
.table-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: visible;
    margin-bottom: 32px;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

.table-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.table-wrapper {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-blue) var(--bg-input);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.table-wrapper::-webkit-scrollbar {
    height: 6px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: var(--bg-input);
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 3px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1400px;
}

thead {
    background: var(--bg-input);
}

thead th {
    padding: 14px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

thead th:first-child {
    padding-left: 24px;
}

tbody tr {
    border-bottom: 1px solid rgba(99, 102, 241, 0.05);
    transition: var(--transition);
    cursor: context-menu;
}

tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.row-suspended {
    background: rgba(239, 68, 68, 0.04) !important;
}

.row-suspended:hover {
    background: rgba(239, 68, 68, 0.08) !important;
}

tbody td {
    padding: 14px 16px;
    font-size: 13px;
    vertical-align: middle;
    color: var(--text-secondary);
}

tbody td:first-child {
    padding-left: 24px;
}

.cell-checkbox {
    width: 40px;
}

.cell-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-blue);
    cursor: pointer;
}

.cell-recheck {
    width: 44px;
    text-align: center;
}

.btn-recheck-row {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid rgba(99, 102, 241, 0.25);
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    padding: 0;
    line-height: 1;
}

.btn-recheck-row:hover {
    background: rgba(99, 102, 241, 0.22);
    border-color: var(--accent-blue);
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.btn-recheck-row:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn-recheck-row.spinning {
    animation: spin 0.7s linear infinite;
}

.page-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.page-name-text {
    font-weight: 600;
    color: var(--text-primary);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-url {
    font-size: 11px;
    color: var(--text-muted);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.followers-cell {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.change-positive {
    color: var(--accent-green);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.change-negative {
    color: var(--accent-red);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.change-neutral {
    color: var(--text-muted);
    font-weight: 500;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.status-success {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
}

.status-error {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
}

.status-suspended {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-weight: 700;
}

.status-pending {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-orange);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 60px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

/* ============== CONFIG SECTION ============== */
.config-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 28px;
    margin-bottom: 32px;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.config-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.config-item:hover {
    border-color: var(--border-glow);
}

.config-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.config-label strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.config-label span {
    font-size: 12px;
    color: var(--text-muted);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-muted);
    top: 2px;
    left: 2px;
    transition: var(--transition);
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(24px);
    background: white;
}

.time-input {
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    transition: var(--transition);
    width: 120px;
}

.time-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ============== TOAST NOTIFICATIONS ============== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    min-width: 320px;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
}

.toast.success {
    border-left: 4px solid var(--accent-green);
}

.toast.error {
    border-left: 4px solid var(--accent-red);
}

.toast.info {
    border-left: 4px solid var(--accent-blue);
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-body {
    flex: 1;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.toast-message {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    transition: var(--transition);
}

.toast-close:hover {
    color: var(--text-primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ============== ROW ANIMATIONS ============== */
@keyframes fadeInRow {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

tbody tr {
    animation: fadeInRow 0.3s ease-out;
}

/* ============== SELECT ALL / TOOLBAR ============== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: rgba(99, 102, 241, 0.08);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 8px;
}

.toolbar-info {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 768px) {
    .app-container {
        padding: 0 12px 20px;
    }

    .header-title {
        font-size: 20px;
    }

    .stats-bar {
        grid-template-columns: 1fr 1fr;
    }

    .input-section,
    .config-section {
        padding: 20px;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-bar {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============== MISC UTILITIES ============== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shimmer {
    background: linear-gradient(90deg, var(--bg-input) 25%, var(--bg-card) 50%, var(--bg-input) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============== SCROLLBAR ============== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-input);
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* ============== ROW HIGHLIGHT ANIMATION ============== */
.row-highlight {
    animation: highlight-pulse 1.5s ease-out;
}

@keyframes highlight-pulse {
    0% {
        background: rgba(99, 102, 241, 0.2);
    }

    100% {
        background: transparent;
    }
}

/* ============== LAST CHECKED TIME ============== */
.last-checked {
    font-size: 11px;
    color: var(--text-muted);
}

/* ============== LINK STYLES ============== */
a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-purple);
}

/* ============== PROGRESS BAR ============== */
.progress-bar-container {
    width: 100%;
    height: 4px;
    background: var(--bg-input);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

/* ============== CONTEXT MENU FIX ============== */
select {
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    outline: none;
    cursor: pointer;
}

select:focus {
    border-color: var(--accent-blue);
}

/* ============== PRINT STYLES (PDF EXPORT) ============== */
@media print {
    body {
        background: white !important;
        color: black !important;
        font-size: 10pt;
    }

    .bg-animation,
    .loading-overlay,
    .toast-container,
    .input-section,
    .config-section,
    .table-actions,
    .toolbar,
    #searchInput,
    #managerFilter,
    #followerSort,
    header.header .header-right,
    .btn-group,
    .btn {
        display: none !important;
    }

    .app-container {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }

    .table-section,
    .stat-card {
        background: white !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        margin-bottom: 20px !important;
        page-break-inside: avoid;
    }

    .stat-card {
        display: inline-block !important;
        width: 23% !important;
        margin-right: 1.5% !important;
        border-radius: 8px !important;
    }

    .stat-value {
        color: #000 !important;
    }

    table {
        min-width: 100% !important;
        border: 1px solid #ccc !important;
    }

    thead th {
        background: #f8f9fa !important;
        color: #000 !important;
        border-bottom: 2px solid #000 !important;
    }

    tbody td {
        border-bottom: 1px solid #eee !important;
        color: #333 !important;
    }

    .status-badge {
        border: 1px solid #ddd !important;
        color: #000 !important;
    }

    .page-avatar {
        background: #eee !important;
        color: #000 !important;
        border: 1px solid #ddd !important;
    }

    /* Keep table showing all rows */
    .table-wrapper {
        overflow: visible !important;
    }

    @page {
        margin: 1cm;
        size: landscape;
    }
}

/* ============== RECHECK COMPARISON MODAL ============== */

.recheck-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 20, 0.82);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recheck-modal-overlay.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.recheck-modal {
    background: #141c31;
    background: linear-gradient(145deg, #141c31, #1a2540);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(99, 102, 241, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    width: 100%;
    max-width: 960px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.94) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.recheck-modal-overlay.active .recheck-modal {
    transform: scale(1) translateY(0);
}

/* --- Modal Header --- */
.recheck-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
    background: rgba(99, 102, 241, 0.05);
    flex-shrink: 0;
}

.recheck-modal-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.recheck-modal-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
    animation: spin-slow 8s linear infinite;
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.recheck-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(99, 102, 241, 0.25);
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.recheck-modal-close:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: var(--accent-red);
    transform: rotate(90deg);
}

/* --- Summary Bar --- */
.recheck-summary-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.12);
    flex-shrink: 0;
}

.recheck-summary-card {
    padding: 18px 24px;
    text-align: center;
    border-right: 1px solid rgba(99, 102, 241, 0.1);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.recheck-summary-card:last-child {
    border-right: none;
}

.recheck-summary-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 3px;
    opacity: 0.7;
}

.recheck-summary-card.gain::before {
    background: var(--accent-green);
}

.recheck-summary-card.loss::before {
    background: var(--accent-red);
}

.recheck-summary-card.neutral::before {
    background: var(--accent-orange);
}

.recheck-summary-card.info::before {
    background: var(--accent-blue);
}

.rsc-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
}

.rsc-value {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1;
}

.recheck-summary-card.gain .rsc-value {
    color: var(--accent-green);
}

.recheck-summary-card.loss .rsc-value {
    color: var(--accent-red);
}

.recheck-summary-card.neutral .rsc-value {
    color: var(--accent-orange);
}

.recheck-summary-card.info .rsc-value {
    color: var(--accent-blue);
}

/* --- Comparison Table --- */
.recheck-table-wrap {
    overflow-y: auto;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-blue) rgba(0, 0, 0, 0.2);
}

.recheck-table-wrap::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.recheck-table-wrap::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.recheck-table-wrap::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 3px;
}

.recheck-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.recheck-table thead {
    background: rgba(15, 23, 42, 0.8);
    position: sticky;
    top: 0;
    z-index: 5;
}

.recheck-table thead th {
    padding: 12px 16px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: left;
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
    white-space: nowrap;
}

.recheck-table thead th:first-child {
    padding-left: 24px;
}

.recheck-table tbody tr {
    border-bottom: 1px solid rgba(99, 102, 241, 0.05);
    transition: background 0.2s ease;
    animation: rowFadeIn 0.4s ease both;
}

@keyframes rowFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.recheck-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.06);
}

.recheck-table tbody td {
    padding: 13px 16px;
    font-size: 13px;
    vertical-align: middle;
    color: var(--text-secondary);
}

.recheck-table tbody td:first-child {
    padding-left: 24px;
}

/* Before / After styled cells */
.recheck-before-cell {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    font-variant-numeric: tabular-nums;
}

.recheck-after-cell {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: var(--text-primary) !important;
    font-variant-numeric: tabular-nums;
}

/* Difference Badges */
.recheck-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.recheck-badge.gain {
    background: rgba(16, 185, 129, 0.14);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.recheck-badge.loss {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.recheck-badge.same {
    background: rgba(100, 116, 139, 0.12);
    color: var(--text-muted);
    border: 1px solid rgba(100, 116, 139, 0.2);
}

/* Trend Bars */
.trend-bar-wrap {
    width: 100px;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.trend-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.trend-bar.gain {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.trend-bar.loss {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.trend-bar.neutral {
    background: rgba(100, 116, 139, 0.4);
}

/* --- Modal Footer --- */
.recheck-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 28px;
    border-top: 1px solid rgba(99, 102, 241, 0.12);
    background: rgba(99, 102, 241, 0.03);
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .recheck-summary-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .recheck-modal {
        max-height: 95vh;
    }
}

/* ============== CONTEXT MENU ============== */
.context-menu {
    position: fixed;
    z-index: 10000;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 8px;
    display: none;
    animation: menu-fade-in 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(12px);
}

@keyframes menu-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.context-menu-item:hover {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-cyan);
}

.context-menu-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.context-menu-separator {
    height: 1px;
    background: var(--border-color);
    margin: 6px 4px;
}

.context-menu-header {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}