* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-blue: #013d7a;
    --secondary-blue: #0066cc;
    --accent-pink: #ff3366;
    --light-bg: #f0f7ff;
    --card-bg: #ffffff;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #e1e8f0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --footer-bg: #0a192f;
    --footer-text: #ccd6f6;
    --footer-heading: #e6f1ff;
    --footer-border: #233554;
    --footer-hover: #64ffda;
}

body {
    background: linear-gradient(135deg, #f0f7ff 0%, #e4edf5 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: white;
    position: sticky;
    top: 0;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo a {
    text-decoration: none;
    color: var(--footer-bg);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.logo a:hover {
    color: var(--accent-pink);
}

.nav-links {
    display: flex;
    margin-left: 30px;
}

.nav-item {
    position: relative;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 10px 16px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.links a {
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.links a:hover {
    color: #ff3366;
}

.nav-item:hover {
    color: #ff3366;
}

.dropdown-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-item:hover .dropdown-icon {
    transform: rotate(180deg);
}

.mega-dropdown {
    position: absolute;
    top: 45px;
    left: -750px;
    background-color: white;
    width: 1200px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 30px;
    display: none;
    z-index: 1001;
    grid-template-columns: repeat(6, 1fr);
    border-top: 3px solid #ff3366;
}

.nav-item:hover .mega-dropdown {
    display: grid;
    animation: fadeIn 0.3s ease;
}

.dropdown-section h3 {
    color: #013d7a;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.dropdown-section h3 i {
    margin-right: 10px;
    color: #ff3366;
    background: rgba(255, 51, 102, 0.1);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dropdown-link {
    display: flex;
    align-items: center;
    color: #333;
    text-decoration: none;
    font-size: 0.7rem;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.dropdown-link:hover {
    background-color: #f0f7ff;
    color: #ff3366;
}

.dropdown-link i {
    margin-right: 12px;
    color: #0066cc;
    width: 20px;
    text-align: center;
    font-size: 14px;
}

.mobile-toggle {
    margin-left: auto;
    display: none;
    background: none;
    border: none;
    color: #ff3366;
    font-size: 24px;
    cursor: pointer;
}

.mobile-sidebar {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: white;
    z-index: 999;
    transition: all 0.4s ease;
    overflow-y: auto;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-sidebar.active {
    left: 0;
}

.mobile-category {
    margin-top: 20px;
}

.mobile-category-title {
    font-size: 18px;
    color: #013d7a;
    font-weight: 500;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ff3366;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-category-title i {
    color: #ff3366;
}

.mobile-tool-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 8px;
    font-weight: 500;
    transition: all 0.2s;
    background: #f8fafd;
    color: #333;
}

.mobile-tool-link:hover {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    transform: translateX(5px);
    color: #ff3366;
}

.mobile-tool-link i {
    margin-right: 15px;
    color: #0066cc;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

main {
    flex: 1;
    padding: 30px 20px;
    max-width: 1000px;
    margin: 0 auto 200px;
    width: 100%;
}

.tool-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin-top: 20px;
    animation: fadeIn 0.8s ease-out;
}

.tool-header {
    color: var(--footer-bg);
    padding: 25px 30px;
    text-align: center;
}

.tool-header h1 {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 2.8rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tool-header p {
    opacity: 0.9;
    font-size: 1.1rem;
    max-width: 900px;
    margin: 0 auto;
}

.tool-body {
    padding: 30px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

.input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.input-container {
    flex: 1;
    min-width: 250px;
}

.input-container label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-container input,
.input-container select {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid #e1e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    background: rgba(0, 0, 0, 0.02);
}

.input-container input:focus,
.input-container select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.2);
    background: white;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.checkbox-container input {
    width: auto;
}

.btn-convert {
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 400px;
    margin: 20px auto 0;
}

.btn-convert:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--primary-blue);
}

.btn-convert:active {
    transform: translateY(0);
}

.result-container {
    position: relative;
    margin-top: 30px;
}

.result-container label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-box {
    background: linear-gradient(to right, #f8fafd, #edf5ff);
    border: 2px solid #e1e8f0;
    border-radius: 12px;
    padding: 25px;
    min-height: 150px;
    font-size: 1.2rem;
    line-height: 1.7;
    overflow-wrap: break-word;
    color: #013d7a;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

.copy-btn {
    position: absolute;
    top: 150px;
    right: 20px;
    background: #013d7a;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.copy-btn:hover {
    background: #0052a5;
}

.copy-btn:hover {
    background: #0066cc;
}

.examples {
    margin-top: 40px;
    background: linear-gradient(to bottom, #f0f7ff, #e1edfa);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid #d0e0f0;
}

.examples h3 {
    color: #013d7a;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.3rem;
}

.examples ul {
    list-style-type: none;
    padding-left: 0;
}

.examples li {
    padding: 12px 15px;
    border-bottom: 1px dashed #e1e8f0;
    display: flex;
    transition: all 0.2s;
}

.examples li:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateX(5px);
}

.examples li:last-child {
    border-bottom: none;
}

.number-col {
    width: 150px;
    font-weight: 600;
    color: #ff3366;
    font-size: 1rem;
}

.words-col {
    flex: 1;
    font-size: 1rem;
    color: #333;
}

.copyright {
    background: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    font-size: 0.95rem;
}

.pulse {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 1024px) {
    .mega-dropdown {
        width: 700px;
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
    .mobile-toggle {
        display: block;
    }
    .mega-dropdown {
        width: 500px;
        grid-template-columns: repeat(2, 1fr);
    }
    .tool-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .header {
        height: 70px;
    }
    .logo a {
        font-size: 22px;
    }
    .mobile-sidebar {
        top: 70px;
        height: calc(100vh - 70px);
    }
    .input-row {
        flex-direction: column;
    }
    .result-box {
        font-size: 1rem;
        padding: 20px;
    }
    .examples li {
        flex-direction: column;
    }
    .number-col {
        width: 100%;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .tool-header {
        padding: 20px 15px;
    }
    .tool-header h1 {
        font-size: 1.7rem;
    }
    .tool-body {
        padding: 20px;
    }
}