/* ==========================================================================
   Base Styles and Variables
   ========================================================================== */

:root {
    /* Modern Theme Colors */
    --primary-dark: #1a1f2c;
    --primary-light: #f8f9fa;
    --accent-primary: #4f46e5;
    --accent-secondary: #3b82f6;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --neutral-50: #f9fafb;
    --neutral-100: #f3f4f6;
    --neutral-200: #e5e7eb;
    --neutral-300: #d1d5db;
    --neutral-400: #9ca3af;
    --neutral-500: #6b7280;
    --neutral-600: #4b5563;
    --neutral-700: #374151;
    --neutral-800: #1f2937;
    --neutral-900: #111827;

    /* Modern Gradient Colors */
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    --gradient-2: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-3: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    --gradient-4: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    
    /* Glass Effect */
    --glass-bg: rgba(15, 23, 42, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
    
    /* Enhanced Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    
    /* Theme Variables */
    --bg-primary: var(--primary-dark);
    --bg-secondary: #242937;
    --bg-tertiary: #2d3344;
    --text-primary: var(--primary-light);
    --text-secondary: var(--neutral-400);
    --border-color: var(--neutral-700);
    --accent-color: var(--accent-primary);
    --accent-hover: var(--accent-secondary);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --gradient-dark: linear-gradient(135deg, var(--neutral-800), var(--neutral-900));
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--gradient-4);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
}

/* ==========================================================================
   Layout & Components
   ========================================================================== */

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.logo img {
    height: 2.5rem;
    width: auto;
}

