:root {
    /* Light Mode Colors */
    --primary-color: #007AFF;
    --primary-dark: #0051D5;
    --primary-light: #4DA2FF;
    --secondary-color: #5856D6;
    --success-color: #34C759;
    --warning-color: #FF9500;
    --error-color: #FF3B30;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-light: #a1a1a6;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #fafafa;
    --border-color: #d2d2d7;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
    --gradient-primary: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    --gradient-mesh: radial-gradient(at 0% 0%, rgba(0, 122, 255, 0.1) 0px, transparent 50%),
                     radial-gradient(at 100% 100%, rgba(88, 86, 214, 0.1) 0px, transparent 50%);
}

/* Dark Mode Colors (Default) */
body.dark-mode {
    --primary-color: #0A84FF;
    --primary-dark: #0066CC;
    --primary-light: #409CFF;
    --secondary-color: #5E5CE6;
    --success-color: #30D158;
    --warning-color: #FF9F0A;
    --error-color: #FF453A;
    --text-primary: #f5f5f7;
    --text-secondary: #98989d;
    --text-light: #636366;
    --bg-primary: #1c1c1e;
    --bg-secondary: #000000;
    --bg-tertiary: #2c2c2e;
    --border-color: #38383a;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --gradient-mesh: radial-gradient(at 0% 0%, rgba(10, 132, 255, 0.15) 0px, transparent 50%),
                     radial-gradient(at 100% 100%, rgba(94, 92, 230, 0.15) 0px, transparent 50%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--bg-secondary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 280px 1fr auto;
    align-items: center;
    height: 70px;
    gap: 3rem;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
    grid-column: 1;
}

.navbar-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #007AFF, #0051D5);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    font-size: 1.2rem;
    opacity: 1;
}

.navbar-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    grid-column: 2;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    grid-column: 3;
    justify-self: end;
}

.navbar-item {
    position: relative;
}

.navbar-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-link:hover {
    color: var(--primary-color);
}

.navbar-link.active {
    color: var(--primary-color);
}

.navbar-link i {
    font-size: 0.9rem;
}

/* Mobile Menu Toggle */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Theme Toggle in Navbar */
.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.theme-toggle i {
    font-size: 1rem;
    color: var(--primary-color);
}

/* Language Dropdown - Apple Style */
.language-dropdown {
    position: relative;
}

.lang-selector {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 7px 14px;
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-weight: 500;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lang-selector:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lang-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.lang-text {
    font-weight: 600;
    letter-spacing: 0.3px;
}

.lang-chevron {
    font-size: 0.7rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.6;
}

.lang-selector:hover .lang-chevron {
    opacity: 1;
}

.lang-selector.active .lang-chevron {
    transform: rotate(180deg);
}

/* Language Menu */
.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 6px;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
}

.lang-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lang-option {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    text-align: left;
}

.lang-option:hover {
    background: rgba(74, 144, 226, 0.1);
    transform: translateX(2px);
}

.lang-flag {
    font-size: 1.2rem;
    line-height: 1;
}

.lang-check {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--primary-color);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-option.active .lang-check {
    opacity: 1;
    transform: scale(1);
}

/* Dark mode adjustments for language dropdown */
.dark-mode .lang-menu {
    background: rgba(30, 30, 30, 0.95);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.dark-mode .lang-selector {
    background: rgba(255, 255, 255, 0.05);
}

.dark-mode .lang-option:hover {
    background: rgba(74, 144, 226, 0.15);
}

/* Info Modal - Apple Style */
.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.info-modal-content {
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(128, 128, 128, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.info-modal-close:hover {
    background: rgba(128, 128, 128, 0.2);
    transform: scale(1.1);
}

.info-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.info-modal-title i {
    color: var(--primary-color);
}

.info-modal-body {
    color: var(--text-secondary);
}

.info-item-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.info-list-item:hover {
    transform: translateX(8px);
    background: rgba(74, 144, 226, 0.05);
}

.info-list-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
    width: 24px;
    text-align: center;
}

.info-list-item span {
    font-weight: 500;
    color: var(--text-primary);
}

.info-modal-note {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(103, 58, 183, 0.1));
    padding: 1.25rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-left: 4px solid var(--primary-color);
}

.info-modal-note i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* VPN Modal Styles */
.vpn-modal {
    max-width: 600px;
}

.vpn-loader {
    text-align: center;
    padding: 3rem 2rem;
}

.vpn-loader i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.vpn-loader p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.vpn-result {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.1), rgba(48, 209, 88, 0.05));
    border: 2px solid rgba(52, 199, 89, 0.2);
}

