/* Body aur General Layout */
body {
    background-color: #12151f;
    color: #e0e0e0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header aur Footer */
header, footer {
    width: 100%;
    padding: 10px 10%;
    background-color: #1a1e2d;
    box-sizing: border-box;
    flex-shrink: 0;
    text-align: center;
    position: relative;
    z-index: 10;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.logo img { height: 50px; display: block; }
.menu ul { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; }
.menu ul li { margin-left: 30px; }
.menu ul li a { color: #e0e0e0; text-decoration: none; font-size: 16px; font-weight: bold; transition: color 0.3s ease; cursor: pointer; }
.menu ul li a:hover { color: #00c2ff; }

/* 3-Column Grid Layout */
.main-content-grid {
    width: 100%;
    max-width: 1600px;
    margin: 20px auto;
    padding: 0 10px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    flex-grow: 1;
    align-items: flex-start;
    box-sizing: border-box;
}

.center-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

/* Ads ki Styling */
.ad-placeholder-horizontal {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    margin: 0 0 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.ad-sidebar {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: sticky;
    top: 20px;
}
.ad-sidebar.left {
    width: 160px;
    height: 600px;
    overflow: hidden;
}
.ad-sidebar.right {
    width: 300px;
}
.ad-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.ad-box {
    width: 300px;
    height: 250px;
    overflow: hidden;
}

/* Main Speed Test Container */
.container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}
.container .header { display: flex; justify-content: space-between; font-size: 14px; color: #888; margin-bottom: 40px; }
.speed-gauge { margin-bottom: 50px; display: inline-block; }
.outer-ring { width: 220px; height: 220px; border-radius: 50%; padding: 10px; background: linear-gradient(145deg, #1e2233, #12151f); box-shadow: inset 8px 8px 16px #0e1018, inset -8px -8px 16px #1c2030; display: flex; justify-content: center; align-items: center; margin: 0 auto; }
.inner-ring { width: 190px; height: 190px; border-radius: 50%; background-color: #12151f; display: flex; justify-content: center; align-items: center; border: 2px solid #00c2ff; box-shadow: 0 0 15px #00c2ff, inset 0 0 15px #00c2ff; }
.go-button { width: 160px; height: 160px; border-radius: 50%; background-color: #12151f; display: flex; justify-content: center; align-items: center; font-size: 50px; font-weight: bold; color: white; cursor: pointer; transition: all 0.2s ease-in-out; }
.go-button:hover { background-color: #00c2ff; color: #12151f; box-shadow: 0 0 25px #00c2ff; }
.go-button.running { background-color: #FF3030; border-color: #FF6060; color: #FFFFFF; }
.results { display: flex; justify-content: space-around; margin-bottom: 50px; flex-wrap: wrap; gap: 10px; }
.result-box { width: 120px; }
.result-title { font-size: 12px; color: #888; margin-bottom: 5px; }
.result-value { font-size: 36px; font-weight: 700; color: #ffffff; }
.unit { font-size: 14px; color: #888; }
.container .footer { display: flex; justify-content: center; align-items: center; border-top: 1px solid #333; padding-top: 20px; flex-wrap: wrap; gap: 20px; }
.info-box { display: flex; align-items: center; text-align: left; }
.info-box img { width: 32px; height: 32px; margin-right: 15px; filter: invert(56%) sepia(88%) saturate(3015%) hue-rotate(167deg) brightness(102%) contrast(101%); }
.info { font-size: 14px; }
#isp, #server-location { font-weight: bold; }
#ip-address { color: #888; }

/* About Us Popup Styling */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}
.popup-content {
    background-color: #1a1e2d;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    width: 90%;
    max-width: 600px;
    position: relative;
    color: #e0e0e0;
    text-align: left;
}
.popup-content h2 {
    margin-top: 0;
    color: #00c2ff;
}
.popup-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    transition: color 0.3s;
}
.popup-close:hover {
    color: #fff;
}


/* Responsive Design */
@media (max-width: 1200px) {
    .ad-sidebar {
        display: none;
    }
    .main-content-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }
    .menu ul {
        justify-content: center;
        flex-wrap: wrap;
    }
    .menu ul li {
        margin: 5px 15px;
    }
}







/* About Us Popup Styling */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}
.popup-content {
    background-color: #1a1e2d;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    width: 90%;
    max-width: 600px;
    position: relative;
    color: #e0e0e0;
    text-align: left;
}
.popup-content h2 {
    margin-top: 0;
    color: #00c2ff;
}
.popup-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    transition: color 0.3s;
}
.popup-close:hover {
    color: #fff;
}


/* Responsive Design */
@media (max-width: 1200px) {
    .ad-sidebar {
        display: none;
    }
    .main-content-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }
    .menu ul {
        justify-content: center;
        flex-wrap: wrap;
    }
    .menu ul li {
        margin: 5px 15px;
    }
}