* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.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 {
    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;
    z-index: 1000000;
}

.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);
}

.converter-container {
    max-width: 1200px;
    margin: 70px auto 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

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

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

.main-content {
    padding: 2rem;
}

.counter-display {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    margin-bottom: 2rem;
    border: 2px solid #e9ecef;
}

.counter-value {
    font-size: 6rem;
    font-weight: bold;
    color: #007bff;
    margin: 2rem 0;
    font-family: 'Courier New', monospace;
    letter-spacing: -0.05em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.counter-label {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.controls-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.control-btn {
    padding: 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.control-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-increment {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    transition: all 0.3s ease;
}

.btn-increment:hover {
    background: linear-gradient(135deg, #31d979, #2aba66);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(46, 204, 113, 0.4);
}

.btn-decrement {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    transition: all 0.3s ease;
}

.btn-decrement:hover {
    background: linear-gradient(135deg, #ff5e4d, #d94132);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(231, 76, 60, 0.4);
}

.btn-reset {
    background: linear-gradient(135deg, #7f8c8d, #707b7c);
    color: white;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    background: linear-gradient(135deg, #95a5a6, #808b8c);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(127, 140, 141, 0.4);
}


.settings-section {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid #e9ecef;
    margin-bottom: 2rem;
}

.settings-section h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #495057;
    font-size: 1.3rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.setting-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #007bff;
}

.setting-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
    display: block;
}

.setting-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.setting-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.counters-list {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid #e9ecef;
    margin-bottom: 2rem;
}

.counters-list h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #495057;
    font-size: 1.3rem;
}

.counter-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #007bff;
}

.counter-item-info {
    flex: 1;
}

.counter-item-name {
    font-weight: 600;
    color: #495057;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.counter-item-value {
    font-size: 2rem;
    font-weight: bold;
    color: #007bff;
    font-family: 'Courier New', monospace;
}

.counter-item-controls {
    display: flex;
    gap: 0.5rem;
}

.small-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.small-btn-plus {
    background: #6c9a6c;
    color: white;
}

.small-btn-plus:hover {
    background: #5d8a5d;
}

.small-btn-minus {
    background: #b85c5c;
    color: white;
}

.small-btn-minus:hover {
    background: #a84d4d;
}

.small-btn-delete {
    background: #6c757d;
    color: white;
}

.small-btn-delete:hover {
    background: #5a6268;
}

.add-counter-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.add-counter-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
}

.add-counter-btn {
    padding: 0.75rem 1.5rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-counter-btn:hover {
    background: #0056b3;
}

.conversion-info {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid #e9ecef;
    margin-top: 2rem;
}

.conversion-info h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #495057;
    font-size: 1.3rem;
}

.conversion-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.example-group {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #007bff;
}

.example-group h4 {
    margin-bottom: 1rem;
    color: #495057;
}

.example-group p {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

footer {
    background: #f8f9fa;
    color: #6c757d;
    padding: 1.5rem;
    text-align: center;
    margin-top: auto;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

footer a{
    color: #5c646c;
}

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

}

@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
    }

    .navbar {
        padding: 0 15px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .main-content {
        padding: 1rem;
    }

    .counter-value {
        font-size: 4rem;
    }

    .controls-section {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .conversion-examples {
        grid-template-columns: 1fr;
    }

    .counter-item {
        flex-direction: column;
        gap: 1rem;
    }

    .counter-item-controls {
        width: 100%;
        justify-content: center;
    }

    .search_area {
        display: none;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1.5rem;
    }

    .header h1 {
        font-size: 1.75rem;
    }

    .counter-value {
        font-size: 3rem;
    }

    .counter-display {
        padding: 2rem 1rem;
    }

    .main-content{
        padding: 0;
        margin: 0;
    }
}