:root {
    /* Colors */
    --color-bg-start: #0099ff;
    --color-bg-end: #0055ff;
    --color-white: #ffffff;
    --color-text-primary: #1a1f2e;
    --color-text-secondary: #5a6175;
    --color-text-light: #8b92a7;
    --color-primary: #007aff;
    --color-accent: #00c6ff;
    --color-success: #34c759;
    --skeleton-base: #e4e9f1;
    --skeleton-highlight: #f3f6fb;

    /* Gradients */
    --gradient-bg: linear-gradient(180deg, #2ebf91 0%, #8360c3 100%);
    /* Placeholder, will override in body */
    --gradient-app: linear-gradient(135deg, #00C6FF 0%, #0072FF 100%);
    --gradient-pill: linear-gradient(90deg, #00C6FF 0%, #0072FF 100%);

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Radius */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 50px;

    /* Fonts */
    --font-main: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background: var(--gradient-app);
    color: var(--color-text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
}

.app-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--gradient-app);
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: var(--spacing-md);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 4px;
    margin-bottom: 4px;
}

.logo {
    font-family: var(--font-main);
    font-weight: 800;
    font-size: 1.6rem;
    color: white;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Optional: Add a subtle glow or indicator if desired, but clean is better */
.logo::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #4ade80; /* Green dot for 'Secure' feel */
    border-radius: 50%;
    margin-top: 4px;
    box-shadow: 0 0 8px #4ade80;
}

/* Notification Button */
.notification-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary, #94a3b8);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.notification-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.1);
}

.notification-btn svg {
    width: 20px;
    height: 20px;
    color: white;
}

.browser-logout-btn {
    margin-left: 12px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: white;
    padding: 10px 14px;
    font-family: var(--font-main);
    font-size: 0.92rem;
    cursor: pointer;
}

.browser-auth-screen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 14, 26, 0.72);
    backdrop-filter: blur(12px);
}

.browser-auth-card {
    width: min(100%, 420px);
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

.browser-auth-logo {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.browser-auth-card h1 {
    font-size: 1.7rem;
    margin-bottom: 10px;
}

.browser-auth-subtitle,
.browser-auth-message {
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.browser-auth-link {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
}

.browser-auth-link:hover {
    text-decoration: underline;
}

.browser-auth-message {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(0, 122, 255, 0.08);
    color: var(--color-primary);
}

.browser-auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.browser-auth-tab {
    flex: 1;
    border: none;
    border-radius: 14px;
    padding: 12px;
    background: #eef3fb;
    color: var(--color-text-secondary);
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
}

.browser-auth-tab.active {
    background: var(--color-primary);
    color: white;
}

.browser-auth-form {
    display: none;
    flex-direction: column;
    gap: 10px;
}

.browser-auth-form.active {
    display: flex;
}

.browser-auth-form label {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.browser-auth-form input {
    width: 100%;
    border: 1px solid #dbe5f3;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: var(--font-main);
}

.browser-auth-submit {
    margin-top: 10px;
    border: none;
    border-radius: 16px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #007aff 0%, #00c6ff 100%);
    color: white;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #0f172a; /* Match bg color or transparent if header */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.badge.active {
    opacity: 1;
}

.logo-v {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.2);
    width: 60px;
    height: 60px;
    display: flex;
    /* Flex is better for centering */
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    /* Slight rounding for the logo container */
    backdrop-filter: blur(10px);
    /* Logo styling from image seems just a text V or an SVG. Let's use stylized text V for now */
    font-style: italic;
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Actually image shows a 3D-ish V icon. Let's make it simple */
    background: none;
    -webkit-text-fill-color: white;
}

.logo-v span {
    display: block;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Nav Tabs */
.nav-tabs-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-lg);
    width: 100%;
}

.nav-tabs {
    display: flex;
    background: transparent;
    gap: 8px;
    width: 100%;
    flex-wrap: nowrap;
}

.nav-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-main);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 10px 8px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 20px;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    line-height: 1.2;
    min-height: 44px;
}

