* {
    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 */
.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;
}

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

.converter-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.currency-input-group {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.currency-input-group:hover {
    border-color: #007bff;
}

.currency-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.currency-selector {
    position: relative;
    margin-bottom: 1rem;
}

.currency-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #e9ecef;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: space-between;
}

.currency-button:hover {
    background: #dee2e6;
    border-color: #007bff;
}

.currency-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.currency-flag {
    width: 32px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #dee2e6;
}

.currency-code {
    font-weight: bold;
    color: #007bff;
    font-size: 1.1rem;
}

.dropdown-arrow {
    font-size: 1.2rem;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.currency-button.active .dropdown-arrow {
    transform: rotate(180deg);
}

.currency-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.currency-list.show {
    display: block;
}

.currency-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

.currency-list li:hover {
    background: #f8f9fa;
}

.currency-list li:last-child {
    border-bottom: none;
}

.currency-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
    transition: all 0.3s ease;
}

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

.currency-input:read-only {
    background: #f8f9fa;
    color: #007bff;
}

.exchange-button {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.exchange-button:hover {
    background: #0056b3;
    transform: scale(1.1) rotate(180deg);
}

.convert-section {
    text-align: center;
    margin-bottom: 2rem;
}

.convert-button {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.convert-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.rate-info {
    background: #fff;
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    margin-bottom: 2rem;
    text-align: center;
}

.rate-display {
    font-size: 1.2rem;
    color: #495057;
    margin-bottom: 0.5rem;
}

.rate-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
}

.popular-currencies {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid #e9ecef;
}

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

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

.popular-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.popular-item:hover {
    background: #e9ecef;
    border-color: #007bff;
}

.popular-flag {
    width: 40px;
    height: 30px;
    border-radius: 4px;
    object-fit: cover;
    margin-bottom: 0.5rem;
    border: 1px solid #dee2e6;
}

.popular-code {
    font-weight: bold;
    color: #007bff;
    font-size: 0.9rem;
}

.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-item {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: #495057;
}

.example-item:last-child {
    margin-bottom: 0;
}

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


.loading {
    color: #007bff;
    font-style: italic;
}
@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;
    }

    .converter-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .exchange-button {
        transform: rotate(90deg);
        margin: 1rem auto;
    }

    .exchange-button:hover {
        transform: rotate(270deg) scale(1.1);
    }

    .popular-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .main-content {
        padding: 1rem;
    }

    .search_area {
        display: none;
    }
}

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

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

    .converter-section, .rate-info, .popular-currencies {
        padding: 1rem;
    }

    .currency-input-group {
        padding: 1rem;
    }

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

    .logo {
        font-size: 1.5rem;
    }



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