/* Custom CSS for Bootstrap Integration with Dark/Light Mode */

/* Google Font - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Source+Serif+Pro:wght@400;600&display=swap');

/* CSS Variables for Theme Support - Bootstrap Compatible */
:root {
    /* Light Mode Colors - Modern Emerald Green Theme */
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --secondary-color: #ec4899;
    --accent-color: #f59e0b;
    --accent-secondary: #06b6d4;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --gradient-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-secondary: linear-gradient(135deg, #ec4899 0%, #f59e0b 100%);

    /* Bootstrap Override Colors */
    --bs-primary: #10b981;
    --bs-primary-rgb: 16, 185, 129;
    --bs-secondary: #ec4899;
    --bs-secondary-rgb: 236, 72, 153;
}

[data-theme="dark"],
[data-bs-theme="dark"] {
    /* Dark Mode Colors - Modern Dark with Green Accents */
    --primary-color: #34d399;
    --primary-dark: #10b981;
    --primary-light: #6ee7b7;
    --secondary-color: #f472b6;
    --accent-color: #fbbf24;
    --accent-secondary: #22d3ee;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --border-color: #4b5563;
    --card-bg: #1f2937;
    --gradient-primary: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    --gradient-secondary: linear-gradient(135deg, #f472b6 0%, #fbbf24 100%);

    /* Bootstrap Dark Mode Override */
    --bs-body-bg: #111827;
    --bs-body-color: #f9fafb;
    --bs-border-color: #4b5563;
    --bs-card-bg: #1f2937;
    --bs-light: #1f2937;
}

/* Logo Gradient */
.logo-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.5rem;
}

/* Navbar Styling */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Navbar Dark Mode Support */
[data-theme="dark"] .navbar,
[data-bs-theme="dark"] .navbar {
    background-color: rgba(30, 41, 59, 0.95) !important;
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .navbar-brand,
[data-bs-theme="dark"] .navbar-brand {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .nav-link,
[data-bs-theme="dark"] .nav-link {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active,
[data-bs-theme="dark"] .nav-link:hover,
[data-bs-theme="dark"] .nav-link.active {
    color: var(--primary-color) !important;
}

/* Hero Section */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    min-height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.bg-gradient-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero-title {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* IP Display Card */
.ip-display-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent !important;
}

.ip-display-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color) !important;
}

.ip-value {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Inter', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Fira Mono', 'Droid Sans Mono', 'Source Code Pro', monospace;
    word-break: break-all;
    font-weight: 700;
    letter-spacing: -0.02em;
}

[data-theme="dark"] .ip-display-card,
[data-bs-theme="dark"] .ip-display-card {
    background-color: var(--card-bg) !important;
    border-color: var(--border-color) !important;
}

/* Info Cards */
.info-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color) !important;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2) !important;
    border-color: var(--primary-color) !important;
}

/* Modern Icon Styling */
.info-card .bi,
.feature-card .bi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-size: 2rem;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
    transition: all 0.3s ease;
}

.info-card:hover .bi,
.feature-card:hover .bi {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

[data-theme="dark"] .info-card .bi,
[data-theme="dark"] .feature-card .bi,
[data-bs-theme="dark"] .info-card .bi,
[data-bs-theme="dark"] .feature-card .bi {
    background: var(--gradient-primary);
    box-shadow: 0 4px 15px rgba(52, 211, 153, 0.3);
}

[data-theme="dark"] .info-card:hover .bi,
[data-theme="dark"] .feature-card:hover .bi,
[data-bs-theme="dark"] .info-card:hover .bi,
[data-bs-theme="dark"] .feature-card:hover .bi {
    box-shadow: 0 6px 20px rgba(52, 211, 153, 0.4);
}

[data-theme="dark"] .info-card,
[data-bs-theme="dark"] .info-card {
    background-color: var(--card-bg) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .info-card .card-body,
[data-bs-theme="dark"] .info-card .card-body {
    color: var(--text-primary) !important;
}

/* Feature Cards */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color) !important;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2) !important;
    border-color: var(--primary-color) !important;
}


