/* ====== ElixVPN — Premium Red & Black Theme ====== */

:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: rgba(20, 20, 30, 0.65);
    --bg-card-hover: rgba(30, 30, 45, 0.75);
    --bg-nav: rgba(12, 12, 20, 0.88);
    --border-color: rgba(255, 68, 68, 0.12);
    --border-glow: rgba(255, 68, 68, 0.25);

    --red-primary: #ff4444;
    --red-light: #ff6b6b;
    --red-dark: #cc0000;
    --red-glow: rgba(255, 68, 68, 0.4);

    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --text-muted: #55556a;

    --green: #44ff88;
    --green-bg: rgba(68, 255, 136, 0.12);
    --yellow: #ffcc44;
    --yellow-bg: rgba(255, 204, 68, 0.12);
    --orange: #ff8844;
    --blue: #4488ff;

    /* Layout */
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --max-width: 640px;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --speed: 0.3s;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(255, 68, 68, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(255, 68, 68, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

#app {
    position: relative;
    z-index: 1;
}

/* ====== Loading Screen ====== */

.loading-screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    z-index: 9999;
    transition: opacity 0.5s var(--ease), visibility 0.5s;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-ring {
    width: 56px;
    height: 56px;
    position: relative;
    margin-bottom: 20px;
}

.ring-segment {
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-radius: 50%;
}

.ring-segment:nth-child(1) {
    border-top-color: var(--red-primary);
    animation: spin 1s linear infinite;
}

.ring-segment:nth-child(2) {
    border-right-color: var(--red-light);
    animation: spin 1.5s linear infinite reverse;
    inset: 6px;
}

.ring-segment:nth-child(3) {
    border-bottom-color: var(--red-dark);
    animation: spin 2s linear infinite;
    inset: 12px;
}

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

.loader-text {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--red-primary), var(--red-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ====== Login View ====== */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 48px 36px;
    text-align: center;
    position: relative;
    z-index: 2;
    animation: cardEntrance 0.6s var(--ease) both;
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

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

.logo-section {
    margin-bottom: 36px;
}

.logo-icon svg {
    width: 72px;
    height: 72px;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 20px var(--red-glow));
}

.logo-title {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--red-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 4px;
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 36px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(255, 68, 68, 0.05);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 68, 68, 0.06);
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all var(--speed) var(--ease);
}

.feature-item:hover {
    background: rgba(255, 68, 68, 0.1);
    border-color: rgba(255, 68, 68, 0.15);
    color: var(--text-primary);
}

.feature-icon {
    font-size: 1.2rem;
}

.telegram-login-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

#tg-login-btn {
    min-height: 44px;
}

.login-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    max-width: 300px;
    line-height: 1.5;
}

/* Background decorations */
.login-bg-decor {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
}

.bg-orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(255, 68, 68, 0.08);
    top: -10%;
    left: -10%;
    animation: orbFloat 12s ease-in-out infinite;
}

.bg-orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(200, 0, 0, 0.06);
    bottom: -5%;
    right: -5%;
    animation: orbFloat 15s ease-in-out infinite reverse;
}

.bg-orb-3 {
    width: 200px;
    height: 200px;
    background: rgba(255, 100, 100, 0.04);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: orbPulse 8s ease-in-out infinite;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(30px, -20px);
    }

    66% {
        transform: translate(-20px, 20px);
    }
}

@keyframes orbPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
}

/* ====== Glass Card ====== */

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.glass-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 40px rgba(255, 68, 68, 0.05);
}

/* ====== Navbar ====== */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

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

.nav-logo {
    font-size: 1.4rem;
}

.nav-title {
    font-size: 1.15rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, var(--red-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all var(--speed) var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    color: var(--red-primary);
    background: rgba(255, 68, 68, 0.1);
}

/* ====== Dashboard Content ====== */

.dashboard-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 16px 80px;
}

/* ====== Status Hero ====== */

