@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #b8b9c9;
    --accent-purple: #667eea;
    --accent-red: #ff5f6d;
    --accent-green: #00b09b;
    --table-header-bg: #004d40;


    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --transition: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}


body::-webkit-scrollbar,
html::-webkit-scrollbar {
    display: block !important;
    width: 8px;
}

body::-webkit-scrollbar-track,
html::-webkit-scrollbar-track {
    background: #0f0c29;
}

body::-webkit-scrollbar-thumb,
html::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.nav-container {
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid var(--card-border);
    background: rgba(15, 12, 41, 0.8);
    backdrop-filter: blur(10px);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.language-selector {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--card-border);
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 2px 4px;
    transition: var(--transition);
}

.lang-btn.active {
    color: var(--accent-purple);
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.4);
}

.lang-divider {
    color: var(--card-border);
    font-size: 0.8rem;
}

.logo {
    justify-self: center;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.25);
}

.back-link {
    justify-self: end;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--text-primary);
}

main.container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
    flex: 1;
}

.header-section {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, #fff 0%, #b8b9c9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-section p {
    color: var(--text-secondary);
}


.tool-tabs {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.tool-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 12px 24px;
    border-radius: 50px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.tool-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.tool-tab.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.tool-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tool-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
}

h2 {
    margin-bottom: var(--spacing-lg);
    font-weight: 600;
}

.search-bar-group {
    display: flex;
    gap: 12px;
    margin-bottom: var(--spacing-md);
}

.custom-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    padding: 16px;
    border-radius: var(--radius-md);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.custom-input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.primary-btn {
    background: var(--accent-red);
    color: white;
}


.primary-btn:hover {
    background: #ff4b5c;
}

.secondary-btn {
    background: white;
    color: #333;
    border: 1px solid #ccc;
}

.secondary-btn:hover {
    background: #f0f0f0;
}

.search-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-xl);
}


.ip-display-large {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-purple);

    text-align: center;
    margin-bottom: var(--spacing-md);
}

.hide-ip-banner {
    background: var(--accent-red);
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
}

.result-desc {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}


.geo-table-card {
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.geo-header {
    background: #004d40;

    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
}

.provider-name {
    color: #80cbc4;
}



.geo-body {
    padding: var(--spacing-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
}

.geo-row {
    display: flex;
    align-items: baseline;
    margin-bottom: 12px;
}

.geo-row .icon {
    margin-right: 12px;
    width: 24px;
    text-align: center;
    font-size: 1.2rem;
}

.geo-row .label {
    font-weight: 700;
    color: #e0e0e0;
    font-size: 0.85rem;
    margin-right: 8px;
    text-transform: uppercase;
}

.geo-row .value {
    color: #b8b9c9;
}


.port-desc-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.port-desc-grid p {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.ports-badge-list {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.scan-action-btn {
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--spacing-lg);
}


.terminal-window {
    background: #0f0f1a;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #a8a8b2;
    min-height: 300px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.terminal-content {
    white-space: pre-wrap;
    line-height: 1.4;
}

.term-green {
    color: #00ff00;
}

.term-blue {
    color: #5ea1ff;
}

.term-white {
    color: #ffffff;
    font-weight: bold;
}

.term-purple {
    color: #bd93f9;
}

@media(max-width: 768px) {
    .geo-body {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .port-desc-grid {
        flex-direction: column;
    }

    .ports-badge-list {
        justify-content: flex-start;
    }

    .search-bar-group {
        flex-direction: column;
    }

    .search-bar-group .btn {
        width: 100%;
        justify-content: center;
    }
}

footer {
    text-align: center;
    padding: var(--spacing-lg);
    color: var(--text-secondary);
    border-top: 1px solid var(--card-border);
    margin-top: auto;
}