body {
    width: 100%;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    background-color: #ffffff;
    color: #2c3e50;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    padding-bottom: 60px;
}

ul {
    list-style: none;
}

.container {
    width: 50%;
    margin: 0 auto;
}

.home-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    width: 100%;
    margin: 0 auto;
}

.home-left {
    flex: 1;
}

.home-right {
    flex: 1;
}

.fontStyle {
    margin-top: 40px;
    margin-bottom: 30px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 2.2rem;
    color: #1a3a52;
    text-align: center;
}

.fontStyle2 {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    margin-left: 0; 
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 15px 0;
    width: 100%;
    text-align: center;
}

.logo img{
    width: 150px;
    height: auto;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.02);
}

#copyBtn {
    border-style: none;
    background: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    color: #2c5aa0;
}

#copyBtn:hover {
    transform: scale(1.1);
    color: #1a3a52;
}

.btn-secondary:hover {
  background-color: #1a3a52 !important;
  color: white;
}

.ipAddress {
    position: fixed;
    bottom: 65px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2c5aa0 0%, #1a3a52 100%);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
    z-index: 999;
    text-align: center;
    white-space: nowrap;
}

.ipAddressIntSpd {
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c5aa0 0%, #1a3a52 100%);
    color: #ffffff;
    padding: 14px 28px;
    font-size: 1.5em;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
    text-align: center;
    white-space: nowrap;
}

.ipAddress strong {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1em;
}

code {
    background: #f5f8fb;
    color: #2c5aa0;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Speed Test Styling */
.speedtest-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.speedtest-visual {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 20px 0;
}



.speedtest-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    margin: 20px 0;
}

.speed-metric {
    background: linear-gradient(135deg, #f5f8fb 0%, #eef3f8 100%);
    border: 1px solid #d0d7e0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.speed-metric:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.2);
}

.metric-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a3a52;
    margin-bottom: 10px;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c5aa0;
    margin: 10px 0;
}

.metric-unit {
    font-size: 0.9rem;
    color: #2c3e50;
}

.speed-metric-small {
    background: linear-gradient(135deg, #f5f8fb 0%, #eef3f8 100%);
    border: 1px solid #d0d7e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.speed-metric-small .metric-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a3a52;
    margin-bottom: 8px;
}

.speed-metric-small .metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c5aa0;
    margin: 8px 0;
}

.speed-metric-small .metric-unit {
    font-size: 0.8rem;
    color: #2c3e50;
}

.speedtest-progress {
    width: 100%;
    margin: 20px 0;
}

.test-status {
    text-align: center;
    font-weight: 600;
    color: #1a3a52;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #d0d7e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2c5aa0 0%, #1a3a52 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.test-details {
    background: #f5f8fb;
    border-left: 4px solid #2c5aa0;
    border-radius: 6px;
    padding: 20px;
    width: 100%;
}

footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed; 
    left: 0; 
    bottom: 0; 
    width: 100%; 
    background: #1a3a52;
    text-align: center; 
    padding: 12px 20px; 
    border-top: 1px solid #0f1e2e; 
    font-size: 13px; 
    color: white; 
    z-index: 1000;
    gap: 10px;
}

#pwgenBtn {
    display: none;
}

footer p {
    margin: 0; 
}

footer a {
    text-decoration: none;
    transition: opacity 0.3s ease;
}

footer a:hover {
    opacity: 0.8;
}

footer img {
    display: block;
    transition: transform 0.3s ease;
}

footer img:hover {
    transform: scale(1.05);
}

main {
    min-height: calc(100vh - 100px);
}