.status-hero {
    padding: 28px 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.status-hero::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 100%;
    background: radial-gradient(circle at 100% 50%, rgba(255, 68, 68, 0.08), transparent 70%);
    pointer-events: none;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.status-badge.active {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(68, 255, 136, 0.2);
}

.status-badge.expired {
    background: rgba(255, 68, 68, 0.1);
    color: var(--red-primary);
    border: 1px solid rgba(255, 68, 68, 0.2);
}

.status-badge.none {
    background: var(--yellow-bg);
    color: var(--yellow);
    border: 1px solid rgba(255, 204, 68, 0.2);
}

.status-badge.loading {
    background: rgba(136, 136, 160, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(136, 136, 160, 0.15);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.status-info h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.status-sub {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.status-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

/* ====== Tabs ====== */

.tabs-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border-radius: var(--radius-xs);
    transition: all var(--speed) var(--ease);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
    color: var(--text-primary);
    background: rgba(255, 68, 68, 0.12);
    box-shadow: 0 0 12px rgba(255, 68, 68, 0.08);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: tabFade 0.3s var(--ease) both;
}

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

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

/* ====== Cards ====== */

.card {
    margin-bottom: 16px;
    overflow: hidden;
}

.card-header {
    padding: 18px 20px 0;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 16px 20px 20px;
}

/* ====== Subscription Details ====== */

.key-info-grid {
    display: grid;
    gap: 12px;
}

.key-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-xs);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.key-info-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.key-info-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.key-link-section {
    margin-top: 16px;
}

.copyable-field {
    display: flex;
    gap: 8px;
    align-items: center;
}

.copyable-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: monospace;
    outline: none;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copyable-input:focus {
    border-color: var(--red-primary);
}

/* ====== Plans ====== */

.plans-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.plan-card {
    padding: 18px 14px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--speed) var(--ease);
    position: relative;
}

.plan-card:hover {
    background: rgba(255, 68, 68, 0.06);
    border-color: rgba(255, 68, 68, 0.3);
    transform: translateY(-2px);
}

.plan-card.popular::before {
    content: 'Популярно';
    position: absolute;
    top: -1px;
    right: -1px;
    background: linear-gradient(135deg, var(--red-primary), var(--red-dark));
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 0 var(--radius-sm) 0 var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.plan-price {
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--red-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-price-unit {
    font-size: 0.8rem;
    font-weight: 400;
    -webkit-text-fill-color: var(--text-secondary);
}

/* ====== Traffic ====== */

.traffic-bar-container {
    margin: 16px 0;
}

.traffic-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.traffic-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.traffic-bar-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--green), var(--red-primary));
    transition: width 1s var(--ease);
    position: relative;
}

.traffic-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2));
    border-radius: 0 6px 6px 0;
}

.traffic-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.traffic-stat {
    text-align: center;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-xs);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.traffic-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

/* Traffic packages */
.traffic-packages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.traffic-pkg {
    padding: 16px 12px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--speed) var(--ease);
}

.traffic-pkg:hover {
    background: rgba(255, 68, 68, 0.06);
    border-color: rgba(255, 68, 68, 0.3);
    transform: translateY(-2px);
}

.traffic-pkg-gb {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--red-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.traffic-pkg-price {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.traffic-pkg-discount {
    font-size: 0.72rem;
    color: var(--green);
    font-weight: 600;
    margin-top: 4px;
}

/* ====== Servers ====== */

.servers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.server-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-xs);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all var(--speed) var(--ease);
}

.server-item:hover {
    background: rgba(255, 68, 68, 0.04);
    border-color: rgba(255, 68, 68, 0.12);
}

.server-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.server-flag {
    font-size: 1.4rem;
}

.server-name {
    font-size: 0.92rem;
    font-weight: 600;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--green);
}

.server-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px rgba(68, 255, 136, 0.5);
}

