/* ------------------------------
   Global
------------------------------ */

*{

    margin:0;
    padding:0;
    box-sizing:border-box;

}


body{

    font-family:Arial, Helvetica, sans-serif;

    background:#f3f4f6;

    color:#1f2937;

}



/* ------------------------------
   Main Container
------------------------------ */

.container{

    max-width:850px;

    margin:60px auto;

    background:white;

    padding:45px;

    border-radius:22px;

    box-shadow:0 15px 40px rgba(0,0,0,0.08);

}



/* ------------------------------
   Header
------------------------------ */

h1{

    text-align:center;

    font-size:42px;

    margin-bottom:12px;

}


.subtitle{

    text-align:center;

    color:#6b7280;

    font-size:18px;

    margin-bottom:40px;

}



/* ------------------------------
   Converter Card
------------------------------ */

.converter{

    background:#f9fafb;

    border-radius:20px;

    padding:40px;

    border:1px solid #e5e7eb;

    box-shadow:0 5px 20px rgba(0,0,0,.05);

    display:flex;

    flex-direction:column;

    gap:40px;

}



/* ------------------------------
   Input Rows
------------------------------ */

.row{

    display:flex;

    flex-direction:column;

    gap:12px;

}


.row:not(:first-child){

    margin-top:25px;

}



/* ------------------------------
   Inputs
------------------------------ */

select,
input{

    width:100%;

    height:58px;

    padding:15px 18px;

    background:white;

    border:2px solid #d1d5db;

    border-radius:14px;

    font-size:18px;

    outline:none;

    transition:.2s;

}



select:hover,
input:hover{

    border-color:#93c5fd;

}



select:focus,
input:focus{

    border-color:#2563eb;

    box-shadow:0 0 0 4px rgba(37,99,235,.12);

}



/* ------------------------------
   Buttons
------------------------------ */

button{

    width:100%;

    min-height:58px;

    padding:0 25px;

    border:none;

    border-radius:14px;

    background:#2563eb;

    color:white;

    font-size:18px;

    cursor:pointer;

    transition:.2s;

    white-space:nowrap;

}


button:hover{

    background:#1d4ed8;

    transform:translateY(-2px);

}


button:active{

    transform:scale(.98);

}



/* ------------------------------
   Swap Button
------------------------------ */

#swapBtn{

    margin:5px 0;

}



/* ------------------------------
   Available Units
------------------------------ */

.available-units{

    background:white;

    padding:22px;

    border-radius:16px;

    border:1px solid #e5e7eb;

}



.available-units strong{

    display:block;

    color:#2563eb;

    font-size:18px;

    margin-bottom:10px;

}



#availableUnits p{

    color:#6b7280;

    line-height:1.8;

    font-size:16px;

}



/* ------------------------------
   Result Box
------------------------------ */

.result-box{

    margin-top:30px;

    background:#eff6ff;

    border-radius:18px;

    padding:30px;

    border:1px solid #bfdbfe;

}



.result-box h2{

    margin-bottom:15px;

    font-size:22px;

}



#result{

    font-size:36px;

    font-weight:bold;

    color:#2563eb;

    word-break:break-word;

}



/* ------------------------------
   Result Buttons
------------------------------ */

.result-buttons{

    display:flex;

    gap:15px;

    margin-top:25px;

}



.result-buttons button{

    flex:1;

}



#clearBtn{

    background:#dc2626;

}



#clearBtn:hover{

    background:#b91c1c;

}

/* ------------------------------
   Formula Box
------------------------------ */

.formula-box{

    margin-top:30px;

    background:white;

    border:1px solid #e5e7eb;

    border-radius:16px;

    padding:22px;

}


.formula-box h3{

    color:#2563eb;

    font-size:20px;

    margin-bottom:12px;

}


#formula{

    color:#4b5563;

    font-size:17px;

    line-height:1.8;

}

/* ------------------------------
   Information Sections
------------------------------ */

.info-section{

    margin-top:50px;

    background:white;

    padding:30px;

    border-radius:18px;

    border:1px solid #e5e7eb;

}


.info-section h2{

    color:#2563eb;

    margin-bottom:15px;

    font-size:26px;

}


.info-section p{

    color:#4b5563;

    line-height:1.8;

    margin-bottom:15px;

}


.info-section ol{

    padding-left:25px;

    color:#4b5563;

    line-height:1.9;

}

/* ------------------------------
   Mobile
------------------------------ */

@media(max-width:700px){


.container{

    margin:20px;

    padding:25px;

}


.converter{

    padding:22px;

}


h1{

    font-size:34px;

}


#result{

    font-size:28px;

}


}

/* =====================================
   Navigation
====================================== */

/* =====================================
   Navigation
====================================== */

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}


.logo a {
    color: #1f2937;
    text-decoration: none;
    font-size: 22px;
    font-weight: bold;
}


.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}


.nav-links > a {
    color: #4b5563;
    text-decoration: none;
    font-weight: 600;
    margin: 0;
    padding: 0;
    transition: .2s;
}


.nav-links > a:hover {
    color: #2563eb;
}


.nav-links a:hover{

    color:#2563eb;

}


/* =====================================
   Back to Top
====================================== */

