
:root {
    --primary: #4f46e5;
    --secondary: #111827;
    --gray: #6b7280;
    --white: #ffffff;
    --bg: #f9fafb;
    --radius: 12px;
    --shadow: 0 10px 25px rgba(0,0,0,0.1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--secondary);
    line-height: 1.6;
    font-family: 'Lexend', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.nav {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.4rem;
    text-decoration: none;
    display: flex;
    align-items: center;
}
.logo img {
    height: 40px; /* Suggested size for logo */
    margin-right: 10px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.nav-links a,
.dropdown-menu a {
    text-decoration: none;
    color: var(--gray);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover,
.dropdown-menu a:hover {
    color: var(--primary);
}
.nav-item.dropdown {
    position: relative;
}
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.5rem;
    margin-top: 0.5rem;
    min-width: 220px;
    z-index: 110;
}
.nav-item.dropdown:hover .dropdown-menu {
    display: block;
}
.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
}
.hero {
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    color: var(--white);
    padding: 6rem 2rem;
    text-align: center;
    border-radius: 0 0 50px 50px;
}
.hero h1 {
    font-size: 3rem;
    font-weight: 800;
}
.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 1rem auto 0;
}
.container {
    max-width: 1200px;
    margin: auto;
    padding: 2rem;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(79,70,229,0.1);
}
.card h3 {
    margin: 0 0 1rem;
    color: var(--primary);
}
.card p {
    flex-grow: 1;
    margin-bottom: 1rem;
}
.btn {
    background: var(--primary);
    color: var(--white);
    padding: 0.9rem 1.8rem;
    border-radius: 8px;
    display: inline-block;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
input {
    width: 100%;
    padding: 1.2rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 1.3rem;
    margin: 1rem 0;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.2);
}
.res-box {
    background: #f0f7ff;
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px dashed var(--primary);
    margin: 2rem 0;
}
.res-val {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    line-height: 1.2;
}
.copy-box {
    background: var(--secondary);
    color: #94a3b8;
    padding: 1.5rem;
    border-radius: 10px;
    font-family: monospace;
    cursor: pointer;
    text-align: left;
    white-space: pre-wrap;
}
footer {
    background: var(--secondary);
    color: white;
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
    text-align: center;
}
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 120;
}
.burger div {
    width: 25px;
    height: 3px;
    background: var(--secondary);
    transition: all 0.3s;
}
#to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    font-size: 1.5rem;
}
#to-top.show {
    opacity: 1;
    visibility: visible;
}
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    z-index: 90;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    padding: 6rem 2rem 2rem;
    overflow-y: auto;
}
.mobile-nav.open {
    transform: translateX(0);
}
.mobile-nav a {
    display: block;
    padding: 1rem 0;
    font-size: 1.2rem;
    color: var(--secondary);
    text-decoration: none;
    border-bottom: 1px solid #e5e7eb;
}
.mobile-nav .sub-menu a {
    padding-left: 1.5rem;
    font-size: 1rem;
    border: none;
    color: var(--gray);
}
.mobile-nav .sub-menu {
    display: none;
}
.mobile-nav .mobile-category {
    font-weight: bold;
    color: var(--primary);
}
.faq-item {
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
}
.faq-item summary {
    font-weight: 600;
    cursor: pointer;
    list-style-position: inside;
    position: relative;
    padding-right: 2rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 0;
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.2s;
}
.faq-item[open] summary::after {
    content: '−';
    transform: rotate(45deg);
}
.faq-item p {
    margin-top: 1rem;
    padding-left: 1.2rem;
    color: var(--gray);
}
@media (max-width: 900px) {
    .nav-links { display: none; }
    .burger { display: flex; }
    .res-val { font-size: 2rem; }
}
.tool-content .card { display: flex; flex-direction: column; }
.tool-content .content-section { margin-top: 2rem; line-height: 1.7; }
.tool-content .res-box { margin: 1.5rem 0; padding: 1.5rem; }
.tool-content .copy-box { margin-top: 1rem; font-size: 0.95rem; }
.res-val {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    line-height: 1.2;
}
@media (max-width: 600px) {
    .res-val { font-size: 2rem; }
    .tool-content .card { padding: 1.5rem; }
}