[data-theme="dark"] .feature-card,
[data-bs-theme="dark"] .feature-card {
    background-color: var(--card-bg) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .feature-card .card-body,
[data-bs-theme="dark"] .feature-card .card-body {
    color: var(--text-primary) !important;
}

/* Tool Cards */
.tool-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color) !important;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2) !important;
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] .tool-card,
[data-bs-theme="dark"] .tool-card {
    background-color: var(--card-bg) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .tool-card .card-body,
[data-bs-theme="dark"] .tool-card .card-body {
    color: var(--text-primary) !important;
}

/* Footer Dark Mode */
[data-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-light {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] footer .text-muted,
[data-bs-theme="dark"] footer .text-muted {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] footer a,
[data-bs-theme="dark"] footer a {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] footer a:hover,
[data-bs-theme="dark"] footer a:hover {
    color: var(--primary-color) !important;
}

/* Section Backgrounds */
[data-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-light {
    background-color: var(--bg-secondary) !important;
}

/* Text Colors */
[data-theme="dark"] .text-muted,
[data-bs-theme="dark"] .text-muted {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .text-dark,
[data-bs-theme="dark"] .text-dark {
    color: var(--text-primary) !important;
}

/* Buttons */
.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline-primary i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-outline-primary:hover i {
    transform: translateX(2px);
}

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

[data-theme="dark"] .btn-outline-primary,
[data-bs-theme="dark"] .btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

[data-theme="dark"] .btn-outline-primary:hover,
[data-bs-theme="dark"] .btn-outline-primary:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.3);
}

/* Footer Social Icons */
footer .bi {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    transition: all 0.3s ease;
    font-size: 1.25rem;
}

footer .bi:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] footer .bi:hover,
[data-bs-theme="dark"] footer .bi:hover {
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.3);
}

/* Loading Animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Copy Success Animation */
@keyframes copySuccess {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.copy-success {
    animation: copySuccess 0.3s ease;
}

/* Global Font Family */
body {
    font-family: 'Source Serif Pro', serif;
    font-size: 18px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Source Serif Pro', serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 42px;
}

h2 {
    font-size: 36px;
}

.navbar-brand,
.logo-gradient {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 800;
    letter-spacing: -0.03em;
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .ip-value {
        font-size: 1.75rem !important;
    }

    .hero-title {
        font-size: 2rem !important;
    }

    .display-4 {
        font-size: 2rem !important;
    }

    .display-5 {
        font-size: 1.75rem !important;
    }
}

/* Custom Scrollbar for Dark Mode */
[data-theme="dark"] ::-webkit-scrollbar,
[data-bs-theme="dark"] ::-webkit-scrollbar {
    width: 10px;
}

[data-theme="dark"] ::-webkit-scrollbar-track,
[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover,
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Modern Theme Toggle Icon Button */
.theme-toggle-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-toggle-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

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

.theme-toggle-btn .theme-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.theme-toggle-btn:hover .theme-icon {
    transform: rotate(15deg);
}

[data-theme="dark"] .theme-toggle-btn,
[data-bs-theme="dark"] .theme-toggle-btn {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .theme-toggle-btn:hover,
[data-bs-theme="dark"] .theme-toggle-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Improved Mobile Hamburger Menu */
.navbar-toggler {
    border: 2px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: var(--bg-tertiary);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.25);
    border-color: var(--primary-color);
    outline: none;
}

.navbar-toggler:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    transform: scale(1.05);
}

.navbar-toggler:hover .navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.5em;
    height: 1.5em;
    transition: all 0.3s ease;
}

