@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    color-scheme: dark;
    --bg-main: hsl(220, 20%, 8%);
    --bg-card: rgba(22, 28, 45, 0.45);
    --bg-card-hover: rgba(30, 41, 67, 0.65);
    --primary: hsl(201, 100%, 45%);
    --primary-light: hsl(201, 100%, 55%);
    --primary-dark: hsl(201, 100%, 35%);
    --primary-glow: rgba(0, 136, 204, 0.2);
    --accent: hsl(185, 100%, 48%);
    --accent-glow: rgba(0, 245, 245, 0.15);
    
    --success: hsl(145, 63%, 49%);
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: hsl(38, 92%, 50%);
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: hsl(350, 89%, 60%);
    --danger-bg: rgba(239, 68, 68, 0.1);
    
    --text: hsl(210, 20%, 98%);
    --text-soft: hsl(215, 15%, 75%);
    --text-muted: hsl(215, 10%, 50%);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(255, 255, 255, 0.18);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-sm: 0 4px 10px rgba(0,0,0,0.3);
    --shadow-md: 0 12px 30px rgba(0,0,0,0.45);
    --shadow-lg: 0 20px 50px rgba(0,0,0,0.6);
    --shadow-glow: 0 0 30px rgba(0, 136, 204, 0.3);
    
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-main);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Mesh Background Gradient */
.mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    background: radial-gradient(circle at 10% 20%, rgba(0, 136, 204, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(0, 245, 245, 0.06) 0%, transparent 45%),
                radial-gradient(circle at 50% 50%, rgba(10, 15, 30, 1) 0%, rgba(5, 7, 15, 1) 100%);
}

.mesh-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    top: -200px;
    left: calc(50% - 300px);
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
    animation: pulseGlow 10s infinite alternate;
}

@keyframes pulseGlow {
    0% { transform: scale(1) translate(0, 0); opacity: 0.7; }
    100% { transform: scale(1.15) translate(20px, 30px); opacity: 1; }
}

/* Typography & Layouts */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Nav Bar */
header {
    border-bottom: 1px solid var(--border-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 14, 25, 0.65);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 75px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    text-shadow: 0 0 15px var(--primary-glow);
}

.logo svg {
    color: var(--primary);
    filter: drop-shadow(0 0 8px var(--primary));
}

.logo span {
    background: linear-gradient(135deg, var(--text) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-item {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-soft);
    padding: 0.45rem 0.85rem;
    border-radius: 99px;
    transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item-tg {
    background: rgba(0, 136, 204, 0.12);
    border: 1px solid rgba(0, 136, 204, 0.3);
    color: #00a2ff !important;
    padding: 0.4rem 1rem;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    transition: var(--transition);
}

.nav-item-tg:hover {
    background: rgba(0, 136, 204, 0.22);
    border-color: rgba(0, 136, 204, 0.6);
    color: #ffffff !important;
    box-shadow: 0 0 15px rgba(0, 136, 204, 0.25);
}

.nav-item-tg svg {
    transition: transform 0.3s ease;
}

.nav-item-tg:hover svg {
    transform: scale(1.1) rotate(-10deg);
}

.lang-select-wrapper {
    position: relative;
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
}

.lang-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-soft);
    padding: 0.4rem 0.8rem;
    border-radius: 99px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.lang-select:hover {
    border-color: var(--border-glass-hover);
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0 2rem 0;
}

.hero-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    background: rgba(0, 245, 245, 0.08);
    padding: 0.35rem 1rem;
    border-radius: 99px;
    border: 1px solid rgba(0, 245, 245, 0.2);
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 3.2rem;
    line-height: 1.15;
    background: linear-gradient(135deg, #fff 40%, var(--primary-light) 70%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.hero p {
    color: var(--text-soft);
    font-size: 1.15rem;
    max-width: 650px;
    margin: 0 auto 2rem auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    padding: 0.75rem 2rem;
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.stat-value.pulse::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: dotPulse 1.8s infinite;
}

@keyframes dotPulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 15px var(--success); }
    100% { transform: scale(0.9); opacity: 0.6; }
}

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

/* Main Tab Area */
.tabs-container {
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.tabs-navigation {
    display: flex;
    justify-content: center;
    background: rgba(15, 20, 35, 0.8);
    border: 1px solid var(--border-glass);
    padding: 0.4rem;
    border-radius: var(--radius-lg);
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    backdrop-filter: blur(10px);
}

.tab-trigger {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-soft);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition);
    text-align: center;
}

.tab-trigger:hover {
    color: var(--text);
}

.tab-trigger.active {
    color: var(--text);
    background: var(--primary);
    box-shadow: var(--shadow-glow);
}