.nav-tab-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-tab-label {
    display: block;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-tab.active {
    color: var(--color-primary);
    background: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-tab:active {
    transform: scale(0.96);
}

/* Small-screen adjustments for nav tabs */
@media (max-width: 420px) {
    .nav-tabs-wrapper {
        width: 100%;
        padding: 0 var(--spacing-sm);
    }

    .nav-tabs {
        width: 100%;
        gap: 6px;
    }

    .nav-tab {
        font-size: clamp(0.74rem, 2.7vw, 0.84rem);
        line-height: 1.15;
        padding: 10px 6px;
        gap: 4px;
    }

    .nav-tab-icon {
        width: 16px;
        height: 16px;
    }

    .nav-tab-label {
        max-width: 100%;
    }
}

@media (max-width: 379px) {
    .nav-tab {
        padding: 10px 4px;
    }

    .nav-tab-label {
        display: none;
    }

    .nav-tab-icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 340px) {
    .nav-tabs {
        gap: 4px;
    }

    .nav-tab {
        padding: 10px 2px;
    }

    .nav-tab-icon {
        width: 16px;
        height: 16px;
    }
}

/* Main Content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.tab-content {
    display: none;
    flex-direction: column;
    gap: var(--spacing-md);
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.card-title {
    color: #4da6ff;
    /* Light blue for titles */
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: var(--spacing-md);
    letter-spacing: 0.5px;
}

/* Profile Card Specifics */
.profile-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.profile-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.profile-col:nth-child(2) {
    flex: 1;
    margin: 0 12px;
    text-align: center;
    align-items: center;
}

.profile-col.right-align {
    align-items: flex-end;
    flex-shrink: 0;
}

.label {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.value.mono {
    font-family: var(--font-mono);
}

.status-pill {
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: #e0e0e0;
    color: #888;
    position: relative;
    overflow: hidden;
}

.status-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 2.5s infinite;
}

.status-pill.active {
    background: var(--gradient-pill);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 114, 255, 0.3);
}

.status-pill.active::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
}

.status-text {
    font-size: 0.9rem;
    font-weight: 600;
}

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

/* Subscription Card Specifics */
.subscription-layout {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.sub-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    flex: 1;
}

.sub-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
    align-items: flex-end;
    min-width: 140px;
    flex-shrink: 0;
}

.value.highlight {
    color: var(--color-text-primary);
    /* Just bold black */
}

.progress-bar-container {
    width: 100%;
    height: 24px;
    /* Thicker bar */
    background: #eef2f6;
    border-radius: var(--radius-pill);
    padding: 3px;
    margin-top: 4px;
    margin-bottom: 4px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.progress-bar {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-pill);
    border-radius: var(--radius-pill);
    box-shadow: 0 2px 8px rgba(0, 114, 255, 0.4);
    min-width: 10px;
    /* Ensure visibility */
    position: relative;
}

.progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 2s infinite;
}

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

.sub-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sub-item .label {
    margin-bottom: 0;
}

/* Buttons */
.actions {
    display: flex;
    gap: var(--spacing-md);
    margin-top: auto;
    /* Push to bottom */
    padding-top: var(--spacing-lg);
}

.btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border: none;
    border-radius: 20px;
    /* Highly rounded */
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-white {
    background: white;
    color: var(--color-text-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-white:active {
    transform: scale(0.98);
}

.btn-icon {
    width: 20px;
    height: 20px;
    color: #007aff;
    /* Blue icons */
}

/* Stats specific */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.referral-card .card-title,
.referral-stats-card .card-title {
    color: #2b7cff;
}

.referral-link-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.referral-link-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.referral-link-row .value {
    flex: 1;
    font-size: 0.95rem;
}

.config-url-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: var(--spacing-md);
}

.promo-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.promo-input-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.promo-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #dbe5f3;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: var(--font-main);
    color: var(--color-text-primary);
    background: #f8fbff;
    text-transform: uppercase;
}

