* {
    box-sizing: border-box;
}

/* ========== Colors ========== */
:root {
    --primary-color: #1b3b59;   /* Primary Color */
    --secondary-color: #ff9191; /* Used in Himepage's Rounded Image */
    --fade-bg-color: #254e70;   /* Fade color in Result Box */
    --fade-text-color: #aad8f0; /* Fade Text */
    --button-hover-bg-color: #e04143;   /* Button's Normal Background Color */
    --button-bg-color: #ff4d4f; /* Button's Hover Background Color */
}

/* ========== END -- Colors ========== */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #e9eef5;
    color: #333;
    line-height: 1.5;
    height: 100vh;
}

a {
    text-decoration: none;
}

h1 {
    font-size: 28px;
    margin: 0 0 10px 0;
}

h2 {
    font-size: 24px;
    margin: 0 0 10px 0;
}

h3 {
    font-size: 20px;
    margin: 0 0 10px 0;
}

p {
    margin: 0;
    margin-bottom: 16px;
}

p:last-child {
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-logo {
    width: auto;
    height: 28px;
    margin: 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    /* font-size: 1.5rem;
    font-weight: bold;
    color: white; */
    text-decoration: none;
    display: flex;
    align-items: center;
}

.navbar-nav {
    display: flex;
    column-gap: 20px;
}

.navbar-nav a {
    text-decoration: none;
    color: white;
    font-size: 1rem;
    transition: color 0.3s;
}

.navbar-nav a:hover {
    color: var(--fade-text-color);
}

.navbar-toggler {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.inner-container {
    margin: 20px 0;
    padding: 10px;
}

.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
    color: var(--fade-text-color);
    margin: 0 7px 0 2px;
    font-size: 13px;
    transform: translateY(-2px);
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.text-center {
    text-align: center;
}

.alert {
    position: relative;
    padding: 8px 12px;
    margin: 10px 0;
    color: #000;
    font-size: 15px;
    background-color: #dee2e6;
    border: 1px solid #cbcbcb;
    border-radius: 6px;
}

.alert-danger {
    color: #58151c;
    background-color: #f8d7da;
    border: 1px solid #58151c;
}

.alert-success {
    color: #0a3622;
    background-color: #d1e7dd;
    border: 1px solid #0a3622;
}

.alert-warning {
    color: #664d03;
    background-color: #fff3cd;
    border: 1px solid #664d03;
}

.alert-info {
    color: #055160;
    background-color: #9eeaf9;
    border: 1px solid #055160;
}

.input-group {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.form-control {
    flex: 1;
    display: block;
    width: 100%;
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #dee2e6;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 6px;
    outline: none;
}

.btn {
    padding: 10px 20px;
    background-color: var(--button-bg-color);
    color: #fff;
    text-transform: uppercase;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--button-hover-bg-color);
}

/* .cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cta a {
    color: var(--fade-text-color);
    text-decoration: none;
    font-weight: bold;
}

.cta a:hover {
    text-decoration: underline;
} */

.ip-inner-container {
    color: #ffffff;
    background-color: var(--primary-color);
    border-radius: 12px;
    max-width: 900px;
    padding: 25px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
}

.ip-inner-container h1 {
    font-size: 28px;
    text-align: center;
    display: block;
    margin: 0 0 20px 0;
    border-bottom: 1px solid var(--fade-bg-color);
    padding-bottom: 10px;
}

.section:not(:last-child) {
    width: 100%;
    margin-bottom: 20px;
}

.section h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--fade-text-color);
}

.info:not(:last-child) {
    margin-bottom: 16px;
}

.info span {
    font-weight: bold;
    color: var(--fade-text-color);
}

.ip-info-container {
    background-color: var(--fade-bg-color);
    padding: 20px 15px;
    border-radius: 8px;
    position: relative;
    margin-top: 10px;
    color: var(--fade-text-color);
}

.ip-info-container .ip-info span:first-child {
    width: 100px;
    font-weight: 300;
    display: inline-block;
}

.ip-info-container span:last-child {
    color: #ededed;
}

.ip-info-container .ip-address {
    font-size: 20px;
}

.ip-info-container:before {
    content: '';
    position: absolute;
    top: -10px;
    left: 70px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--fade-bg-color);
}

.map {
    width: 100%;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--fade-text-color);
}


/* Container for homepage */
.home-inner-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.home-inner-container a {
    color: #333;
}

.home-inner-container a:hover {
    color: #0063bf;
}

.home-inner-container .card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    height: 100%;
    text-align: center;
    transition: transform 0.3s ease;
}

.home-inner-container .card:hover {
    transform: translateY(-5px);
}

.home-inner-container .card h3 {
    font-size: 18px;
    margin: 0;
}

.rounded-image {
    width: 70px;
    height: 70px;
    margin-bottom: 15px;
    border-radius: 50%;
    border: 4px solid var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2em;
    color: white;
    overflow: hidden;
    box-shadow: 0 1px 8px 3px rgba(0, 0, 0, 0.12);
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;

}

.footer>.container {
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 18px;
}

.copyright {
    margin: 0;
}

.footer-links a {
    color: var(--fade-text-color);
    text-decoration: none;
    margin: 0 10px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .inner-container {
        padding: 20px 15px;
    }

    .navbar-nav {
        display: none;
    }

    .navbar-toggler {
        display: block;
    }

    .navbar-collapse {
        display: none;
        flex-direction: column;
        background-color: var(--fade-bg-color);
        position: absolute;
        top: 100%;
        right: 0;
        width: 100%;
        border-top: 1px solid var(--fade-text-color);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .navbar-collapse.active {
        display: flex;
    }

    .navbar-collapse a {
        padding: 10px 20px;
        /* border-bottom: 1px solid var(--fade-text-color); */
        color: white;
        text-align: left;
    }

    .navbar-collapse a:hover {
        background-color: var(--primary-color);
    }

    .footer>.container {
        flex-direction: column;
    }

    .home-inner-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 500px) {
    .home-inner-container {
        grid-template-columns: repeat(2, 1fr);
    }
}