@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-blue: #2563eb;
    --primary-gradient: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    --accent-orange: #f97316;
    --action-gradient: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    --dark-navy: #0f172a;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
}

body {
    background-color: var(--light-bg);
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

/* TOP HEADER */
.top-header {
    background: var(--card-bg);
    color: var(--text-color);
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 10;
}

.logo-area {
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    color: var(--dark-navy);
    letter-spacing: -0.5px;
}

.logo-icon {
    font-size: 32px;
    margin-right: 12px;
    color: var(--primary-blue);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* NAVBAR */
.navbar-custom {
    background: var(--dark-navy);
    padding: 0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}

.navbar-custom .nav-link {
    color: #cbd5e1;
    padding: 15px 20px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-item.active .nav-link {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 3px solid var(--primary-blue);
}

.ip-badge {
    background: rgba(255,255,255,0.1);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* SEARCH FORM (WEB 2.0 / SALES FOCUSED) */
.search-form {
    display: flex;
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.15);
    border-radius: 50px;
    background: #fff;
    padding: 8px;
    border: 2px solid #fff;
    transition: all 0.3s ease;
}

.search-form:focus-within {
    border-color: #bfdbfe;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.25);
}

.search-form input,
.search-form select {
    border: none;
    background: transparent;
    box-shadow: none;
    font-size: 16px;
    padding: 10px 20px;
    color: var(--dark-navy);
}

.search-form input:focus,
.search-form select:focus {
    box-shadow: none;
    outline: none;
}

.search-form input {
    flex: 1;
    font-weight: 500;
}

.search-form input.has-value-bg {
    background-color: #f0f7ff !important;
    border-radius: 40px 0 0 40px;
    transition: background-color 0.3s ease;
}

.search-form select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 140px;
    padding: 10px 10px;
    font-weight: 600;
    color: var(--primary-blue);
    cursor: pointer;
    margin: 0 5px;
}

/* EYE-CATCHING BUTTONS */
.search-form button {
    background: var(--action-gradient);
    border: none;
    color: white;
    padding: 0 35px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
}

.search-form button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 25px rgba(249, 115, 22, 0.4);
}

.search-form button:active {
    transform: translateY(1px) scale(0.98);
}

.btn-outline-primary {
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-outline-primary:hover {
    background: var(--primary-blue);
    color: #fff;
    box-shadow: 0 8px 15px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

/* CARDS */
.card, .map-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover, .map-card:hover {
    box-shadow: 0 15px 50px rgba(0,0,0,0.06);
}

.map-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-navy);
}

/* LISTS */
.dns-node-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 700px;
    overflow-y: auto;
}

.dns-node-list::-webkit-scrollbar {
    width: 6px;
}
.dns-node-list::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

.dns-node-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.dns-node-item:hover {
    background-color: #f1f5f9;
}

.dns-node-name {
    font-weight: 600;
    color: var(--dark-navy);
    font-size: 14px;
    display: flex;
    align-items: center;
}

.dns-node-provider {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.dns-node-status {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.dns-node-status.success {
    background-color: #ecfdf5;
    color: var(--success);
    border: 1px solid #a7f3d0;
}

.dns-node-status.error {
    background-color: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
}

/* TABLES */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    padding: 15px;
}

.table td {
    padding: 15px;
    vertical-align: middle;
}

/* AD PLACEHOLDER (PREMIUM) */
.d-none.d-md-block[style*="max-width:400px"] {
    background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%) !important;
    border: 2px dashed #fca5a5 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.1) !important;
    transition: all 0.3s ease;
}

.d-none.d-md-block[style*="max-width:400px"]:hover {
    background: #fee2e2 !important;
    transform: scale(1.02);
}

.d-none.d-md-block a {
    color: #ef4444 !important;
    font-size: 15px !important;
    letter-spacing: 0.5px;
}

/* UTILS */
.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 20px;
}

/* === MAIN CONTAINER MARGIN === */
.main-container {
    margin-top: 10px;
}

/* === SECTION TITLE SPACING === */
.sidebar-title, .content-title {
    margin-top: 10px;
}

/* === LANGUAGE SELECT STYLING === */
#custom-lang-select {
    background: #f8fafc !important;
    color: #000000 !important;
    font-weight: 700 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 20px !important;
    padding: 6px 16px !important;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23cbd5e1%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px top 50% !important;
    background-size: 10px auto !important;
    padding-right: 28px !important;
}

#custom-lang-select:hover,
#custom-lang-select:focus {
    background: #ffffff !important;
    border-color: #94a3b8 !important;
    outline: none;
    box-shadow: none !important;
}

#custom-lang-select option {
    background: #ffffff;
    color: #000000;
}

/* === LANGUAGE TO IP BADGE SPACING === */
#google_translate_element {
    display: none;
}

.lang-ip-gap {
    margin-left: 5px;
}

/* === MOBILE RESPONSIVENESS FIXES === */
@media (max-width: 768px) {
    /* Make search form wrap and stack nicely on mobile */
    .search-form {
        flex-direction: column;
        border-radius: 15px;
        padding: 15px;
    }
    
    .search-form input,
    .search-form select,
    .search-form button {
        width: 100%;
        margin: 5px 0;
        border-radius: 8px !important;
    }
    
    .search-form select {
        max-width: 100%;
    }
    
    .search-form button {
        padding: 15px;
        margin-top: 10px;
    }

    /* Fix navbar overflow on mobile */
    .navbar-nav.flex-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .navbar-custom {
        padding: 10px;
    }
    
    .navbar-custom .nav-link {
        padding: 5px 10px;
        font-size: 13px;
    }

    /* Move the left column (Search form container) explicitly to top visually */
    .main-container .row {
        display: flex;
        flex-direction: column;
    }
    
    .main-container .row > .col-lg-7,
    .main-container .row > .col-md-6:first-child {
        order: -1;
    }
}

/* === SELECT2 DROPDOWN FOR HEADER === */
.select2-container--default .select2-selection--single,
.top-header .select2-container--default .select2-selection--single {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 20px !important;
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--single .select2-selection__placeholder,
.top-header .select2-container--default .select2-selection--single .select2-selection__rendered,
.top-header .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #334155 !important;
    font-weight: 600 !important;
    line-height: normal !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}

/* === RESPONSIVE ARTICLE IMAGES === */
.article-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    margin: 1.5rem auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