.tab-content {
    display: none;
    animation: tabFadeIn 0.4s ease forwards;
}

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

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: var(--border-glass-hover);
    box-shadow: var(--shadow-lg);
}

/* Proxy List UI controls */
.controls-bar {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1100px) {
    .controls-bar {
        grid-template-columns: 1fr;
    }
}

.select-wrapper {
    position: relative;
}

.input-control, .select-control {
    width: 100%;
    background: rgba(10, 14, 25, 0.8);
    border: 1px solid var(--border-glass);
    color: var(--text);
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.input-control:focus, .select-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 136, 204, 0.15);
}

.select-control option,
#langSelect option {
    background-color: hsl(220, 20%, 8%);
    color: hsl(210, 20%, 98%);
    padding: 0.5rem;
}

.list-stats {
    font-size: 0.85rem;
    color: var(--text-soft);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.5rem;
}

/* Proxy Card Elements */
.proxy-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.proxy-card {
    background: rgba(22, 28, 45, 0.45);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    position: relative;
    backdrop-filter: blur(10px);
}

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

.proxy-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.proxy-country {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 200px;
}

.flag-icon {
    width: 38px;
    height: 26px;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.05);
}

.country-details {
    display: flex;
    flex-direction: column;
}

.country-name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.proxy-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
}

.badge-mtproto {
    background: rgba(0, 136, 204, 0.12);
    color: var(--primary-light);
    border: 1px solid rgba(0, 136, 204, 0.25);
}

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

.proxy-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.latency {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
}

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

.speed-label {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Speed levels colors */
.speed-fast { color: var(--success); }
.speed-fast .latency-dot { background-color: var(--success); box-shadow: 0 0 8px var(--success); }
.speed-moderate { color: var(--warning); }
.speed-moderate .latency-dot { background-color: var(--warning); box-shadow: 0 0 8px var(--warning); }
.speed-slow { color: var(--danger); }
.speed-slow .latency-dot { background-color: var(--danger); box-shadow: 0 0 8px var(--danger); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: 99px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.25);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 136, 204, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-soft);
    border: 2px solid var(--border-glass);
}

.btn-outline:hover {
    color: var(--text);
    border-color: var(--text-soft);
    background: rgba(255,255,255,0.03);
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    color: var(--primary-light);
    border: 1px solid rgba(0, 136, 204, 0.3);
    background: rgba(0, 136, 204, 0.05);
}

.btn-icon:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 650px) {
    .proxy-card {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    .proxy-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .proxy-country {
        min-width: auto;
    }
    .proxy-meta {
        justify-content: space-between;
        margin-top: 0.25rem;
    }
    .action-buttons {
        justify-content: stretch;
    }
    .action-buttons .btn-primary {
        flex: 1;
    }
}

/* Checker Tool Elements */
.checker-wrapper {
    max-width: 750px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-soft);
}