[data-theme="dark"] .navbar-toggler-icon,
[data-bs-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28249, 250, 251, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-toggler[aria-expanded="true"] {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    filter: brightness(0) invert(1);
    transform: rotate(90deg);
}

/* Mobile Menu Improvements */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 1.5rem;
        padding: 0;
        background: var(--card-bg);
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--border-color);
        border: none;
        overflow: hidden;
        animation: slideDown 0.3s ease-out;
    }

    [data-theme="dark"] .navbar-collapse,
    [data-bs-theme="dark"] .navbar-collapse {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--border-color);
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .navbar-nav {
        gap: 0;
        padding: 0.75rem;
    }

    .nav-item {
        margin-bottom: 0.5rem;
    }

    .nav-item:last-child {
        margin-bottom: 0;
    }

    .nav-link {
        padding: 1rem 1.25rem !important;
        border-radius: 12px;
        transition: all 0.3s ease;
        font-weight: 500;
        font-size: 1rem;
        position: relative;
        display: flex;
        align-items: center;
        color: var(--text-primary) !important;
    }

    .nav-link::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 0;
        background: var(--gradient-primary);
        border-radius: 0 4px 4px 0;
        transition: height 0.3s ease;
    }

    .nav-link:hover {
        background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, transparent 100%);
        color: var(--primary-color) !important;
        padding-left: 1.5rem;
        transform: translateX(4px);
    }

    .nav-link:hover::before {
        height: 60%;
    }

    .nav-link.active {
        background: linear-gradient(90deg, rgba(16, 185, 129, 0.15) 0%, transparent 100%);
        color: var(--primary-color) !important;
        font-weight: 600;
        padding-left: 1.5rem;
    }

    .nav-link.active::before {
        height: 80%;
    }

    .nav-link.active::after {
        display: none;
    }

    /* Theme Toggle in Mobile Menu */
    .navbar-nav .nav-item:last-child {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border-color);
    }

    .navbar-nav .theme-toggle-btn {
        width: 100%;
        height: 48px;
        border-radius: 12px;
        justify-content: center;
        margin: 0;
        background: var(--bg-tertiary);
        border: 2px solid var(--border-color);
        font-weight: 500;
        color: var(--text-primary) !important;
    }

    .navbar-nav .theme-toggle-btn:hover {
        background: var(--gradient-primary);
        border-color: transparent;
        color: white !important;
        transform: scale(1.02);
    }

    .navbar-nav .theme-toggle-btn span {
        font-size: 0.95rem;
    }
}

/* Map Card Styling */
.map-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent !important;
    overflow: hidden;
}

.map-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color) !important;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.25) !important;
}

#map {
    border-radius: 8px;
    overflow: hidden;
}

[data-theme="dark"] .map-card,
[data-bs-theme="dark"] .map-card {
    background-color: var(--card-bg) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .map-card:hover,
[data-bs-theme="dark"] .map-card:hover {
    box-shadow: 0 10px 30px rgba(52, 211, 153, 0.3) !important;
}

/* Leaflet map dark mode adjustments */
[data-theme="dark"] .leaflet-container,
[data-bs-theme="dark"] .leaflet-container {
    filter: brightness(0.85) contrast(1.1);
}

/* DNS Server List Styling */
.server-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.server-item:last-child {
    border-bottom: none;
}

.server-item:hover {
    background-color: rgba(16, 185, 129, 0.05);
}

.server-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-shrink: 0;
    max-width: 30%;
}

.server-location {
    font-weight: 600;
    display: flex;
    align-items: center;
    color: var(--text-primary);
}

.server-flag {
    font-size: 1.5rem;
    margin-right: 0.5rem;
    line-height: 1;
}

.server-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.server-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-grow: 1;
    justify-content: flex-end;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 100px;
    justify-content: center;
}

.status-propagated {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-failed {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.server-ip {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Fira Mono', 'Droid Sans Mono', 'Source Code Pro', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .server-item:hover,
[data-bs-theme="dark"] .server-item:hover {
    background-color: rgba(52, 211, 153, 0.1);
}

[data-theme="dark"] .server-ip,
[data-bs-theme="dark"] .server-ip {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

/* SEO Content Styling */
.seo-content p,
.seo-content ul li,
.seo-content ol li {
    font-size: 18px !important;
    line-height: 1.6;
}

.accordion-button {
    font-size: 18px;
    font-weight: 600;
}

.accordion-body {
    font-size: 18px;
}