#backToTop{

    position:fixed;

    bottom:30px;

    right:30px;

    width:52px;

    height:52px;

    border:none;

    border-radius:50%;

    background:#2563eb;

    color:white;

    font-size:24px;

    font-weight:bold;

    cursor:pointer;

    display:none;

    align-items:center;

    justify-content:center;

    box-shadow:0 6px 18px rgba(0,0,0,.18);

    transition:.2s;

    z-index:999;

}


#backToTop:hover{

    background:#1d4ed8;

    transform:translateY(-3px);

}


#backToTop:active{

    transform:scale(.95);

}


/* =====================================
   Mobile Navigation
====================================== */

@media(max-width:700px){

    nav{

        padding:18px 20px;

    }


    .nav-links{

        gap:14px;

        font-size:14px;

    }


    #backToTop{

        width:46px;

        height:46px;

        right:20px;

        bottom:20px;

        font-size:21px;

    }

}

/* =====================================
   Tools Dropdown Navigation
====================================== */

.tools-dropdown {

    position: relative;

    display: inline-block;

}


.tools-dropdown-button {

    background: none;

    border: none;

    color: #4b5563;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 16px;

    font-weight: 600;

    cursor: pointer;

    padding: 0;

    margin: 0;

}


.tools-dropdown-button:hover {

    background: none;

    color: #4b5563;

}


/* Dropdown menu */

.tools-dropdown-menu {

    display: none;

    position: absolute;

    right: 0;

    top: 100%;

    width: 240px;

    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 12px;

    box-shadow: 0 10px 30px rgba(0,0,0,0.12);

    padding: 8px;

    z-index: 2000;

}


/* Keep dropdown open while hovering */

.tools-dropdown:hover .tools-dropdown-menu {

    display: block;

}


/* Dropdown links */

.tools-dropdown-menu a {

    display: block;

    padding: 11px 14px;

    color: #374151;

    text-decoration: none;

    border-radius: 8px;

    font-size: 15px;

    font-weight: 600;

}

.tools-dropdown-menu a:hover {

    background: #f3f4f6;

    color: #2563eb;

}


/* Current tool */

.tools-dropdown-menu a.current-tool {

    background: #eff6ff;

    color: #2563eb;

    font-weight: bold;

}

.tools-dropdown-menu a.current-tool:hover {

    background: #dbeafe;

    color: #1d4ed8;

}

/* =====================================
   Final Unit Converter Navbar Size Fix
====================================== */

nav {
    height: 65px !important;
    min-height: 65px !important;
    padding: 0 40px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    background: white !important;
    border-bottom: 1px solid #e5e7eb !important;

    position: sticky !important;
    top: 0 !important;

    z-index: 1000 !important;
}


.logo a {
    font-size: 22px !important;
    line-height: 1 !important;
}


.nav-links {
    display: flex !important;
    align-items: center !important;
    gap: 25px !important;

    height: 100% !important;
}


.nav-links > a {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}


.tools-dropdown {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}


.tools-dropdown-button {
    width: auto !important;
    min-height: 0 !important;

    padding: 0 !important;
    margin: 0 !important;

    background: none !important;
    color: #4b5563 !important;

    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;

    border: none !important;
}


.tools-dropdown-button:hover {
    background: none !important;
    color: #4b5563 !important;
}

/* =====================================
   Unit Converter - Mobile Optimization
====================================== */

@media (max-width:700px){

    .container{

        width:calc(100% - 20px);

        max-width:none;

        margin:20px auto;

        padding:25px 18px;

        border-radius:18px;

    }


    h1{

        font-size:32px;

        line-height:1.15;

    }


    .subtitle{

        font-size:16px;

        line-height:1.5;

        margin-bottom:28px;

    }


    .converter{

        padding:20px;

        gap:25px;

        border-radius:16px;

    }


    select,
    input{

        height:54px;

        font-size:16px;

        padding:12px 14px;

    }


    button{

        min-height:54px;

        font-size:16px;

    }


    .result-box{

        padding:22px;

    }


    #result{

        font-size:28px;

    }


    .result-buttons{

        gap:10px;

    }


    .available-units,
    .formula-box,
    .info-section{

        padding:20px;

    }


    .info-section h2{

        font-size:23px;

    }

}

/* =====================================
   Back to Top - Perfect Circle
====================================== */

#backToTop {

    width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;

    padding: 0 !important;

    border-radius: 50% !important;

    display: none;
    align-items: center;
    justify-content: center;

}


/* Mobile */

@media (max-width:700px) {

    #backToTop {

        width: 46px !important;
        height: 46px !important;
        min-height: 46px !important;

    }

}

/* =====================================
   Share This Tool
====================================== */

.share-section {

    width: 100%;

    max-width: 700px;

    margin: 60px auto 40px auto;

    padding: 35px 25px;

    text-align: center;

    background: #f3f4f6;

    border-radius: 16px;

}


.share-section h2 {

    margin: 0 0 10px 0;

    text-align: center;

}


.share-section p {

    color: #6b7280;

    margin: 0 auto 20px auto;

    text-align: center;

}


#shareButton {

    display: block;

    margin: 0 auto;

    background: #2563eb;

    color: white;

    border: none;

    padding: 12px 24px;

    border-radius: 10px;

    font-size: 16px;

    cursor: pointer;

    transition: 0.2s;

}


#shareButton:hover {

    background: #1d4ed8;

}
#shareButton {
    width: auto !important;
    min-width: 0 !important;
    display: block;
    margin: 0 auto;
}