/* ==========================================================================
   Instagram Radar — Ultra Modern Premium Theme (Dark & Light)
   ========================================================================== */

:root {
    /* Color Tokens - Dark Mode Default */
    --bg-base: #0b0f19;
    --bg-surface: #111827;
    --bg-surface-elevated: #1f2937;
    --bg-glass: rgba(17, 24, 39, 0.75);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);

    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --primary-light: rgba(99, 102, 241, 0.15);

    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.15);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.15);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.15);
    --info: #06b6d4;
    --info-light: rgba(6, 182, 212, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.5);

    --sidebar-width: 270px;
    --topbar-height: 70px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.92);
    --border-subtle: #e2e8f0;
    --border-hover: #cbd5e1;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: rgba(79, 70, 229, 0.1);

    --success: #059669;
    --success-light: rgba(5, 150, 105, 0.1);
    --danger: #dc2626;
    --danger-light: rgba(220, 38, 38, 0.1);
    --warning: #d97706;
    --warning-light: rgba(217, 119, 6, 0.1);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.08);
}

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

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

a {
    color: inherit;
    text-decoration: none;
}

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

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    height: var(--topbar-height);
    padding: 0 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
}

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

.logo-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-badge {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Target Profile Widget in Sidebar */
.target-profile-widget {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.widget-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.target-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.target-card:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.target-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.target-info {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.target-username {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.verified-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #0095f6;
    color: #fff;
    font-size: 9px;
    font-weight: bold;
}

.target-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.target-empty {
    border-style: dashed;
    color: var(--text-muted);
}

.target-empty-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    padding: 18px 12px;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    padding: 0 12px 8px;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

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

.nav-link.active {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.nav-icon {
    flex-shrink: 0;
}

.nav-counter {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--bg-surface-elevated);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    line-height: 1.2;
}

.nav-link.active .nav-counter {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-color: transparent;
}

.nav-tag {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--danger);
    color: #fff;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    animation: pulse 2s infinite;
}

/* Period Quick Filter Pills */
.period-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.period-pill {
    padding: 7px 16px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.period-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.period-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.period-badge {
    background: rgba(0, 0, 0, 0.08);
    padding: 1px 6px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
}

[data-theme="dark"] .period-badge {
    background: rgba(255, 255, 255, 0.15);
}

.period-pill.active .period-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

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

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cron-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-online {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-offline {
    background: var(--danger);
}

.theme-toggle-btn {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: block; }
[data-theme="light"] .theme-icon-light { display: block; }
[data-theme="light"] .theme-icon-dark { display: none; }

/* Main Wrapper */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Topbar */
.app-topbar {
    height: var(--topbar-height);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

.mobile-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
}

.topbar-title-wrap {
    display: flex;
    flex-direction: column;
}

.page-main-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.page-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Page Container */
.page-container {
    padding: 28px 32px;
    flex: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-outline {
    background: var(--bg-surface-elevated);
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #059669;
}

/* Cards & Surfaces */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

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

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

.card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 24px;
}

/* Metric Cards Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.metric-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.metric-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.metric-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.metric-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.metric-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.trend-up {
    color: var(--success);
    font-weight: 600;
}

.trend-down {
    color: var(--danger);
    font-weight: 600;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-secondary {
    background: var(--bg-surface-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

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

.data-table th {
    background: var(--bg-surface-elevated);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.88rem;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background 0.15s;
}

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

/* User Profile Row Card */
.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-sm {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface-elevated);
}

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

.user-uname {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-fname {
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Radio Cards Grid */
.radio-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.radio-card {
    position: relative;
    cursor: pointer;
}

.radio-card input {
    position: absolute;
    opacity: 0;
}

.radio-card-content {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: var(--transition);
}

.radio-card input:checked + .radio-card-content {
    border-color: var(--primary);
    background: var(--primary-light);
}

.radio-card-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.radio-card-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: var(--transition);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

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

.modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
}

.modal-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* Progress bar */
.scan-progress-box {
    background: var(--bg-surface-elevated);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 12px;
}

.progress-bar-wrap {
    height: 8px;
    background: var(--border-subtle);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-bar-fill.indeterminate {
    width: 40%;
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    animation: indeterminate 1.5s infinite ease-in-out;
}

@keyframes indeterminate {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

.scan-log-msg {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 10px;
    line-height: 1.4;
}

/* Toast Container */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
    min-width: 280px;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-danger { border-left: 4px solid var(--danger); }
.toast.toast-info { border-left: 4px solid var(--info); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Filter Bar */
.filter-bar {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Pagination */
.pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-top: 1px solid var(--border-subtle);
}

.page-btn {
    padding: 6px 12px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
}

.page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 992px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.7);
    }
    .app-main {
        margin-left: 0;
    }
    .mobile-sidebar-toggle {
        display: block;
    }
    .page-container {
        padding: 20px 16px;
    }
    .radio-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Real-time Counter Pulse Animation */
@keyframes counterPulse {
    0% { transform: scale(1); }
    40% { transform: scale(1.35); background: var(--primary); color: #ffffff; }
    100% { transform: scale(1); }
}

.counter-pulse {
    animation: counterPulse 0.55s ease-out;
}

/* ==========================================================================
   Canlı Baloncuk / Top Akışı (Bubble Stream)
   ========================================================================== */

.bubble-stream-wrap {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-top: 24px;
    overflow: hidden;
}

.bubble-stream-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface-elevated);
}

.bubble-stream-scroll {
    overflow-x: auto;
    padding: 20px 22px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-hover) transparent;
}

.bubble-stream-scroll::-webkit-scrollbar {
    height: 6px;
}

.bubble-stream-scroll::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: var(--radius-full);
}

.bubble-stream {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    min-height: 120px;
}

.bubble-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    cursor: pointer;
    flex-shrink: 0;
    width: 86px;
    animation: bubbleBounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bubble-card:hover {
    transform: translateY(-5px) scale(1.04);
}

@keyframes bubbleBounceIn {
    0% { transform: scale(0.3) translateY(20px); opacity: 0; }
    70% { transform: scale(1.1) translateY(-3px); opacity: 1; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.bubble-ball {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    position: relative;
    padding: 3px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.bubble-ball img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: var(--bg-surface-elevated);
}

/* Değişim Türlerine Göre Renkli Parlayan Top Kenarlıkları */
.bubble-new-follower {
    border: 3px solid var(--success);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.25), 0 8px 16px rgba(5, 150, 105, 0.2);
}

.bubble-lost-follower {
    border: 3px solid var(--danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25), 0 8px 16px rgba(220, 38, 38, 0.2);
}

.bubble-new-following {
    border: 3px solid var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25), 0 8px 16px rgba(79, 70, 229, 0.2);
}

.bubble-lost-following {
    border: 3px solid var(--warning);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.25), 0 8px 16px rgba(217, 119, 6, 0.2);
}

.bubble-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    border: 2px solid var(--bg-surface);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.badge-new-follower { background: var(--success); }
.badge-lost-follower { background: var(--danger); }
.badge-new-following { background: var(--primary); }
.badge-lost-following { background: var(--warning); }

.bubble-username {
    font-size: 0.76rem;
    font-weight: 600;
    margin-top: 8px;
    max-width: 82px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    color: var(--text-primary);
}

.bubble-label {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    margin-top: 3px;
    text-align: center;
    white-space: nowrap;
}

.bubble-label.tag-new-follower { background: var(--success-light); color: var(--success); }
.bubble-label.tag-lost-follower { background: var(--danger-light); color: var(--danger); }
.bubble-label.tag-new-following { background: var(--primary-light); color: var(--primary); }
.bubble-label.tag-lost-following { background: var(--warning-light); color: var(--warning); }


