:root {
    --primary-blue: #013d7a;
    --secondary-blue: #0066cc;
    --accent-pink: #ff3366;
    --light-bg: #f0f7ff;
    --card-bg: #ffffff;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --success: #10b981;
    --warning: #f59e0b;
    --transition: all 0.3s ease;
    --footer-bg: #0a192f;
    --footer-text: #ccd6f6;
    --footer-heading: #e6f1ff;
    --footer-border: #233554;
    --footer-hover: #64ffda;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f0f7ff 0%, #e4edf5 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header Styles */
.header {
    background: white;
    position: sticky;
    top: 0;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: var(--shadow);
    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);
}

/* Navigation */
.nav-links {
    display: flex;
    margin-left: 30px;
}

.nav-item {
    position: relative;
    color: black;
    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: black;
    text-decoration: none;
    transition: all 0.3s ease;
}

.links a:hover {
    color: var(--accent-pink);
}

.nav-item:hover {
    color: var(--accent-pink);
}

.dropdown-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-item:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* Mega Dropdown Styles */
.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 var(--accent-pink);
}

.nav-item:hover .mega-dropdown {
    display: grid;
    animation: fadeIn 0.3s ease;
}

.dropdown-section h3 {
    color: var(--primary-blue);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.dropdown-section h3 i {
    margin-right: 10px;
    color: var(--accent-pink);
    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: var(--text-dark);
    text-decoration: none;
    font-size: 0.7rem;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.dropdown-link:hover {
    background-color: #f0f7ff;
    color: var(--accent-pink);
}

.dropdown-link i {
    margin-right: 12px;
    color: var(--secondary-blue);
    width: 20px;
    text-align: center;
    font-size: 14px;
}

/* Mobile Toggle */
.mobile-toggle {
    margin-left: auto;
    display: none;
    background: none;
    border: none;
    color: var(--accent-pink);
    font-size: 24px;
    cursor: pointer;
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 60px);
    background-color: white;
    z-index: 999;
    transition: all 0.4s ease;
    overflow-y: auto;
    padding: 20px;
    box-shadow: var(--shadow);
}

.mobile-sidebar.active {
    left: 0;
}

.mobile-category {
    margin-top: 20px;
}

.mobile-category-title {
    font-size: 18px;
    color: var(--primary-blue);
    font-weight: 500;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-pink);
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-category-title i {
    color: var(--accent-pink);
}

.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: var(--text-dark);
}

.mobile-tool-link:hover {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    transform: translateX(5px);
    color: var(--accent-pink);
}

.mobile-tool-link i {
    margin-right: 15px;
    color: var(--secondary-blue);
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Adjustments */
@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);
    }
}

@media (max-width: 768px) {
    .header {
        height: 70px;
    }

    .logo a {
        font-size: 22px;
    }

    .mobile-sidebar {
        top: 70px;
        height: calc(100vh - 70px);
    }
}

/* Tool Container */
.tool-container {
    max-width: 1200px;
    width: 100%;
    margin: 40px auto 200px;
    padding: 0 20px;
    flex: 1;
}

.tool-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 40px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.tool-header h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tool-header p {
    color: var(--text-light);
    font-size: 1.2rem;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

.io-container {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.input-area,
.output-area {
    flex: 1;
    position: relative;
}

.input-area h3,
.output-area h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--primary-blue);
    font-size: 1.4rem;
}

.input-area h3 i {
    color: var(--primary-blue);
    padding: 8px;
    border-radius: 50%;
}

.output-area h3 i {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    padding: 8px;
    border-radius: 50%;
}

textarea {
    width: 100%;
    height: 300px;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 17px;
    resize: vertical;
    transition: var(--transition);
    line-height: 1.7;
    background: #f8fafc;
}

textarea:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.output-text {
    background-color: #f0fdfa;
}

/* Controls */
.controls-container {
    background: #f8fafc;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.controls-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.controls-header h3 {
    color: var(--primary-blue);
    font-size: 1.3rem;
}

.options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-item input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-blue);
}

.option-item label {
    font-size: 16px;
    color: var(--text-dark);
    cursor: pointer;
}

.option-item .info {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 5px;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.25);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-process {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
}

.btn-copy {
    background: linear-gradient(135deg, var(--success), #34d399);
}

.btn-reset {
    background: linear-gradient(135deg, #64748b, #94a3b8);
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    background: linear-gradient(135deg, #f0f7ff, #e0f2fe);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--primary-blue);
}

.stat-text {
    font-size: 16px;
}

.stat-text strong {
    display: block;
    font-size: 24px;
    color: var(--primary-blue);
    margin-top: 5px;
}

.stat-item:nth-child(2) .stat-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-item:nth-child(3) .stat-icon {
    background: rgba(236, 72, 153, 0.1);
    color: var(--accent-pink);
}

.stat-item:nth-child(4) .stat-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

/* Footer */
.copyright {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 20px;
    text-align: center;
    margin-top: auto;
}

.copyright p {
    max-width: 1200px;
    margin: 0 auto;
}

/* Animation */
@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-15px);
    }

    60% {
        transform: translateY(-10px);
    }
}

.animate {
    animation: pulse 0.3s ease-in-out;
}

.bounce {
    animation: bounce 0.8s ease;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .io-container {
        flex-direction: column;
    }

    .tool-header h1 {
        font-size: 2.3rem;
    }

    .tool-card {
        padding: 30px;
    }
}

@media (max-width: 600px) {
    .header {
        padding: 0 20px;
        height: 65px;
    }

    .logo a {
        font-size: 22px;
    }

    .tool-container {
        padding: 0 20px;
    }

    .tool-card {
        padding: 25px 20px;
    }

    .tool-header h1 {
        font-size: 2rem;
    }

    .tool-header p {
        font-size: 1.1rem;
    }

    .controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .options {
        grid-template-columns: 1fr;
    }

    textarea {
        height: 200px;
        padding: 15px;
        font-size: 16px;
    }
}

/* Decorations */
.decoration {
    position: absolute;
    z-index: -1;
    opacity: 0.05;
    font-size: 250px;
    color: var(--primary-blue);
}

.dec-1 {
    top: -70px;
    right: -30px;
    transform: rotate(15deg);
}

.dec-2 {
    bottom: -100px;
    left: -50px;
    transform: rotate(-10deg);
}