.checker-result-box {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    background: rgba(10, 14, 25, 0.6);
    border: 1px solid var(--border-glass);
    display: none;
    animation: tabFadeIn 0.3s ease;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.result-status {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.detail-row {
    font-size: 0.9rem;
    color: var(--text-soft);
}

.detail-row strong {
    color: var(--text);
}

/* Submit Form */
.submit-wrapper {
    max-width: 650px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-help {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Guides Styles */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.guide-card {
    background: rgba(22, 28, 45, 0.45);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.guide-card:hover, .guide-card.active {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
}

.guide-card svg {
    color: var(--primary-light);
    margin-bottom: 0.75rem;
}

.guide-details {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-glass);
}

.guide-step {
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 3rem;
}

.step-num {
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.guide-step h4 {
    margin-bottom: 0.25rem;
}

.guide-step p {
    color: var(--text-soft);
    font-size: 0.95rem;
}

/* FAQ Accordion */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 800px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

.faq-card {
    background: rgba(22, 28, 45, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.faq-card h3 {
    color: var(--primary-light);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.faq-card p {
    color: var(--text-soft);
    font-size: 0.95rem;
}

/* Tables in guide text */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: rgba(10, 14, 25, 0.4);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-glass);
}

th, td {
    padding: 0.85rem 1.2rem;
    text-align: left;
    font-size: 0.9rem;
}

th {
    background: rgba(0, 136, 204, 0.15);
    color: var(--text);
    font-family: var(--font-heading);
    font-weight: 700;
}

td {
    border-bottom: 1px solid var(--border-glass);
    color: var(--text-soft);
}

tr:last-child td {
    border-bottom: none;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 7, 12, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 380px;
    padding: 2rem;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-lg);
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.06);
    border: none;
    color: var(--text-soft);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255,255,255,0.12);
    color: var(--text);
}

.qr-container {
    background: white;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    display: inline-block;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.qr-container img {
    display: block;
    width: 210px;
    height: 210px;
}

/* Floating Action Button for sharing */
.share-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 52px;
    height: 52px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-md), 0 0 15px var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 90;
}

.share-fab:hover {
    transform: scale(1.08) rotate(8deg);
    background: var(--primary-light);
    box-shadow: var(--shadow-lg), 0 0 25px var(--primary-glow);
}

.share-popover {
    position: fixed;
    bottom: 5.8rem;
    right: 2rem;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 0.4rem;
    display: none;
    flex-direction: column;
    gap: 0.2rem;
    box-shadow: var(--shadow-lg);
    z-index: 89;
    min-width: 170px;
    backdrop-filter: blur(10px);
    animation: popoverFade 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes popoverFade {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.share-popover.active {
    display: flex;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.share-option:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text);
}

.share-option svg {
    flex-shrink: 0;
}

/* Footer styling */
footer {
    border-top: 1px solid var(--border-glass);
    padding: 3rem 0;
    margin-top: 4rem;
    background: rgba(5, 7, 12, 0.65);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-soft);
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-about {
    max-width: 600px;
    margin: 1.5rem auto;
    font-size: 0.85rem;
    color: var(--text-soft);
    line-height: 1.6;
    opacity: 0.85;
}

.footer-about p {
    margin-bottom: 0.75rem;
}

.footer-about strong {
    color: var(--text);
    font-size: 0.95rem;
}

.footer-contact-info {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-contact-info a {
    color: var(--primary-light) !important;
    text-decoration: none;
}

.footer-contact-info a:hover {
    text-decoration: underline;
}

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

.footer-regions {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.01);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.region-title {
    font-size: 0.85rem;
    color: var(--text-soft);
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.region-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
}

.region-links a {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.region-links a:hover {
    color: var(--accent);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border-glass);
    border-left: 4px solid var(--primary);
    color: var(--text);
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: toastSlide 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}

@keyframes toastSlide {
    from { opacity: 0; transform: translateX(50px) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
}

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

/* Multi-language direction utility */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .guide-step {
    padding-left: 0;
    padding-right: 3rem;
}

[dir="rtl"] .step-num {
    left: auto;
    right: 0;
}

[dir="rtl"] .toast-container {
    right: auto;
    left: 20px;
}

/* ==========================================================================
   Mobile Responsiveness Overrides
   ========================================================================== */

@media (max-width: 1100px) {
    /* Container padding adjustment */
    .container {
        padding: 0 1rem;
    }

    /* Logo adjustment */
    .logo {
        font-size: 1.25rem;
        gap: 0.5rem;
    }
    
    .logo svg {
        width: 24px;
        height: 24px;
    }

    /* Hamburger Menu Button */
    .hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border-glass);
        border-radius: var(--radius-sm);
        color: var(--text);
        cursor: pointer;
        z-index: 101;
        transition: var(--transition);
    }
    
    .hamburger:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: var(--border-glass-hover);
    }

    /* Mobile Navigation Drawer */
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: rgba(10, 14, 25, 0.96);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border-left: 1px solid var(--border-glass);
        padding: 6rem 1.5rem 2rem 1.5rem;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 1rem;
        z-index: 100;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 35px rgba(0, 0, 0, 0.6);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-item {
        width: 100%;
        text-align: left;
        padding: 0.8rem 1.2rem;
        border-radius: var(--radius-md);
    }

    .nav-item-tg {
        display: flex;
        justify-content: flex-start;
        width: 100%;
        box-sizing: border-box;
    }

    /* Language dropdown in drawer */
    .nav-links > div {
        margin-left: 0 !important;
        margin-top: 1rem;
        width: 100%;
    }

    .nav-links select {
        width: 100%;
        box-sizing: border-box;
        padding: 0.75rem 1.2rem !important;
        font-size: 0.95rem !important;
        background-color: rgba(10, 14, 25, 0.8) !important;
    }

    /* RTL overrides for navigation drawer */
    [dir="rtl"] .nav-links {
        right: auto;
        left: 0;
        border-left: none;
        border-right: 1px solid var(--border-glass);
        box-shadow: 10px 0 35px rgba(0, 0, 0, 0.6);
        transform: translateX(-100%);
    }

    [dir="rtl"] .nav-links.active {
        left: 0;
        right: auto;
        transform: translateX(0);
    }

    [dir="rtl"] .nav-item {
        text-align: right;
    }

    /* Hero Section styling */
    .hero {
        padding: 3rem 0 1.5rem 0;
    }

    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
        width: 100%;
    }

    .stat-item {
        width: 100%;
        max-width: 320px;
        padding: 0.6rem 1.5rem;
    }

    .stat-value {
        font-size: 1.6rem;
    }

    /* Glass card padding */
    .glass-card {
        padding: 1.5rem;
        border-radius: var(--radius-md);
    }

    /* Controls Bar 2x2 grid */
    .controls-bar {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .controls-bar button {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    /* Tabs navigation scrollbar wrapper */
    .tabs-navigation {
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-md);
        padding: 0.3rem;
        max-width: 100%;
        margin-bottom: 1.5rem;
    }

    .tabs-navigation::-webkit-scrollbar {
        display: none;
    }

    .tab-trigger {
        flex: 0 0 auto;
        padding: 0.7rem 1.1rem;
        font-size: 0.88rem;
    }
}

@media (max-width: 480px) {
    /* Logo smaller screen */
    .logo {
        font-size: 1.15rem;
    }

    /* Controls Bar single column */
    .controls-bar {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .controls-bar button {
        grid-column: span 1;
    }

    /* Card adjustments */
    .glass-card {
        padding: 1rem;
    }
}

@media (max-width: 650px) {
    .proxy-card {
        padding: 1.25rem 1rem;
    }
    
    .proxy-info {
        width: 100%;
    }

    .proxy-meta {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        padding-top: 0.6rem;
        margin-top: 0.4rem;
        gap: 0.5rem;
    }
    
    .proxy-meta span[style*="margin-left"] {
        margin-left: auto !important;
    }

    [dir="rtl"] .proxy-meta span[style*="margin-left"] {
        margin-left: 0 !important;
        margin-right: auto !important;
    }
}

/* Responsive Table scroll layer */
table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   Terminal & UI Mockup Styling
   ========================================================================== */
.terminal-mockup {
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.88rem;
    color: #c9d1d9;
    padding: 1.25rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    box-shadow: var(--shadow-md);
    position: relative;
    text-align: left;
}
.terminal-header {
    display: flex;
    gap: 6px;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}
.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }
.terminal-body {
    white-space: pre;
    line-height: 1.45;
}
.terminal-cmd { color: #58a6ff; font-weight: bold; }
.terminal-comment { color: #8b949e; }
.terminal-success { color: #3fb950; }

.tg-ui-mockup {
    background: #17212b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 340px;
    margin: 2rem auto;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-shadow: var(--shadow-lg);
    text-align: left;
}
.tg-ui-header {
    background: #24303f;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #101921;
}
.tg-ui-back {
    color: #5288c1;
    font-size: 1.2rem;
    cursor: pointer;
    font-weight: bold;
}
.tg-ui-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: white;
}
.tg-ui-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: #0e1621;
    color: #f5f5f5;
}
.tg-ui-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.tg-ui-label {
    font-size: 0.75rem;
    color: #647e94;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.tg-ui-input {
    background: #17212b;
    border: 1px solid #2f3e4e;
    color: white;
    padding: 0.65rem 0.85rem;
    border-radius: 6px;
    font-size: 0.92rem;
    outline: none;
}
.tg-ui-input:focus {
    border-color: #5288c1;
}
.tg-ui-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #17212b;
}
.tg-ui-switch {
    width: 38px;
    height: 20px;
    background: #5288c1;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
}
.tg-ui-switch::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    top: 2px;
    right: 2px;
}

/* Telegram Promo Banner CTA Styling */
.tg-promo-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.12) 0%, rgba(0, 245, 245, 0.04) 100%);
    border: 1px solid rgba(0, 136, 204, 0.22);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.75rem;
    margin-bottom: 1.5rem;
    gap: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 136, 204, 0.05);
    transition: var(--transition);
}

.tg-promo-banner:hover {
    border-color: rgba(0, 136, 204, 0.4);
    box-shadow: 0 12px 40px rgba(0, 136, 204, 0.1);
}

.tg-promo-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.tg-promo-icon {
    color: #00a2ff;
    filter: drop-shadow(0 0 8px rgba(0, 136, 204, 0.5));
    flex-shrink: 0;
}

.tg-promo-content h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.tg-promo-content p {
    font-size: 0.9rem;
    color: var(--text-soft);
    line-height: 1.4;
}

.tg-promo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0088cc;
    border: 1px solid #0088cc;
    color: white !important;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.6rem 1.5rem;
    border-radius: 99px;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
    transition: var(--transition);
}

.tg-promo-btn:hover {
    background: #00a2ff;
    border-color: #00a2ff;
    box-shadow: 0 6px 20px rgba(0, 162, 255, 0.4);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .tg-promo-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .tg-promo-content {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .tg-promo-btn {
        width: 100%;
    }
}