.promo-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
    background: white;
}

.promo-submit-btn {
    min-height: 48px;
    padding-inline: 18px;
}

.promo-hint {
    color: var(--color-text-secondary);
    line-height: 1.45;
    font-size: 0.92rem;
}

.promo-message {
    display: none;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 0.94rem;
    line-height: 1.4;
}

.promo-message.active {
    display: block;
}

.promo-message.success {
    background: rgba(52, 199, 89, 0.12);
    color: #15803d;
}

.promo-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.config-url-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

#subscription-url {
    flex: 1;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.config-steps {
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
}

.config-steps li strong {
    color: var(--color-text-primary);
}

.instruction-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: var(--spacing-md);
    background: #f1f6ff;
    padding: 4px;
    border-radius: 14px;
}

.instr-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.instr-tab.active {
    background: white;
    color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.instruction-content {
    min-height: 200px;
}

.instr-panel {
    display: none;
    animation: fadeInInstr 0.3s ease;
}

.instr-panel.active {
    display: block;
}

@keyframes fadeInInstr {
    from {
        opacity: 0;
        transform: translateX(5px);
    }

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

.app-recommend {
    background: #f8fbff;
    border-left: 4px solid var(--color-primary);
    padding: 12px;
    border-radius: 4px 12px 12px 4px;
    margin-bottom: var(--spacing-md);
}

.app-info {
    margin-top: 4px;
    font-size: 1rem;
    color: var(--color-text-primary);
}

.instr-links {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed #eef2f6;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.instr-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.instr-link:after {
    content: '→';
    font-size: 1.1rem;
}

.instr-link:hover {
    opacity: 0.8;
}

.btn-copy {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 12px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.25);
    white-space: nowrap;
}

.btn-copy:active {
    transform: scale(0.98);
}

.btn-copy:disabled {
    opacity: 0.5;
    cursor: default;
    box-shadow: none;
}

.referral-stats-grid .stats-item {
    background: #f1f6ff;
}

.stats-item {
    background: #f5f8fa;
    padding: 12px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.section-subtitle {
    color: white;
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    padding-left: 4px;
    opacity: 0.9;
}

/* Servers List */
.servers-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* No Subscription View */
.no-subscription-card {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    gap: var(--spacing-lg);
    animation: fadeIn 0.4s ease;
    margin-top: var(--spacing-xl);
}

.no-sub-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.no-sub-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 166, 0, 0.1);
    color: #ffa600;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.no-sub-icon svg {
    width: 100%;
    height: 100%;
}

.no-sub-text {
    color: var(--color-text-secondary);
    line-height: 1.5;
    font-size: 1.05rem;
}

.btn-buy-large {
    width: 100%;
    background: var(--gradient-app);
    color: white;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 114, 255, 0.3);
    transition: transform 0.2s;
    font-family: var(--font-main);
}

.btn-buy-large:active {
    transform: scale(0.98);
}

.server-card {
    background: white;
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 700;
}

.server-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    margin-right: 12px;
}

