@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

/*All*/
* {
    box-sizing: border-box;
}

/*Body*/
body {
    margin: 0;
    padding: 0;
    background-color: #fff;
    display: flex;
    min-height: 100vh;
    scroll-behavior: smooth;
}

/*Headings*/
h1, h2, h3, h4 {
    font-family: "Roboto", sans-serif;    
}

/*Texts*/
p, tr, td, span, a, label, select, input, button, figcaption {
    font-family: "Inter", sans-serif;
}
label {
    font-size: 20px;
    line-height: 1.5em;
    font-weight: 600;
    color: #222;
} 

/*Select*/
.custom-select {
    position: relative;
    display: block;
    max-width: 100%;
}
.custom-select select {
    width: 100%;
    padding: 12px 40px 12px 16px; 
    font-size: 16px;
    color: #333333;
    background-color: #ffffff;
    border: 2px solid #cccccc;
    border-radius: 8px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.custom-select select:hover {
    border-color: #888888;
}
.custom-select select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.25);
}
.custom-select select:disabled {
    background-color: #f5f5f5;
    color: #999999;
    border-color: #dddddd;
    cursor: not-allowed;
}
.custom-select select::-ms-expand {
    display: none;
}

/*Input Number*/
input[type='number'] {
    width: 100%;
    padding: 12px 16px 12px 16px; 
    font-size: 16px;
    color: #333333;
    background-color: #ffffff;
    border: 2px solid #cccccc;
    border-radius: 8px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;    
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input[type='number']:hover {
    border-color: #888888;
}
input[type='number']:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.25);
}
input[type='number']:disabled {
    background-color: #f5f5f5;
    color: #999999;
    border-color: #dddddd;
    cursor: not-allowed;
}
input[type='number']::-ms-expand {
    display: none;
}

/*Mobile Header (Hidden on Desktop)*/
.mobile-header {
    display: none;
    background-color: #065DD8;
    color: #ffffff;
    padding: 16px;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    z-index: 40;
}
.menu-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    }
.menu-btn svg {
    width: 36px;
    height: 36px;
}

/*Sidebar Container*/
.sidebar {
    width: 350px;
    background-color: #065DD8;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 25px;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    z-index: 50;
}
.sidebar-header {
    margin-bottom: 40px;
}
.sidebar-header img {
    margin: auto;
    display: block;
    max-width: 100%;
    height: auto;
    transition: all 0.8s ease-in-out
}
.sidebar-header img:hover {
    opacity: 0.8;
}
.close-btn {
    display: none; 
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
}
.close-btn svg {
    width: 24px;
    height: 24px;
}
.square-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    align-content: start; 
}
.nav-link {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    border-radius: 12px;
    padding: 10px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    aspect-ratio: 1 / 1; 
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    line-height: 1.3em;
}
.nav-link i {
    font-size: 30px;
    margin-bottom: 5px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/*Pro*/
#pro {
    width: 100%;
    margin-top: 10px;
}
#pro p {
    text-align: center;
    color: #fff;
    line-height: 1.5em;
}
.compare-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #0f172a;
    color: #ffffff;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.compare-btn .arrow {
    transition: transform 0.2s ease;
}
.compare-btn:hover {
    background-color: #1e293b;
    transform: translateY(-1px);
}
.compare-btn:hover .arrow {
    transform: translateX(4px);
}

/*Main Content*/
.main-content {
    margin-left: 350px;
    padding: 32px;
    flex: 1;
    width: calc(100% - 350px);
}
.main-content #title h1 {
    font-size: 60px;
    color:#222;
    font-weight: 900;
    text-align: center;
    margin-bottom: 0px;
}
.main-content #title p {
    text-align: center;
    font-weight: 500;
    font-size: 25px;
    line-height: 1.5em;
    color: #555;
}
.main-content h2 {
    color:#333;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2em;
    background-color: #eee;
    border-radius: 12px;
    padding: 10px;
}
.main-content h3 {
    color:#444;
    font-size: 22px;
    font-weight: 500;
    line-height: 1.2em;
}
.main-content h4 {
    color:#555;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.2em;
    text-align: center;
}
.main-content img {
    max-width: 100%;
    margin: 50px auto 20px;
    height: auto;
    display: block;
}
.main-content figcaption {
    font-size: 14px;
    font-style: italic;
    text-align: center;
    color: #444;
    margin-bottom: 50px;
}
.main-content p {
    font-size: 17px;
    line-height: 1.5em;
    font-weight: 400;
    color: #333;
}  
.main-content button {
    background-color: #0a6bff;
    border-radius: 4px;
    border: 0;
    box-shadow: rgba(1,60,136,.5) 0 -1px 3px 0 inset,rgba(0,44,97,.1) 0 3px 6px 0;
    box-sizing: border-box;
    color: #fff;
    cursor: pointer;
    display: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
    margin: 0;
    min-height: 56px;
    width: 100%;
    padding: 16px 20px;
    position: relative;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    vertical-align: baseline;
    transition: all .2s cubic-bezier(.22, .61, .36, 1);
}
.main-content button:hover {
  background-color: #065dd8;
  transform: translateY(-2px);
}