.logo span {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    margin-left: 2rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-right: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

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

.btn-login {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* Laptop and Desktop Styles */
@media (min-width: 1024px) {
    .nav-container {
        padding: 0 4rem;
    }

    .nav-links {
        gap: 3rem;
    }

    .nav-links a {
        font-size: 1.1rem;
    }

    .nav-buttons .btn {
        padding: 0.75rem 1.5rem;
    }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1023px) {
    .nav-container {
        padding: 0 2rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 1rem;
    }

    .nav-buttons .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Mobile Styles */
@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 4rem;
        left: 0;
        right: 0;
        background: rgba(17, 24, 39, 0.98);
        padding: 2rem;
        flex-direction: column;
        align-items: center;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        margin-left: 0;
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .nav-links {
        flex-direction: column;
        gap: 1.5rem;
        margin-right: 0;
        margin-bottom: 2rem;
        width: 100%;
        text-align: center;
    }

    .nav-buttons {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .nav-buttons .btn {
        width: 100%;
        text-align: center;
    }

    .logo span {
        font-size: 1.2rem;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 8rem 2rem 6rem;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
    animation: slideInLeft 1s ease-out forwards;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideInRight 0.5s ease-out forwards;
}

.stat:nth-child(1) { animation-delay: 0.6s; }
.stat:nth-child(2) { animation-delay: 0.7s; }
.stat:nth-child(3) { animation-delay: 0.8s; }

/* Features Section */
.features {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
    position: relative;
    z-index: 1;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: -1;
}

.feature-card:hover::before {
    transform: translateX(100%);
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Features Enhanced Section */
.features-enhanced {
    padding: 6rem 0;
    background: linear-gradient(145deg, var(--bg-dark), var(--bg-darker));
    position: relative;
    overflow: hidden;
}

.features-enhanced::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(var(--accent-rgb), 0.1) 0%, transparent 50%);
    top: -50%;
    left: -50%;
    animation: rotateGradient 30s linear infinite;
}

@keyframes rotateGradient {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
    position: relative;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.feature-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(225deg, 
        rgba(var(--accent-rgb), 0.6),
        rgba(var(--accent-rgb), 0.2),
        transparent 70%);
        -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, 
        rgba(var(--accent-rgb), 0.8),
        rgba(var(--accent-rgb), 0.4));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    position: relative;
    box-shadow: 0 8px 16px rgba(var(--accent-rgb), 0.2);
}

.feature-icon::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(225deg, 
        rgba(255, 255, 255, 0.8),
        rgba(255, 255, 255, 0.2));
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.feature-icon i {
    font-size: 2rem;
    color: var(--text-primary);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.feature-card h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0 auto;
    max-width: 280px;
}

/* Enhanced animations */
@keyframes featureCardIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.feature-card {
    animation: featureCardIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

/* Responsive refinements */
@media (max-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .features-enhanced {
        padding: 4rem 0;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 1.5rem;
        margin-top: 3rem;
    }

    .feature-card {
        padding: 2rem 1.5rem;
    }

    .feature-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 1.5rem;
    }

    .feature-icon i {
        font-size: 1.75rem;
    }

    .feature-card h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .feature-card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .features-enhanced {
        padding: 3rem 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .feature-card {
        padding: 1.75rem 1.25rem;
    }
}

/* Locations Section */
.locations {
    padding: 6rem 2rem;
    background: var(--bg-tertiary);
}

.location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.location-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.location-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.country-flag {
    width: 40px;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.location-info h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.server-status {
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    background: rgba(52, 211, 153, 0.2);
    color: #34D399;
}

.server-status.available {
    background: rgba(52, 211, 153, 0.2);
    color: #34D399;
}

.server-status.busy {
    background: rgba(251, 191, 36, 0.2);
    color: #FBB224;
}

.server-status.offline {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.btn-connect {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-connect:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.btn-connect.connecting {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

.btn-connect.connected {
    background: #34D399;
}

.connection-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.btn-connect.connecting .connection-status {
    animation: pulse 1.5s infinite;
}

.btn-connect.connected .connection-status {
    background: #ffffff;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Speed Test Section */
.speed-test {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
}

.speed-test-container {
    max-width: 1200px;
    margin: 0 auto;
}

.speed-graph-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    height: 450px;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.speed-graph-container:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.speed-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.metric-card h3 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.current-speed,
.average-speed,
.peak-speed {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 1rem 0;
    font-family: 'Poppins', sans-serif;
}

.speed-test-controls {
    text-align: center;
    margin-top: 2rem;
}

.test-progress {
    max-width: 500px;
    margin: 2rem auto 0;
    background: var(--bg-tertiary);
    border-radius: 100px;
    height: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.test-progress-bar {
    height: 100%;
    width: 0;
    background: var(--gradient-1);
    transition: width 0.3s ease;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
}

.test-progress-text {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .speed-metrics {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .speed-graph-container {
        height: 350px;
        padding: 1rem;
    }
    
    .metric-card {
        padding: 1.5rem;
    }
    
    .current-speed,
    .average-speed,
    .peak-speed {
        font-size: 2rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .speed-graph-container {
        height: 400px;
    }
}

/* Pricing Section */
.pricing {
    padding: 6rem 2rem;
    background: var(--bg-tertiary);
}

.pricing h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.pricing-card:nth-child(1) { animation-delay: 0.2s; }
.pricing-card:nth-child(2) { animation-delay: 0.3s; }
.pricing-card:nth-child(3) { animation-delay: 0.4s; }

.pricing-card.featured {
    background: var(--gradient-primary);
    transform: scale(1.05);
}

.pricing-card.featured::after {
    content: 'Popular';
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--gradient-2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    box-shadow: var(--shadow-md);
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.pricing-header {
    margin-bottom: 2rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1rem 0;
}

.price span {
    font-size: 1rem;
    color: var(--text-secondary);
}

.pricing-features {
    list-style: none;
    margin: 2rem 0;
}

.pricing-features li {
    margin: 1rem 0;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    margin: 0.5rem 0;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Components
   ========================================================================== */

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300%;
    height: 300%;
}

.btn-primary {
    background: var(--gradient-1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Cards */
.feature-card,
.location-card,
.pricing-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

/* ==========================================================================
   Media Queries
   ========================================================================== */

/* Mobile - Small */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .feature-card,
    .location-card,
    .pricing-card {
        padding: 1.5rem;
    }
}

/* Mobile - Medium */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 720px;
    }
    
    .feature-grid,
    .location-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .container {
        max-width: 1140px;
    }
    
    .feature-grid,
    .location-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .features-grid, .pricing-grid {
        gap: 1.5rem;
        padding: 0 1rem;
    }
}

@media (max-width: 992px) {
    .hero {
        padding: 6rem 1.5rem 3rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
    }
    
    .nav-container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 0;
    }
    
    .nav-container {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
        text-align: center;
    }
    
    .nav-buttons {
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .feature-card, .pricing-card {
        padding: 1.5rem;
    }
    
    .speed-metrics {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .stat {
        width: 100%;
        justify-content: center;
    }
}

/* Enhanced Interactive Elements */
.feature-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.pricing-card {
    transition: all 0.3s ease;
}

.btn-primary:hover {
    animation: pulse 1s infinite;
    transform-origin: center;
}

.hero-image img {
    animation: float 3s ease-in-out infinite;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhanced Loading States */
.btn-primary.loading {
    position: relative;
    overflow: hidden;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: loading 1.5s infinite;
}

@keyframes loading {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(100%);
    }
}

/* Enhanced Hover Effects */
.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1000;
}

.hamburger {
    display: block;
    position: relative;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease-in-out;
}

.hamburger::before {
    transform: translateY(-8px);
}

.hamburger::after {
    transform: translateY(8px);
}

/* Hamburger Animation */
.mobile-menu-toggle.active .hamburger {
    background: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
}

.mobile-menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        padding: 6rem 2rem 2rem;
        transition: right 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
        display: flex;
        flex-direction: column;
        gap: 2rem;
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
        animation: slideIn 0.3s ease forwards;
    }

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

    .nav-links {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        text-align: left;
    }

    .nav-links a {
        position: relative;
        padding: 1rem;
        width: 100%;
        text-align: left;
        transition: all 0.3s ease;
    }

    .nav-links a:hover {
        background: rgba(255, 255, 255, 0.05);
        padding-left: 1.5rem;
    }

    .nav-buttons {
        gap: 1rem;
    }

    .nav-buttons button {
        width: 100%;
        text-align: center;
    }

    /* Overlay when menu is open */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(3px);
        z-index: 100;
    }

    .nav-overlay.active {
        display: block;
    }
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    top: 10%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.3), transparent 70%);
    animation-delay: -5s;
}

.orb-2 {
    bottom: 20%;
    left: 15%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.3), transparent 70%);
    animation-delay: -10s;
}

.orb-3 {
    top: 50%;
    left: 50%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle at center, rgba(34, 197, 94, 0.2), transparent 70%);
    animation-delay: -15s;
}

/* Enhanced Scroll Bar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--gradient-1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-2);
}

/* Loading Animation */
.loading-animation {
    position: relative;
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    overflow: hidden;
    border-radius: 2px;
}

.loading-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: loading 1.5s infinite;
}

@keyframes loading {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(100%);
    }
}

/* Enhanced Mobile Menu Animation */
.mobile-menu-toggle {
    position: relative;
    z-index: 1001;
}

.mobile-menu-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.mobile-menu-toggle:hover::before {
    width: 150%;
    height: 150%;
}

.nav-menu {
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Enhanced Card Hover Effects */
.feature-card, .pricing-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover, .pricing-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* Enhanced Button Hover Effects */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    transition: transform 0.6s;
}

.btn:hover::after {
    transform: rotate(45deg) translate(50%, 50%);
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .location-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .location-card {
        padding: 1.25rem;
    }
}

@media (max-width: 992px) {
    .location-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .country-flag {
        width: 35px;
    }
    
    .location-info h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .locations {
        padding: 3rem 1rem;
    }
    
    .location-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin: 2rem auto;
    }
    
    .location-card {
        transform: none !important;
        margin-bottom: 1rem;
    }
    
    .location-info {
        flex-wrap: wrap;
    }
    
    .server-status {
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
    }
    
    .btn-connect {
        padding: 1rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .locations {
        padding: 2rem 0.75rem;
    }
    
    .location-grid {
        gap: 1rem;
    }
    
    .location-card {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .location-info {
        margin-bottom: 0.75rem;
    }
    
    .country-flag {
        width: 30px;
    }
    
    .location-info h3 {
        font-size: 1rem;
    }
    
    .server-status {
        font-size: 0.8rem;
        padding: 0.2rem 0.5rem;
    }
    
    .btn-connect {
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    .notification {
        left: 10px;
        right: 10px;
        bottom: 10px;
        top: auto;
        transform: translateY(100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .location-card {
        transform: none !important;
    }
    
    .btn-connect {
        padding: 1rem;
    }
    
    .btn-connect:active {
        background: var(--accent-color);
        transform: scale(0.98);
    }
}

/* Dark Mode Optimization */
@media (prefers-color-scheme: dark) {
    .location-card {
        background: rgba(0, 0, 0, 0.2);
        border-color: rgba(255, 255, 255, 0.05);
    }
    
    .server-status {
        background: rgba(52, 211, 153, 0.1);
    }
    
    .notification {
        background: rgba(0, 0, 0, 0.8);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .location-card {
        border: 2px solid var(--text-primary);
        background: var(--bg-primary);
    }
    
    .server-status {
        border: 1px solid currentColor;
    }
    
    .btn-connect {
        border: 2px solid var(--text-primary);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .location-card,
    .btn-connect,
    .notification {
        transition: none !important;
        animation: none !important;
    }
    
    .connection-status {
        animation: none !important;
    }
}

/* Print Styles */
@media print {
    .location-card {
        break-inside: avoid;
        border: 1px solid #000;
        background: none;
        box-shadow: none;
    }
    
    .btn-connect {
        display: none;
    }
    
    .server-status {
        border: 1px solid currentColor;
        background: none !important;
    }
}

/* Responsive Design System */
/* Base styles for mobile first approach */
.container {
    width: 100%;
    padding-right: 1rem;
    padding-left: 1rem;
    margin-right: auto;
    margin-left: auto;
}

/* Breakpoint Variables */
:root {
    --breakpoint-xs: 0;
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
    --breakpoint-xxl: 1400px;
}

/* Extra small devices (phones) */
@media (max-width: 575.98px) {
    .nav-container {
        padding: 0.5rem;
    }
    
    .nav-menu {
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--glass-bg);
        backdrop-filter: blur(10px);
        padding: 1rem;
        display: none;
    }

    .nav-menu.active {
        display: block;
    }

    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero-content {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 1.8rem;
        text-align: center;
    }

    .hero p {
        font-size: 1rem;
        text-align: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .location-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Small devices (tablets) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }

    .hero-content {
        padding: 3rem 1.5rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .location-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium devices (tablets, laptops) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }

    .hero-content {
        padding: 4rem 2rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .location-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large devices (desktops) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }

    .hero-content {
        padding: 5rem 2rem;
    }
}

/* Extra large devices */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Device-specific optimizations */
@supports (-webkit-touch-callout: none) {
    /* iOS-specific styles */
    .btn {
        -webkit-tap-highlight-color: transparent;
    }
}

/* High-DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img {
        transform: scale(0.8);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --glass-bg: rgba(15, 23, 42, 0.9);
    }
}

/* Print styles */
@media print {
    .nav-menu,
    .hero-stats,
    .features-grid,
    .location-grid {
        break-inside: avoid;
    }
}

/* Landscape orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-content {
        padding: 2rem 1rem;
    }
}

/* Hover capability */
@media (hover: hover) {
    .btn:hover {
        transform: translateY(-2px);
    }
}

/* Map Styles */
.map-container {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#vpn-map {
    width: 100%;
    height: 100%;
    background: #1a1a1a;
}

/* Custom Marker Styles */
.custom-marker {
    width: 20px !important;
    height: 20px !important;
    background: transparent;
    border: none;
}

.marker-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #ff4444;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
    transition: all 0.3s ease;
}

.custom-marker.connected .marker-inner {
    background: #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Server Popup Styles */
.server-popup {
    padding: 15px;
    min-width: 200px;
}

.server-popup h3 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #333;
}

.server-stats {
    margin-bottom: 15px;
}

.server-stats .stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
}

.server-stats .label {
    color: #666;
}

.server-stats .value {
    font-weight: 500;
    color: #333;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .map-container {
        height: 50vh;
        min-height: 300px;
    }

    .location-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
        padding: 15px;
    }

    .server-popup {
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .map-container {
        height: 40vh;
        min-height: 250px;
    }

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

    .server-popup {
        min-width: 150px;
    }
}

/* Network Line Animation */
.network-line {
    stroke-dasharray: 10;
    animation: dash 20s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: 1000;
    }
}

/* Map Movement Controls */
.map-control-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.control-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: white;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.control-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.control-btn.active {
    background: #4CAF50;
    color: white;
}

/* User Location Marker */
.user-location-marker {
    width: 20px !important;
    height: 20px !important;
}

.user-location-pulse {
    width: 20px;
    height: 20px;
    background: #4CAF50;
    border-radius: 50%;
    position: relative;
}

.user-location-pulse::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(76, 175, 80, 0.4);
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* Map Transitions */
#vpn-map {
    transition: all 0.3s ease;
}

#vpn-map.zooming {
    transition: transform 0.3s ease;
}

/* Marker Hover Effects */
.custom-marker.hovered .marker-inner {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
}

/* Nearest Server Marker */
.custom-marker.nearest .marker-inner {
    background: #FFC107;
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.6);
}

/* Server Tour Animation */
@keyframes tour-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.custom-marker.touring .marker-inner {
    animation: tour-pulse 1s ease-in-out;
}

/* Responsive Controls */
@media (max-width: 768px) {
    .map-control-panel {
        padding: 8px;
    }

    .control-btn {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .map-control-panel {
        padding: 6px;
    }

    .control-btn {
        width: 32px;
        height: 32px;
    }
}
