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

.settings-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.settings-group {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

.settings-group h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: #e9ecef;
    border-radius: 10px;
    font-size: 1.2rem;
    color: #495057;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.setting-label {
    display: flex;
    flex-direction: column;
}

.setting-title {
    font-weight: 600;
    color: #495057;
}

.setting-sublabel {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

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

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

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: #ccc;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-switch.active {
    background: #007bff;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active::after {
    transform: translateX(30px);
}

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

.generate-button {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    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(40, 167, 69, 0.3);
    margin: 0 0.5rem;
}

.generate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.clear-button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 0.5rem;
}

.clear-button:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

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

.password-output {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    color: #495057;
    word-break: break-all;
    margin-bottom: 1rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.password-output.has-password {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.password-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.action-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-button:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

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

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

.strength-bar {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    transition: all 0.5s ease;
    border-radius: 6px;
}

.strength-very-weak { background: #dc3545; width: 20%; }
.strength-weak { background: #fd7e14; width: 40%; }
.strength-fair { background: #ffc107; width: 60%; }
.strength-good { background: #20c997; width: 80%; }
.strength-strong { background: #28a745; width: 100%; }

.strength-label {
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.strength-very-weak-text { color: #dc3545; }
.strength-weak-text { color: #fd7e14; }
.strength-fair-text { color: #ffc107; }
.strength-good-text { color: #20c997; }
.strength-strong-text { color: #28a745; }

.strength-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.strength-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid #007bff;
}

.strength-item h4 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.strength-item p {
    color: #6c757d;
    font-size: 1.2rem;
    font-weight: bold;
}

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

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

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

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

.reference-item h4 {
    margin-bottom: 1rem;
    color: #495057;
}

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

/* Improved typography and spacing for the expanded reference content */
.reference-item h4 {
    font-size: 1.05rem;
    letter-spacing: 0.2px;
}

.reference-item ol,
.reference-item ul {
    margin-left: 1rem;
    margin-top: 0.5rem;
    color: #495057;
}

.reference-item ol li {
    margin-bottom: 0.6rem;
}

.reference-item ul li {
    margin-bottom: 0.45rem;
}

/* Highlight tips and examples */
.reference-item em {
    color: #343a40;
}

.reference-item code,
.reference-item .example {
    display: inline-block;
    background: #eef3f7;
    color: #0b3a53;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.92rem;
    margin-top: 0.25rem;
}

/* Slightly increase padding on larger screens for readability */
@media (min-width: 992px) {
    .reference-item {
        padding: 1.75rem;
    }
}

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


.copied-message {
    position: fixed;
    display: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #28a745;
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.copied-message.show {
    opacity: 1;
    display: block;
}

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

    .settings-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }


    .password-actions {
        flex-direction: column;
        align-items: center;
    }

    .action-button {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }

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

    .main-content {
        padding: 1rem;
    }

    .generate-button, .clear-button {
        display: block;
        margin: 0.5rem auto;
        width: 100%;
        max-width: 250px;
    }

    .search_area {
        display: none;
    }
}

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

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

    .settings-group, .password-display, .strength-meter, .reference-section {
        padding: 1rem;
    }

    .strength-details {
        grid-template-columns: 1fr;
    }

    .logo {
        font-size: 1.5rem;
    }

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