.vpn-result.vpn-detected {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.1), rgba(255, 69, 58, 0.05));
    border: 2px solid rgba(255, 59, 48, 0.2);
}

.vpn-status-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.vpn-status-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.vpn-status-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

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

.vpn-detail-item {
    background: var(--bg-tertiary);
    padding: 1.25rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.vpn-detail-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.vpn-detail-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(128, 128, 128, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.3rem;
    flex-shrink: 0;
}

.vpn-detail-icon.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.vpn-detail-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.vpn-detail-text strong {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vpn-detail-text span {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
}

.vpn-risk-score {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.vpn-risk-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.vpn-risk-bar {
    height: 12px;
    background: rgba(128, 128, 128, 0.15);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.vpn-risk-fill {
    height: 100%;
    background: var(--success-color);
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.vpn-risk-value {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 700;
}

.vpn-details-info {
    margin-bottom: 2rem;
}

.vpn-details-info h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.vpn-info-note {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(103, 58, 183, 0.1));
    padding: 1.25rem;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-left: 4px solid var(--primary-color);
}

.vpn-info-note i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.vpn-error {
    text-align: center;
    padding: 3rem 2rem;
}

.vpn-error i {
    font-size: 3rem;
    color: var(--error-color);
    margin-bottom: 1rem;
    display: block;
}

.vpn-error p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Responsive VPN Modal */
@media (max-width: 768px) {
    .vpn-details-grid {
        grid-template-columns: 1fr;
    }
    
    .vpn-status-icon {
        font-size: 3rem;
    }
    
    .vpn-status-title {
        font-size: 1.25rem;
    }
}

/* WebRTC Leak Test Styles */
.webrtc-info-section {
    margin-bottom: 2rem;
}

.webrtc-info-section h4 {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.webrtc-ip-box {
    background: var(--bg-tertiary);
    padding: 1.25rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 2px solid var(--border-color);
}

.webrtc-ip-box.warning {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.1), rgba(255, 69, 58, 0.05));
    border-color: rgba(255, 59, 48, 0.3);
}

.webrtc-ip-box.safe {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.1), rgba(48, 209, 88, 0.05));
    border-color: rgba(52, 199, 89, 0.3);
}

.webrtc-ip-box i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.webrtc-ip-box.warning i {
    color: #FF3B30;
}

.webrtc-ip-box.safe i {
    color: #34C759;
}

.webrtc-ip-box code {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Courier New', Courier, monospace;
    background: none;
    padding: 0;
}

.webrtc-ip-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.webrtc-ip-item {
    background: var(--bg-tertiary);
    padding: 1rem 1.25rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.webrtc-ip-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.webrtc-ip-item.leak {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.1), rgba(255, 69, 58, 0.05));
    border-color: rgba(255, 59, 48, 0.3);
}

.webrtc-ip-item.private {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.1), rgba(255, 159, 10, 0.05));
    border-color: rgba(255, 149, 0, 0.3);
}

.webrtc-ip-item.public {
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.1), rgba(48, 209, 88, 0.05));
    border-color: rgba(10, 132, 255, 0.3);
}

.webrtc-ip-item i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.webrtc-ip-item.leak i {
    color: #FF3B30;
}

.webrtc-ip-item.private i {
    color: #FF9500;
}

