:root {
    --bg-primary: #09090b;
    --bg-secondary: #18181b;
    --bg-card: #1f1f23;
    --bg-card-hover: #27272a;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-soft: rgba(59, 130, 246, 0.1);
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, 0.1);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.1);
    --error: #ef4444;
    --error-soft: rgba(239, 68, 68, 0.1);
    --purple: #8b5cf6;
    --purple-soft: rgba(139, 92, 246, 0.1);
    --border: rgba(255, 255, 255, 0.06);
    --radius: 12px;
    --radius-lg: 16px;
}

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

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

.app { max-width: 100%; min-height: 100vh; padding-bottom: 80px; }

.page { display: none; }
.page.active { display: block; }

.header {
    padding: 20px;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, transparent 100%);
}

.profile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

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

.profile-name {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    padding: 3px 10px;
    background: var(--success-soft);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    color: var(--success);
}

.profile-badge.admin { background: var(--accent-soft); color: var(--accent); }
.profile-badge svg { width: 12px; height: 12px; }

.section { padding: 0 20px; margin-top: 24px; }

.section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

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

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.card:active { transform: scale(0.98); background: var(--bg-card-hover); }

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.card-icon svg { width: 20px; height: 20px; }
.card-icon.blue { background: var(--accent-soft); color: var(--accent); }
.card-icon.green { background: var(--success-soft); color: var(--success); }
.card-icon.orange { background: var(--warning-soft); color: var(--warning); }
.card-icon.red { background: var(--error-soft); color: var(--error); }
.card-icon.purple { background: var(--purple-soft); color: var(--purple); }

.card-title { font-size: 14px; font-weight: 500; }
.card-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.sub-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 20px;
}

.sub-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sub-plan { font-size: 16px; font-weight: 600; }
.sub-details { display: flex; gap: 24px; }
.sub-detail { flex: 1; }
.sub-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.sub-value { font-size: 14px; font-weight: 500; }

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.active { background: var(--success-soft); color: var(--success); }
.badge.closed { background: var(--text-muted); color: var(--bg-primary); background: rgba(113, 113, 122, 0.2); color: var(--text-muted); }
.badge.open { background: var(--accent-soft); color: var(--accent); }
.badge.pending { background: var(--warning-soft); color: var(--warning); }
.badge.rejected { background: var(--error-soft); color: var(--error); }
.badge.setup { background: var(--purple-soft); color: var(--purple); }

.page-header { padding: 20px; background: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, transparent 100%); }
.page-title { font-size: 24px; font-weight: 700; }
.page-subtitle { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }

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

.list-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 16px;
}

.list-item.clickable { cursor: pointer; transition: background 0.2s; }
.list-item.clickable:active { background: var(--bg-card-hover); }

.list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.list-title { font-size: 14px; font-weight: 600; }
.list-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.list-meta { font-size: 12px; color: var(--text-muted); }
.list-price { font-size: 14px; font-weight: 600; color: var(--success); margin-bottom: 4px; }
.list-action { font-size: 12px; color: var(--accent); margin-top: 8px; font-weight: 500; }
.list-action.pending { color: var(--warning); }

.empty { text-align: center; padding: 40px 20px; }
.empty-icon { width: 48px; height: 48px; color: var(--text-muted); margin: 0 auto 12px; display: block; }
.empty-text { color: var(--text-secondary); font-size: 14px; }

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn svg { width: 18px; height: 18px; }

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:active { background: var(--accent-hover); transform: scale(0.98); }

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:active { background: var(--bg-card-hover); }

.nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.2s;
    font-size: 10px;
    font-weight: 500;
}

.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--accent); }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

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

.modal {
    background: var(--bg-secondary);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

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

.modal-handle { width: 36px; height: 4px; background: var(--border); border-radius: 2px; margin: 10px auto; }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 18px; font-weight: 600; }
.modal-body { padding: 20px; }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 8px; }

.form-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input:focus { outline: none; border-color: var(--accent); }
.form-input::placeholder { color: var(--text-muted); }
textarea.form-input { min-height: 100px; resize: vertical; }

.region-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.region-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.region-item:active { transform: scale(0.98); }
.region-item.selected { border-color: var(--accent); background: var(--accent-soft); }
.region-flag { font-size: 24px; }
.region-name { font-size: 10px; color: var(--text-secondary); text-align: center; line-height: 1.2; }

.budget-options { display: flex; flex-direction: column; gap: 10px; }

.budget-option {
    position: relative;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.budget-option:active { transform: scale(0.98); }
.budget-option.selected { border-color: var(--accent); background: var(--accent-soft); }

.budget-option.featured { border-color: var(--accent); }
.budget-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    padding: 2px 8px;
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
}

.budget-amount { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.budget-name { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

.budget-features {
    margin-top: 10px;
    padding-left: 0;
    list-style: none;
}

.budget-features li {
    font-size: 12px;
    color: var(--text-muted);
    padding: 2px 0;
}

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

.tariff-card.featured { border-color: var(--accent); }

.tariff-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
}

.tariff-header { display: flex; align-items: center; gap: 14px; }

.tariff-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tariff-icon svg { width: 24px; height: 24px; }
.tariff-name { font-size: 16px; font-weight: 600; }
.tariff-price { font-size: 24px; font-weight: 700; color: var(--accent); }
.tariff-price span { font-size: 14px; font-weight: 400; color: var(--text-muted); }

.tariff-features {
    margin-top: 16px;
    padding-left: 0;
    list-style: none;
}

.tariff-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 6px 0;
}

.tariff-features li svg { width: 16px; height: 16px; color: var(--success); flex-shrink: 0; }