/* ====== Buttons ====== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-xs);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--speed) var(--ease);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--red-primary), var(--red-dark));
    color: #fff;
    box-shadow: 0 4px 16px rgba(255, 68, 68, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(255, 68, 68, 0.45);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-accent {
    background: rgba(255, 68, 68, 0.12);
    color: var(--red-light);
    border: 1px solid rgba(255, 68, 68, 0.2);
}

.btn-accent:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.35);
}

.btn-copy {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all var(--speed) var(--ease);
    font-family: inherit;
    font-weight: 500;
}

.btn-copy:hover {
    color: var(--red-light);
    border-color: rgba(255, 68, 68, 0.3);
    background: rgba(255, 68, 68, 0.08);
}

.btn-copy.copied {
    color: var(--green);
    border-color: rgba(68, 255, 136, 0.3);
    background: rgba(68, 255, 136, 0.08);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 0.82rem;
}

/* ====== Inputs ====== */

.input-field {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: all var(--speed) var(--ease);
}

.input-field:focus {
    border-color: var(--red-primary);
    box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.1);
}

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

/* ====== Promo Form ====== */

.promo-form {
    display: flex;
    gap: 10px;
}

.promo-form .input-field {
    flex: 1;
}

.promo-result {
    margin-top: 10px;
    font-size: 0.85rem;
    min-height: 20px;
}

.promo-result.success {
    color: var(--green);
}

.promo-result.error {
    color: var(--red-primary);
}

/* ====== No Subscription ====== */

.no-sub-container {
    text-align: center;
    padding: 24px 0;
}

.no-sub-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    filter: grayscale(0.3);
}

.no-sub-text {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* ====== Skeleton ====== */

.skeleton-loader {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-line.short {
    width: 60%;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ====== Toast ====== */

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px 24px;
    font-size: 0.88rem;
    color: var(--text-primary);
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s var(--ease);
    max-width: 90%;
    text-align: center;
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.toast.success {
    border-color: rgba(68, 255, 136, 0.3);
}

.toast.error {
    border-color: rgba(255, 68, 68, 0.3);
}

/* ====== Responsive ====== */

@media (max-width: 480px) {
    .login-card {
        padding: 36px 24px;
    }

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

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

    .traffic-packages-grid {
        grid-template-columns: 1fr;
    }

    .promo-form {
        flex-direction: column;
    }

    .status-hero {
        padding: 20px 16px;
    }

    .tabs-bar {
        overflow-x: auto;
    }
}

/* ====== Scrollbar ====== */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 68, 68, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 68, 68, 0.35);
}

/* ====== Selection ====== */

::selection {
    background: rgba(255, 68, 68, 0.3);
    color: #fff;
}

/* ====== Devices Section ====== */

.no-devices-container {
    text-align: center;
    padding: 30px 10px;
}

.no-devices-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.6;
}

.no-devices-text {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.no-devices-hint {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

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

.devices-count {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.devices-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.device-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.device-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-glow);
}

.device-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 68, 68, 0.08);
    border-radius: var(--radius-xs);
}

.device-info {
    flex: 1;
    min-width: 0;
}

.device-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.device-details {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 3px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.device-last-used {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.device-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 6px;
    border-radius: var(--radius-xs);
    transition: background var(--speed) var(--ease);
    opacity: 0.5;
    flex-shrink: 0;
}

.device-delete-btn:hover {
    background: rgba(255, 68, 68, 0.15);
    opacity: 1;
}

/* ====== Traffic Sync Info ====== */

.traffic-sync-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.sync-icon {
    font-size: 0.85rem;
    opacity: 0.7;
}

.sync-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    flex: 1;
}

.btn-refresh {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.2);
    color: var(--red-light);
    cursor: pointer;
    font-size: 1rem;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--speed) var(--ease);
    flex-shrink: 0;
}

.btn-refresh:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.4);
    transform: rotate(180deg);
}

.btn-refresh:active {
    transform: rotate(360deg);
}