.webrtc-ip-item.public i {
    color: #0A84FF;
}

.webrtc-ip-item code {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Courier New', Courier, monospace;
    background: none;
    padding: 0;
}

.webrtc-ip-label {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.webrtc-ip-item.leak .webrtc-ip-label {
    background: rgba(255, 59, 48, 0.2);
    color: #FF3B30;
}

.webrtc-ip-item.private .webrtc-ip-label {
    background: rgba(255, 149, 0, 0.2);
    color: #FF9500;
}

.webrtc-ip-item.public .webrtc-ip-label {
    background: rgba(10, 132, 255, 0.2);
    color: #0A84FF;
}

.webrtc-no-leak {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.1), rgba(48, 209, 88, 0.05));
    border-radius: 12px;
    border: 2px solid rgba(52, 199, 89, 0.2);
}

.webrtc-no-leak i {
    font-size: 3rem;
    color: #34C759;
    display: block;
    margin-bottom: 1rem;
}

.webrtc-no-leak p {
    color: var(--text-primary);
    font-weight: 600;
}

/* Responsive WebRTC */
@media (max-width: 768px) {
    .webrtc-ip-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .webrtc-ip-item code {
        word-break: break-all;
    }
}

/* DNS Leak Test Styles */
.dns-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.dns-info-item {
    background: var(--bg-tertiary);
    padding: 1.25rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dns-info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.dns-info-item div {
    flex: 1;
    min-width: 0;
}

.dns-info-item strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.dns-info-item span {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dns-server-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dns-server-item {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.dns-server-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.dns-server-item.dns-isp {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.08), rgba(255, 159, 10, 0.04));
    border-color: rgba(255, 149, 0, 0.3);
}

.dns-server-item.dns-public {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.08), rgba(48, 209, 88, 0.04));
    border-color: rgba(52, 199, 89, 0.3);
}

.dns-server-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(128, 128, 128, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.dns-server-item.dns-isp .dns-server-icon {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.2), rgba(255, 159, 10, 0.1));
    color: #FF9500;
}

.dns-server-item.dns-public .dns-server-icon {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.2), rgba(48, 209, 88, 0.1));
    color: #34C759;
}

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

.dns-server-info strong {
    display: block;
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.dns-server-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.dns-server-details span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.dns-server-details i {
    font-size: 0.85rem;
}

.dns-server-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    white-space: nowrap;
}

.badge-warning {
    background: rgba(255, 149, 0, 0.2);
    color: #FF9500;
}

.badge-success {
    background: rgba(52, 199, 89, 0.2);
    color: #34C759;
}

.badge-neutral {
    background: rgba(128, 128, 128, 0.15);
    color: var(--text-secondary);
}