.vless-info { text-align: center; margin-bottom: 20px; }
.vless-price { font-size: 32px; font-weight: 700; color: var(--accent); }
.vless-price span { font-size: 16px; color: var(--text-muted); }
.vless-info p { margin-top: 12px; color: var(--text-secondary); font-size: 14px; }

.profile-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 16px;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.profile-row:last-child { border-bottom: none; }

.profile-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.profile-label svg { width: 18px; height: 18px; }
.profile-value { font-size: 14px; font-weight: 500; }

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

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 16px;
    text-align: center;
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}

.stat-icon svg { width: 18px; height: 18px; }
.stat-value { font-size: 24px; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.chat-container { display: flex; flex-direction: column; height: calc(100vh - 140px); }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
}

.chat-message.user {
    align-self: flex-end;
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.admin {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.chat-message-content { font-size: 14px; line-height: 1.4; }
.chat-message-time { font-size: 10px; opacity: 0.7; margin-top: 4px; text-align: right; }

.chat-input-container {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
}

.chat-input:focus { outline: none; border-color: var(--accent); }
.chat-input::placeholder { color: var(--text-muted); }

.chat-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-send:active { transform: scale(0.95); background: var(--accent-hover); }
.chat-send svg { width: 20px; height: 20px; }

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

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    z-index: 300;
    transition: transform 0.3s ease;
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--success); color: var(--success); }
.toast.error { border-color: var(--error); color: var(--error); }

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Device selector for VLESS */
.device-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.device-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.device-option:active { transform: scale(0.95); }
.device-option.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* Period selector for VLESS */
.period-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.period-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    gap: 4px;
}

.period-option:active { transform: scale(0.95); }
.period-option.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.period-discount {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--success);
    color: white;
    border-radius: 8px;
    font-weight: 600;
}

.period-option.selected .period-discount {
    background: var(--accent);
}

.discount-value {
    color: var(--success) !important;
    font-weight: 600;
}

/* VLESS summary */
.vless-summary {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.vless-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.vless-price-row.total {
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.vless-price-row.total span:last-child { color: var(--accent); }

/* Server connection data */
.server-connection-data {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.connection-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.conn-label {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 50px;
}

.conn-value {
    font-size: 13px;
    font-family: monospace;
    color: var(--accent);
}

.btn-copy {
    padding: 6px 12px;
    background: var(--accent-soft);
    color: var(--accent);
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

/* Server detail modal */
.server-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.server-region {
    font-size: 20px;
    font-weight: 700;
}

.server-info-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 16px;
    margin-bottom: 16px;
}

.info-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child { border-bottom: none; }

.info-label {
    font-size: 13px;
    color: var(--text-muted);
    min-width: 100px;
}

.info-value {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.btn-icon {
    padding: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.server-config-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card-hover);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.config-code {
    padding: 16px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.5;
    color: var(--accent);
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
}

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

/* Extra Cards Grid */
.extra-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.extra-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.extra-card:active {
    transform: scale(0.98);
    background: var(--bg-card-hover);
}

.extra-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.extra-icon.purple { background: var(--purple-soft); color: var(--purple); }
.extra-icon.blue { background: var(--accent-soft); color: var(--accent); }
.extra-icon.green { background: var(--success-soft); color: var(--success); }

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

.extra-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.extra-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.extra-arrow {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Referral Page */
.referral-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 20px;
    background: linear-gradient(180deg, var(--purple-soft) 0%, transparent 100%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.referral-icon {
    width: 64px;
    height: 64px;
    background: var(--purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.referral-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.referral-percent {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--purple) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.referral-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.how-it-works {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.how-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-num {
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.step-content { flex: 1; }

.step-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.step-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.referral-link-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ref-link-text {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 12px;
    color: var(--accent);
    word-break: break-all;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 8px;
}

.referral-note {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--accent-soft);
    border-radius: var(--radius);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.referral-note svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.referral-note p { font-size: 13px; color: var(--text-secondary); }

/* Instructions Page */
.platform-tabs {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.platform-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.platform-tab.active {
    background: var(--accent);
    color: white;
}

.platform-tab svg { opacity: 0.7; }
.platform-tab.active svg { opacity: 1; }

.platform-content { display: none; }
.platform-content.active { display: block; }

.instruction-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.instruction-step {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.instruction-step:last-child { border-bottom: none; }

.instruction-num {
    width: 28px;
    height: 28px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.instruction-content { flex: 1; }

.instruction-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.instruction-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.instruction-desc strong { color: var(--text-secondary); }

.btn-secondary.btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary.btn-sm:hover { background: var(--bg-primary); }

/* Speedtest Page */
.speedtest-notice {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: linear-gradient(135deg, var(--warning-soft) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-radius: var(--radius);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.notice-icon {
    width: 48px;
    height: 48px;
    background: var(--warning);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notice-icon svg { width: 24px; height: 24px; color: white; }

.notice-content { flex: 1; }

.notice-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--warning);
    margin-bottom: 4px;
}

.notice-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.speedtest-servers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.speedtest-server {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

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

.server-flag {
    font-size: 28px;
}

.server-info {}

.server-name {
    font-size: 15px;
    font-weight: 600;
}

.server-city {
    font-size: 12px;
    color: var(--text-muted);
}

.server-speed {
    text-align: right;
}

.speed-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--success);
}

.speed-unit {
    font-size: 11px;
    color: var(--text-muted);
}

.speedtest-note {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.speedtest-note svg { color: var(--warning); flex-shrink: 0; }
.speedtest-note p { font-size: 12px; color: var(--text-muted); }

/* Stats with colored icons */
.stat-icon.purple { background: var(--purple-soft); color: var(--purple); }
.stat-icon.green { background: var(--success-soft); color: var(--success); }