:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --bg-color: #1a1a1a;
    --text-color: #f5f5f5;
    --border-color: #444;
    --header-bg: #272424;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
    --processing-color: #f39c12;
    --nav-bg: #1e1e1e;
    --nav-hover: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-top: 70px;
    /* Account for fixed navbar */
}

/* Navigation Styles */
.navbar {
    background: linear-gradient(135deg, var(--nav-bg) 0%, #252525 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo:hover {
    color: #2980b9;
}

.nav-logo::before {
    content: "🛡️";
    margin-right: 10px;
    font-size: 1.6rem;
}

/* Status-based shield colors - using filter to change emoji color */
.nav-logo.status-connecting::before {
    filter: hue-rotate(30deg) saturate(1.5) brightness(1.1);
    /* Orange shield */
    animation: pulse 2s infinite;
}

.nav-logo.status-online::before {
    filter: hue-rotate(90deg) saturate(1.2) brightness(1.1);
    /* Green shield */
}

.nav-logo.status-offline::before {
    filter: hue-rotate(330deg) saturate(1.3) brightness(0.9);
    /* Red shield */
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    background: var(--nav-hover);
    transform: translateY(-2px);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #fff, transparent);
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--nav-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 4px;
    margin: 4px;
}

.dropdown-menu a:hover {
    background: var(--primary-color);
    color: white;
}

/* Mobile menu toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Mobile responsive */
@media (max-width: 968px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: 0;
        /* Start with height 0 when hidden */
        flex-direction: column;
        background: var(--nav-bg);
        border-top: 1px solid var(--border-color);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-100%);
        /* Move completely out of view */
        transition: all 0.3s ease;
        padding: 0;
        /* No padding when hidden */
        overflow: hidden;
        /* Prevent content overflow */
        z-index: 999;
    }

    .nav-menu.active {
        height: auto;
        /* Allow natural height when active */
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        padding: 20px 0;
        /* Restore padding when active */
    }

    .nav-item {
        margin: 5px 20px;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(255, 255, 255, 0.05);
        margin-top: 10px;
    }
}

.header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #34495e 100%);
    color: white;
    text-align: center;
    padding: 3rem 1rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='m36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.1;
}

.header-content {
    position: relative;
    z-index: 2;
}

.header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: -1px;
}

