/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

html {
  scroll-behavior: smooth;
}

.side-menu {
    position: fixed;
    top: 0px;
    width: 100vw;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 100;
    max-height: 100vh;
}

.side-menu.show {
    transform: translateY(20%);
}


.side-menu nav {
    padding: 20px;
}

.side_search_area {
    margin-bottom: 20px;
}

.side_searchBar {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s ease;
}

.side_searchBar:focus {
    border-color: #4a90e2;
}

.side-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-menu li {
    margin-bottom: 10px;
}

.side-menu a {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 18px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.side-menu a:hover {
    background-color: #f5f5f5;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 999;
}


.logo {
    width: 210px;
    margin-top: 10px;
    cursor: pointer;
}

.search_area {
    flex: 1;
    max-width: 600px;
    margin: 0 20px;
}

.search_bar {
    position: relative;
    width: 100%;
}

.search_bar::after {
    cursor: pointer;
    content: "\f002"; 
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
}

.search_bar input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    font-size: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search_bar input:focus {
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.15);
}

.search-results {
    z-index: 1000;
    position: absolute;
    top: 150%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1000;
}

.search-results.visible {
    display: block;
}

.search-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover,
.search-item.selected {
    background-color: #f5f5f5;
}

.search-item-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.search-item-category {
    font-size: 12px;
    color: #666;
}

.search-item.no-result {
    text-align: center;
    color: #999;
    cursor: default;
    padding: 20px;
}

.search-item.no-result:hover {
    background: white;
}

.ham-menu {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
}

.ham-menu.active #bar1 {
    transform: rotate(-45deg) translate(-5px, 5px);
}

.ham-menu.active #bar2 {
    opacity: 0;
}

.ham-menu.active #bar3 {
    transform: rotate(45deg) translate(-5px, -5px);
}

.nav-links {
    display: none;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-links a:hover {
    background-color: #f8f9fa;
}

#allTools-btn{
    background: rgb(0, 123, 0255);
    border-radius: 5px;
    padding: 10px 15px;
}

#allTools-btn:hover{
    background: rgb(0, 113, 234);
}

.title {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    overflow: hidden;
    padding: 3rem 2rem;
}

.title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 110, 199, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(99, 179, 237, 0.3) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 30%;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape:nth-child(3) {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 20%;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(120deg); }
    66% { transform: translateY(-15px) rotate(240deg); }
}

.title-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    color: #1a1a1a;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.title h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.title h1 .highlight {
    background: linear-gradient(45deg, #007bff, #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    opacity: 0.9;
    line-height: 1.6;
}


#container {
    margin-top: 60px;
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}


.tools-header {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.tools-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tools-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.boxes {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.category {
    margin-bottom: 3rem;
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    scroll-margin-top: 75px;
}

.category-title {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.category-icon {
    width: 32px;
    height: 32px;
    margin-right: 12px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}


.converter .category-title {
    color: #007bff;
    border-bottom-color: #007bff;
}

.generator .category-title {
    color: #ffc107;
    border-bottom-color: #ffc107;
}

.calculators .category-title {
    color: #28a745;
    border-bottom-color: #28a745;
}

.others .category-title {
    color: #6f42c1;
    border-bottom-color: #6f42c1;
}


.category-tools {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    background: #ffffff;
}


.converter .box:hover {
    border-color: #007bff;
}

.generator .box:hover {
    border-color: #ffc107;
}

.calculators .box:hover {
    border-color: #28a745;
}

.others .box:hover {
    border-color: #6f42c1;
}

.box h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.box img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.box:hover img {
    transform: scale(1.1);
}

.box p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 2rem;
    text-align: center;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

footer a{
    color: #dddddd;
}

.foot-word {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}


@media (min-width: 768px) {
    .nav-links {
        display: block;
    }
    
    .ham-menu {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 15px;
    }
    
    .tools-header {
        padding: 1.5rem;
    }
    
    .tools-header h1 {
        font-size: 2rem;
    }
    
    .boxes {
        padding: 1rem;
    }
    
    .category {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .category-title {
        font-size: 1.3rem;
    }
    
    .category-icon {
        width: 28px;
        height: 28px;
    }
    
    .category-tools {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .box {
        padding: 1.25rem;
    }
    
    .box h3 {
        font-size: 1.1rem;
    }
    
    .box img {
        width: 48px;
        height: 48px;
    }

    .search_area {
        display: none;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }
    
    .tools-header {
        padding: 1rem;
    }
    
    .tools-header h1 {
        font-size: 1.75rem;
    }
    
    .boxes {
        padding: 0.5rem;
    }
    
    .category {
        padding: 1rem;
    }
    
    .category-title {
        font-size: 1.2rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .category-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .category-tools {
        grid-template-columns: 1fr;
    }
    
    .box {
        padding: 1rem;
    }
    
    .box img {
        width: 44px;
        height: 44px;
    }
    
    .box p {
        font-size: 0.85rem;
    }

}