/*Mobile Section*/
#mobilesection {
    width: 100%;
    margin: 60px auto 0px;
    display: none;
    align-items: center;
    gap: 20px;
}
#mobilesection div {
    width: 25%;
    background-color: #f8f8f8;
    border-radius: 12px;
    border: 1px #ddd solid;
    padding: 5px;    
}
#mobilesection div h2 {
    color: #065DD8;
    font-weight: 600;
    font-size: 18px;
    background: none;
    text-align: center;
}
#mobilesection div a {
    text-decoration: none;
}

/*Features*/
#features {
    width: 100%;
    margin: 60px auto 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}
#features div {
    width: 25%;
    background-color: #065DD8;
    border-radius: 12px;
    padding: 20px;    
}
#features div h2 {
    color: #fff;
    font-weight: 600;
    font-size: 24px;
    background: none;
    text-align: center;
}
#features div p {
    color: #eee;
}

/*Tools*/
#chain-calc, #gear-calc, #pressure-calc, #spoke-calc, #ebike-range-calc {
    width: 700px;
    margin: 70px auto 70px;
    border-radius: 12px;
    padding: 30px;
    box-sizing: border-box;
    background-color: #ffffff;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
    border-top: 5px solid #357BFA;
}
#c1-result, #p-result, #sp-result, #c10-result {
    font-weight: 800;
    font-size: 20px;
    text-align: center;
    line-height: 1.5em;
    background-color :#eee;
    padding: 20px;
    border-radius: 12px;
    display: none;
}
#c1-result div, #p-result div, #sp-result div, #table-container div, #c10-result div {
    padding: 20px 20px 1px 20px;
    background-color: #fff;
    border-radius: 12px;
    font-weight: 600!important;
    font-weight: bold;
    font-size: 17px;
    text-align: center;
}
#c1-result div img, #p-result div img, #sp-result div img, #table-container div img, #c10-result div img {
    margin-top: 8px;
    display: block;
}
table {
    width: 100%;
    margin: auto;
    border: none;
}
table th, table td {
    border: 1px solid #eee;
    padding: 10px;
} 

/*Version*/
table#version {
    width: 80%;
    margin: auto;
    border: none;
}
table#version th, table#version td {
    border: 1px solid #eee;
    padding: 10px;
} 
table#version a:hover {
    opacity: 0.8;
}
.fa-square-check {
    font-size: 22px;
    color: green;
}
.fa-square-xmark {
    font-size: 22px;
    color: red;
}

/*Footer*/
footer {
    box-sizing: border-box;
    text-align: center;
    margin: 18px auto 20px;
}
footer p, footer a {
    font-size: 13px;
    font-weight: 500;
    color: #eee;
    line-height: 1.5em;
    transition: all 0.8s ease;
}
footer a:hover {
    opacity: 0.8;
}

/* Responsive Breakpoint (Tablets and smaller) */
@media (max-width: 768px) {
.mobile-header {
    display: flex;
}
label {
    font-size: 17px;
}
#table-container {
    overflow-x: auto;
}
.main-content {
    margin-left: 0;
    width: 100%;
    margin-top: 64px; 
}
.main-content #title h1 {
    font-size: 36px;
}
.main-content #title p {
    font-size: 18px;
    }
.main-content h2 {
    font-size: 28px;
}
.main-content h3 {
    font-size: 20px;
}
table#version {
    width: 100%;
}
#features {
    flex-direction: column;
    gap: 15px;
}
#features div {    
    width: 100%;   
}
#mobilesection {
    display: flex;
}
#mobilesection {
    flex-direction: column;
    gap: 15px;
}
#mobilesection div {    
    width: 100%;   
}
.sidebar {
    transform: translateX(-100%);
}
.sidebar.open {
    transform: translateX(0); /* Slide in */
}
.close-btn {
    display: block;
}
.sidebar-header {
    margin-bottom: 24px;
}
.sidebar-header img {
    display: none;
}
}