.header p {
    margin: 0.5rem 0 0;
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

.input-group {
    display: flex;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

input[type="text"] {
    flex: 1;
    padding: 1rem;
    font-size: 1rem;
    border: none;
    background-color: #333;
    color: var(--text-color);
    outline: none;
}

input[type="text"]:focus {
    background-color: #404040;
}

button {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

button:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
}

.retry-button {
    background: linear-gradient(135deg, var(--error-color), #c0392b);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    margin-left: 10px;
    display: none;
}

.retry-button:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
}

.status-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
}

.processing {
    background-color: var(--processing-color);
    animation: pulse 1.5s infinite;
}

.complete {
    background-color: var(--success-color);
}

.error {
    background-color: var(--error-color);
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

.loader {
    height: 4px;
    width: 100%;
    background-color: #444;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    display: none;
    border-radius: 2px;
}

.loader:before {
    content: "";
    position: absolute;
    left: -50%;
    height: 4px;
    width: 40%;
    background: linear-gradient(90deg, var(--primary-color), #2980b9);
    animation: loading 1.5s infinite ease;
    border-radius: 2px;
}

@keyframes loading {
    0% {
        left: -50%;
    }

    100% {
        left: 100%;
    }
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.result-section {
    flex: 1 1 calc(50% - 20px);
    min-width: 300px;
    margin-bottom: 20px;
    background: linear-gradient(145deg, #272727, #2a2a2a);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.section-header {
    background: linear-gradient(135deg, var(--header-bg), #2f2f2f);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid transparent;
    transition: border-left 0.3s ease;
}

.section-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pending {
    background: linear-gradient(135deg, #555, #666);
    color: #ddd;
}

.in-progress {
    background: linear-gradient(135deg, var(--processing-color), #e67e22);
    color: #333;
}

.completed {
    background: linear-gradient(135deg, var(--success-color), #27ae60);
    color: white;
}

.failed {
    background: linear-gradient(135deg, var(--error-color), #c0392b);
    color: white;
}

.table-wrapper {
    max-height: 300px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, var(--header-bg), #2f2f2f);
    z-index: 10;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Security status indicators */
.security-warning {
    color: #e74c3c;
    font-weight: bold;
}

.security-warning-mid {
    color: #e7d03c;
    font-weight: bold;
}

.security-success {
    color: #2ecc71;
    font-weight: bold;
}

.security-warning-bg {
    background-color: rgba(231, 76, 60, 0.15);
}

.security-warning-mid-bg {
    background-color: rgba(231, 222, 60, 0.15);
}

.security-success-bg {
    background-color: rgba(46, 204, 113, 0.15);
}

.result-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.no-data {
    padding: 30px;
    text-align: center;
    color: #888;
    font-style: italic;
}

/* IP Display Styles */
.ip-display-container {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ip-info-box {
    background: linear-gradient(145deg, #272727, #2a2a2a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    min-width: 200px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: #f5f5f5;
    transition: all 0.3s ease;
}

.ip-info-box:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
}

.ip-label {
    font-size: 0.9rem;
    color: #bbb;
    margin-bottom: 8px;
    font-weight: 500;
}

.ip-value {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: bold;
    font-family: 'Courier New', monospace;
    background: rgba(52, 152, 219, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(52, 152, 219, 0.3);
    text-align: center;
}

.ip-loading {
    color: var(--processing-color);
    font-style: italic;
}

.ip-error {
    color: var(--error-color);
    font-style: italic;
}

/* Status Light Box */
.status-light-box {
    background: linear-gradient(145deg, #272727, #2a2a2a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.status-light-label {
    font-size: 0.9rem;
    color: #bbb;
    margin-bottom: 10px;
    font-weight: 500;
}

.status-light {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.status-light.green {
    background: radial-gradient(circle, #2ecc71, #27ae60);
    border-color: #27ae60;
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.5);
}

.status-light.red {
    background: radial-gradient(circle, #e74c3c, #c0392b);
    border-color: #c0392b;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.5);
}

.status-light.orange {
    background: radial-gradient(circle, #f39c12, #e67e22);
    border-color: #e67e22;
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.5);
    animation: pulse 1.5s infinite;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .nav-container {
        height: 60px;
    }

    .result-section {
        flex: 1 1 100%;
    }

    .input-group {
        flex-direction: column;
    }

    .ip-display-container {
        position: static;
        transform: none;
        flex-direction: row;
        justify-content: center;
        margin: 20px 0;
    }

    .ip-info-box,
    .status-light-box {
        min-width: auto;
        flex: 1;
        max-width: 200px;
    }
}

/* Checkbox Container Styling */
.checkbox-container {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.checkbox-container h3 {
    margin-bottom: 15px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
}

/* Checkbox Grid Layout */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

/* Individual Checkbox Item */
.checkbox-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: #e0e0e0;
}

.checkbox-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(74, 144, 226, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Custom Checkbox Styling */
.checkbox-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    margin-right: 10px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-item input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border-color: #4a90e2;
}

.checkbox-item input[type="checkbox"]:checked::before {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-item input[type="checkbox"]:hover {
    border-color: #4a90e2;
    transform: scale(1.1);
}

/* Checkbox Label Text */
.checkbox-item span {
    font-size: 0.9rem;
    color: #121111;
    font-weight: 500;
    user-select: none;
}

/* Active/Selected State */
.checkbox-item:has(input:checked) {
    background: rgba(74, 144, 226, 0.15);
    border-color: rgba(74, 144, 226, 0.6);
}

.checkbox-item:has(input:checked) span {
    color: #121111;
}

/* Responsive Design */
@media (max-width: 768px) {
    .checkbox-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .checkbox-container {
        padding: 15px;
        margin: 15px 0;
    }

    .checkbox-item {
        padding: 12px;
        font-size: 0.9rem;
    }

    .checkbox-container h3 {
        font-size: 1rem;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .checkbox-item {
        padding: 10px;
    }

    .checkbox-item input[type="checkbox"] {
        width: 14px;
        height: 14px;
        margin-right: 8px;
    }

    .checkbox-item span {
        font-size: 0.85rem;
    }
}