/* Responsive DNS */
@media (max-width: 768px) {
    .dns-info-grid {
        grid-template-columns: 1fr;
    }
    
    .dns-server-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dns-server-icon {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
    
    .dns-server-badge {
        align-self: flex-start;
    }
}

/* DNS Help Modal Styles */
.dns-solution-card {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.dns-solution-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.dns-solution-card h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.dns-solution-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.dns-help-list {
    list-style: none;
    padding: 0;
    margin-top: 0.75rem;
}

.dns-help-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.dns-help-list li:before {
    content: "✓";
    color: var(--success-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

@media (max-width: 768px) {
    .dns-solution-card {
        flex-direction: column;
    }
}

/* Dark mode adjustments for info modal */
.dark-mode .info-modal-content {
    background: rgba(30, 30, 30, 0.98);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.dark-mode .info-list-item {
    background: rgba(255, 255, 255, 0.03);
}

.dark-mode .info-list-item:hover {
    background: rgba(74, 144, 226, 0.1);
}

/* Add padding to body for fixed navbar */
body {
    padding-top: 70px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .navbar-container {
        grid-template-columns: 1fr auto;
        gap: 1rem;
    }
    
    .navbar-toggle {
        display: block;
        grid-column: 2;
        grid-row: 1;
    }
    
    .navbar-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
    
    .navbar-menu.active {
        transform: translateX(0);
    }
    
    .navbar-actions {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 1.5rem 2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        transition-delay: 0.05s;
        margin-top: calc(70px + 4 * 1.5rem + 4 * 3rem);
        grid-column: 1 / -1;
        justify-self: stretch;
    }
    
    .navbar-actions.active {
        transform: translateX(0);
    }
    
    .navbar-link {
        font-size: 1.1rem;
        width: 100%;
    }
    
    .theme-toggle {
        width: 100%;
        justify-content: center;
    }
    
    .lang-selector {
        width: 100%;
        justify-content: center;
    }
    
    .lang-menu {
        left: 0;
        right: 0;
        min-width: auto;
    }
}

/* FAQ Section */
.faq-section {
    margin: 4rem 0;
    padding: 3rem 0;
    background: var(--bg-secondary);
    border-radius: 24px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.section-title i {
    color: var(--primary-color);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.faq-item {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.faq-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.faq-item p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Content Section */
.content-section {
    margin: 4rem 0;
    padding: 3rem 2rem;
    background: var(--bg-primary);
    border-radius: 24px;
    border: 1px solid var(--border-color);
}

.content-article {
    max-width: 800px;
    margin: 0 auto;
}

.content-article h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2rem 0 1rem 0;
}

.content-article h3:first-child {
    margin-top: 0;
}

.content-article p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Tools Section */
.tools-section {
    margin: 4rem 0;
    padding: 3rem 2rem;
}

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

.tool-card {
    background: var(--bg-primary);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.tool-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.tool-icon i {
    font-size: 2rem;
    color: white;
}

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

.tool-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.tool-card button,
.tool-card .btn-small {
    display: block;
    margin: 0 auto;
}

.btn-small {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 12px;
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
    .faq-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .content-section {
        padding: 2rem 1.5rem;
    }
    
    .faq-section {
        padding: 2rem 0;
        margin: 2rem 0;
    }
}

/* Animated background mesh gradient */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--gradient-mesh);
    overflow: hidden;
    transition: background 0.5s ease;
}

.particle {
    position: absolute;
    background: rgba(0, 122, 255, 0.05);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
    backdrop-filter: blur(40px);
}

body.dark-mode .particle {
    background: rgba(10, 132, 255, 0.08);
}

.particle:nth-child(1) { width: 300px; height: 300px; top: 10%; left: 5%; animation-delay: 0s; }
.particle:nth-child(2) { width: 400px; height: 400px; top: 50%; right: 5%; animation-delay: 2s; }
.particle:nth-child(3) { width: 250px; height: 250px; bottom: 10%; left: 15%; animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    50% { transform: translate(30px, -30px) scale(1.1); opacity: 0.5; }
}

.container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 30px;
    box-shadow: var(--shadow-xl);
    padding: 60px;
    max-width: 1200px;
    width: 95%;
    text-align: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s ease;
}

/* Desktop Layout Optimizations */
@media (min-width: 1200px) {
    .container {
        padding: 80px 100px;
        max-width: 1400px;
    }
    
    .header {
        margin-bottom: 4rem;
    }
    
    .subtitle {
        font-size: 1.3rem;
    }
    
    .description {
        font-size: 1.1rem;
        max-width: 700px;
        margin: 0 auto;
    }
    
    /* 2-column grid for IP info */
    .ip-info {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        text-align: left;
    }
    
    .info-item {
        padding: 1.5rem;
    }
    
    /* Larger trust badges */
    .trust-badges {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
        margin: 3rem 0;
    }
    
    .trust-badge {
        padding: 1.5rem;
    }
    
    /* Better button spacing */
    .action-buttons {
        display: flex;
        gap: 2rem;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .action-buttons .btn {
        flex: 0 1 auto;
        min-width: 200px;
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    /* FAQ Grid optimization */
    .faq-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
        padding: 0 3rem;
    }
    
    .faq-item {
        padding: 2.5rem;
    }
    
    /* Tools grid */
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    /* IP Section Desktop */
    .ip-section {
        padding: 50px 60px;
        margin: 4rem 0;
    }
    
    .ip-address {
        font-size: 3.5rem;
        padding: 2rem;
        margin: 2rem 0;
        letter-spacing: 2px;
    }
    
    .copy-btn {
        right: 2rem;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    /* Content sections wider */
    .content-section {
        padding: 4rem 4rem;
        margin: 5rem 0;
    }
    
    .content-article {
        max-width: 1000px;
    }
    
    .content-article h3 {
        font-size: 1.8rem;
    }
    
    .content-article p {
        font-size: 1.1rem;
    }
    
    /* Section titles larger */
    .section-title {
        font-size: 2.5rem;
        margin-bottom: 4rem;
    }
}

body.dark-mode .container {
    background: rgba(28, 28, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.header {
    margin-bottom: 48px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 20px;
    animation: fadeInDown 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.logo-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.3);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.description {
    color: var(--text-light);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 40px 0;
    flex-wrap: wrap;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.8s both;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-primary);
    padding: 12px 24px;
    border-radius: 100px;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
}

.trust-badge:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.trust-badge i {
    color: var(--success-color);
    font-size: 1rem;
}

.ip-section {
    background: var(--bg-primary);
    border-radius: 24px;
    padding: 48px;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 1s both;
    box-shadow: var(--shadow-sm);
}

.ip-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.loading {
    display: none;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 500;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
    margin-right: 12px;
}

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

.ip-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-weight: 500;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ip-label i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.ip-address {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Courier New', monospace;
    background: var(--bg-secondary);
    padding: 32px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
    word-break: break-all;
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ip-address:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.ip-address::before {
    content: '🔒';
    position: absolute;
    top: -12px;
    right: -12px;
    background: var(--success-color);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

/* IPv6 Badge Styles */
.ipv6-badge {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.ipv6-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(88, 86, 214, 0.1));
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.ipv6-indicator:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

.ipv6-indicator i {
    font-size: 1rem;
    color: var(--success-color);
}

.ipv6-details {
    margin-top: 1rem;
    padding: 1.25rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ipv6-address-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

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

.ipv6-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Courier New', monospace;
    word-break: break-all;
}

@media (max-width: 768px) {
    .ipv6-address-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .ipv6-value {
        font-size: 0.85rem;
    }
}

.ip-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 40px;
}

.info-item {
    background: var(--bg-secondary);
    padding: 28px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.info-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.info-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.info-item:hover::before {
    transform: scaleX(1);
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

.info-value i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.btn {
    padding: 16px 32px;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4);
}

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

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

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.btn-secondary:active {
    transform: translateY(0) scale(0.98);
}

.btn-success {
    background: var(--success-color);
    color: white;
    box-shadow: 0 4px 16px rgba(52, 199, 89, 0.3);
}

.btn-success:hover {
    background: #28a745;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(52, 199, 89, 0.4);
}

.btn-success:active {
    transform: translateY(0) scale(0.98);
}

/* Speed Test Modal */
.speed-test-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.speed-test-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.speed-test-content {
    background: var(--bg-primary);
    border-radius: 24px;
    padding: 48px;
    max-width: 600px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.speed-test-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.speed-test-close:hover {
    background: var(--error-color);
    color: white;
    transform: scale(1.1);
}

.speed-test-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.speed-test-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1.05rem;
}

.speed-gauge {
    width: 200px;
    height: 200px;
    margin: 32px auto;
    position: relative;
}

.speed-gauge-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        var(--primary-color) 0deg,
        var(--primary-color) calc(var(--progress, 0) * 3.6deg),
        var(--bg-secondary) calc(var(--progress, 0) * 3.6deg)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.speed-gauge-inner {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.speed-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.speed-unit {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

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

.speed-stat {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.speed-stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.footer {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 1.2s both;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    margin-bottom: 32px;
    text-align: left;
}

.footer-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Ad Placements - Elegant & Non-Intrusive */
.ad-container {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--border-color);
    margin: 32px 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ad-container:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.ad-label {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.7rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
}

.ad-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: var(--text-primary);
}

.ad-banner:hover .ad-content h3 {
    color: var(--primary-color);
}

.ad-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

.ad-content {
    flex: 1;
}

.ad-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    transition: color 0.3s ease;
    letter-spacing: -0.01em;
}

.ad-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.ad-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 12px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
}

.ad-cta:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* Sidebar Ad (Sticky) */
.ad-sidebar {
    position: fixed;
    top: 100px;
    right: 24px;
    width: 300px;
    z-index: 100;
    animation: slideInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.ad-sidebar .ad-container {
    margin: 0;
}

.ad-sidebar .ad-banner {
    flex-direction: column;
    text-align: center;
}

.ad-sidebar .ad-icon {
    width: 100px;
    height: 100px;
}

/* Native Ad in Content */
.ad-native {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.05) 0%, rgba(88, 86, 214, 0.05) 100%);
    border: 1px solid rgba(0, 122, 255, 0.1);
}

.ad-native .ad-banner {
    padding: 8px;
}

/* Bottom Banner Ad */
.ad-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    animation: slideInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.ad-bottom .ad-container {
    margin: 0;
    border-radius: 0;
    border: none;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.ad-bottom .ad-banner {
    flex: 1;
}

.ad-bottom-close {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    flex-shrink: 0;
    margin-left: 16px;
}

.ad-bottom-close:hover {
    background: var(--error-color);
    color: white;
    transform: scale(1.1);
}

.ad-bottom.hidden {
    display: none;
}

/* Sponsored Content Badge */
.sponsored-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 8px;
}

.sponsored-badge i {
    font-size: 0.9rem;
}

/* Responsive Ad Styles */
@media (max-width: 1400px) {
    .ad-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .ad-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .ad-icon {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }
    
    .ad-bottom .ad-container {
        padding: 12px 16px;
    }
    
    .ad-bottom .ad-banner {
        flex-direction: column;
        gap: 12px;
    }
    
    .ad-bottom .ad-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .ad-content h3 {
        font-size: 1.1rem;
    }
    
    .ad-content p {
        font-size: 0.85rem;
    }
}

.error {
    color: var(--error-color);
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.2);
    padding: 24px;
    border-radius: 16px;
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.error i {
    font-size: 1.3rem;
}

.success-message {
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.2);
    color: var(--success-color);
    padding: 16px;
    border-radius: 12px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    font-weight: 500;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.copy-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

.copy-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

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

.copy-btn.copied {
    background: var(--success-color);
    color: white;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

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

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

/* Selection color */
::selection {
    background: rgba(0, 122, 255, 0.2);
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .theme-toggle {
        top: 16px;
        right: 16px;
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .container {
        padding: 32px;
        margin: 20px;
        border-radius: 24px;
    }
    
    .logo {
        font-size: 2.2rem;
    }
    
    .logo-icon {
        width: 56px;
        height: 56px;
        font-size: 1.6rem;
    }
    
    .ip-address {
        font-size: 2rem;
        padding: 24px;
    }
    
    .ip-section {
        padding: 32px;
    }
    
    .ip-info {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .trust-badges {
        gap: 10px;
    }
    
    .trust-badge {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
    
    .speed-test-content {
        padding: 32px;
    }
    
    .speed-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 24px;
    }
    
    .ip-section {
        padding: 24px;
    }
    
    .ip-address {
        font-size: 1.6rem;
        padding: 20px;
    }
    
    .logo {
        font-size: 1.8rem;
    }
    
    .speed-gauge {
        width: 160px;
        height: 160px;
    }
    
    .speed-gauge-inner {
        width: 130px;
        height: 130px;
    }
    
    .speed-value {
        font-size: 2.2rem;
    }
}