/* Tools Layout */
/* Dashboard Container */
    .tools-dashboard {
        display: flex;
        gap: 30px;
        margin-top: 30px;
        align-items: flex-start;
        min-height: 70vh;
    }

    /* Sidebar Styling */
    .sidebar-card {
        flex: 0 0 300px;
        background: #ffffff;
        border: 1px solid #e0e6ed;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(26, 58, 82, 0.08);
        position: sticky;
        top: 20px;
    }

    .sidebar-header {
        background: #1a3a52;
        color: #ffffff;
        padding: 20px;
        font-weight: 700;
        letter-spacing: 1px;
        text-transform: uppercase;
        font-size: 0.9rem;
        border-bottom: 3px solid #2c5aa0;
    }

    .tool-nav {
        padding: 10px 0;
    }

    .tool-link {
        display: flex;
        align-items: center;
        padding: 14px 24px;
        color: #546e7a !important;
        text-decoration: none !important;
        font-weight: 600;
        transition: all 0.25s ease;
        border-left: 4px solid transparent;
        margin: 4px 0;
    }

    .tool-link:hover {
        background: #f8fbff;
        color: #2c5aa0 !important;
        padding-left: 30px;
    }

    .tool-link.active {
        background: #f0f7ff;
        color: #1a3a52 !important;
        border-left: 4px solid #2c5aa0;
        background-image: linear-gradient(to right, #f0f7ff, #ffffff);
    }

    /* Tool Workspace (Right Side) */
    .tool-content {
        flex: 1;
        min-width: 0;
    }

    .tool-card-wrapper {
        background: #ffffff;
        border-radius: 12px;
        border: 1px solid #e0e6ed;
        box-shadow: 0 4px 20px rgba(26, 58, 82, 0.05);
        padding: 5px;
    }

    /* Breadcrumbs/Header for the tool area */
    .tool-header-area {
        margin-bottom: 20px;
        padding-left: 10px;
    }
    
    .tool-header-area h1 {
        font-size: 1.5rem;
        color: #1a3a52;
        font-weight: 700;
        margin-bottom: 5px;
    }

    .header-link {
    color: #ffffff !important; /* Keeps text white */
    text-decoration: none !important; /* Removes underline */
    display: block; /* Makes the whole header area clickable */
    width: 100%;
}

.tool-content .card {
    width: 100%; /* Force the card to fill the right column */
    border: 1px solid #e0e6ed;
    border-radius: 12px;
}

.card-body {
    padding: 2rem; /* Give the tools some breathing room */
}

.header-link:hover {
    color: #ffffff !important;
    text-decoration: none !important;
    opacity: 0.9; /* Subtle hint that it's clickable */
}

/* Unit Converter */
/* .wide-card { border-radius: 12px; background: #f8f9fa; }
.result-item { background: white; padding: 15px; border-radius: 8px; border: 1px solid #dee2e6; transition: 0.2s; }
.result-item:hover { border-color: #0d6efd; transform: translateY(-2px); }
.unit-label { font-size: 0.85rem; color: #6c757d; text-transform: uppercase; letter-spacing: 0.5px; }
.unit-value { font-size: 1.25rem; font-weight: 700; color: #212529; overflow-wrap: break-word; } */

    /* Responsive */
    @media (max-width: 992px) {
        .tools-dashboard {
            flex-direction: column;
        }
        .sidebar-card {
            flex: 1 1 100%;
            width: 100%;
            position: static;
        }
    }

/* Responsive Styles */
@media (max-width: 1260px) {
    body {
        width: 90%;
    }

    footer {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .logo img{
        width: 130px;
        height: auto;
    }

    .container {
        width: 100%;
        margin: 0 auto;
    }

    .home-layout {
        grid-template-columns: 2fr 1fr;
        gap: 25px;
    }

    .speedtest-results {
        grid-template-columns: repeat(3, 1fr);
    }

    .fontStyle {
        font-family: 'Segoe UI', sans-serif;
        font-size: 1.8rem;
        font-weight: 700;
        text-align: center;
    }

    .fontStyle2 {
        font-family: 'Segoe UI', sans-serif;
        font-size: 1rem;
        font-weight: 600;
        text-align: center;
    }

    .ipAddress {
        font-size: 13px;
        padding: 12px 20px;
        bottom: 65px;
    }

    #pwgenBtn {
        display: inline-block;
        text-align: center;
        align-items: center;
    }

    #pwgenHome a {
        display: none;
    }
}

@media (max-width: 768px) {
    body {
        width: 95%;
    }

    .home-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .speedtest-results {
        grid-template-columns: repeat(1, 1fr);
    }

    .ipAddress {
        font-size: 12px;
        padding: 10px 16px;
        bottom: 62px;
        white-space: normal;
        max-width: 90%;
    }
}