.server-stats-row {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.stat-mini {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-mini .label {
    font-size: 0.7rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

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

.server-limit {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.server-status {
    width: 10px;
    height: 10px;
    background: #e0e0e0;
    border-radius: 50%;
}

.server-status.online {
    background: var(--color-success);
    box-shadow: 0 0 8px rgba(52, 199, 89, 0.4);
}

/* Responsive adjustments */
@media (max-width: 360px) {
    .subscription-layout {
        flex-direction: column;
    }

    .sub-right {
        text-align: left;
        align-items: flex-start;
        min-width: 100%;
        margin-top: 16px;
    }

    .referral-link-row,
    .config-url-row,
    .promo-input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-copy,
    .promo-submit-btn {
        width: 100%;
    }

    .logo-v {
        font-size: 2.5rem;
    }
}

.loading-spinner {
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Skeleton loading */
body.loading .loading-spinner {
    display: none;
}

.skeleton-text {
    display: inline-block;
    position: relative;
}

body.loading .skeleton-text {
    color: transparent;
    min-width: 80px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-highlight) 50%, var(--skeleton-base) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

body.loading .skeleton-text.narrow {
    min-width: 56px;
}

body.loading .skeleton-text.wide {
    min-width: 140px;
}

body.loading .skeleton-pill {
    color: transparent;
    box-shadow: none;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-highlight) 50%, var(--skeleton-base) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

body.loading .progress-bar-container {
    background: var(--skeleton-base);
    box-shadow: none;
}

body.loading .progress-fill {
    width: 100%;
    min-width: 0;
    background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-highlight) 50%, var(--skeleton-base) 75%);
    background-size: 200% 100%;
    box-shadow: none;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.servers-skeleton {
    display: none;
    flex-direction: column;
    gap: var(--spacing-md);
}

body.loading .servers-skeleton {
    display: flex;
}

.skeleton-card {
    background: white;
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
}

.skeleton-row {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.skeleton-block {
    border-radius: 10px;
    background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-highlight) 50%, var(--skeleton-base) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.skeleton-block.wide {
    width: 100%;
}

.skeleton-block.lg {
    height: 18px;
}

.skeleton-block.md {
    height: 12px;
    flex: 1;
}

.skeleton-block.sm {
    height: 10px;
    width: 60%;
    margin-top: 12px;
}

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

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

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: var(--spacing-lg);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 85vh;
    overflow-y: auto;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.close-modal {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 4px;
}

.close-modal svg {
    width: 24px;
    height: 24px;
}

.plans-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.plan-card {
    background: #f5f8fa;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-card:active {
    background: #eef2f6;
    transform: scale(0.98);
}

.plan-card.selected {
    border-color: var(--color-primary);
    background: rgba(0, 122, 255, 0.05);
}

.plan-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.plan-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text-primary);
}

.plan-desc {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.plan-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-primary);
}

.plan-button {
    width: 100%;
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 16px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    margin-top: var(--spacing-lg);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 114, 255, 0.3);
    transition: transform 0.2s;
}

.plan-button:active {
    transform: scale(0.98);
}

/* Referral Info Card */
.referral-info-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(245, 250, 255, 1) 100%);
}

.referral-info-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(0, 122, 255, 0.04);
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(0, 122, 255, 0.08);
    transition: all 0.3s ease;
}

.info-item:hover {
    background: rgba(0, 122, 255, 0.07);
    transform: translateY(-1px);
}

.info-icon {
    width: 44px;
    height: 44px;
    background: white;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.12);
    flex-shrink: 0;
}

.info-icon svg {
    width: 22px;
    height: 22px;
}

.info-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.info-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--color-text-primary);
}

.info-desc {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.3;
}

/* Notifications List */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 4px;
    max-height: 70vh;
    overflow-y: auto;
}

.notification-item {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    gap: 12px;
    transition: all 0.2s ease;
}

.notification-item.unread {
    background: rgba(0, 122, 255, 0.06);
    border-color: rgba(0, 122, 255, 0.15);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #94a3b8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.notification-item.unread .notification-icon {
    color: var(--color-primary);
}

.notification-content {
    flex: 1;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.notification-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text-primary);
}

.notification-time {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    white-space: nowrap;
    margin-left: 8px;
}

.notification-message {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary, #64748b);
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-text-action {
    background: transparent;
    border: none;
    color: var(--color-primary);
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-text-action:active {
    background: rgba(0, 122, 255, 0.1);
    transform: scale(0.98);
}

.notification-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.btn-delete-notif {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--color-text-light);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    width: 24px;
    height: 24px;
    opacity: 0.6;
}

.btn-delete-notif svg {
    width: 16px;
    height: 16px;
}

.btn-delete-notif:active {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    opacity: 1;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary, #94a3b8);
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
}

.icon-btn:active {
    background: rgba(0, 0, 0, 0.05);
}
