: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;
    --gradient-start: #4f6bed;
    --gradient-end: #8458eb;
    --success: #28a745;
    --warning: #ffc107;
    --error: #dc3545;
    --editor-bg: #f8fafd;
    --editor-border: #c2d8f0;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #2b2d42;
    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: 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: 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);
    }
}

/* Main Content */
.main-container {
    max-width: 1100px;
    margin: 40px auto 200px;
    padding: 0 20px;
}

.tool-title {
    text-align: center;
    margin-bottom: 40px;
}

.tool-title h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    color: var(--footer-bg);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tool-title p {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.7;
}

.tool-container {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.tool-header {
    background-color: var(--primary-blue);
    color: white;
    padding: 25px 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.tool-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    font-weight: 600;
}

.tool-header h2 i {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: white;
    color: var(--primary-blue);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
    background: #f0f7ff;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: var(--accent-pink);
    color: white;
}

.btn-secondary:hover {
    background: #e02e5a;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.text-areas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
}

@media (max-width: 900px) {
    .text-areas {
        grid-template-columns: 1fr;
    }
}

.text-area-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.text-area-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--light-bg);
    padding: 12px 18px;
    border-radius: 8px;
}

.text-area-header h3 {
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 600;
}

.text-area-header h3 i {
    color: var(--primary-blue);
}

.char-count {
    font-size: 0.95rem;
    color: var(--text-light);
    background: rgba(0, 0, 0, 0.03);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 500;
}

.editor-container {
    position: relative;
    border: 1px solid var(--editor-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--editor-bg);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
}

textarea {
    width: 100%;
    min-height: 350px;
    padding: 20px;
    border: none;
    background: transparent;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s;
    color: var(--text-dark);
}

textarea:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--primary-blue);
}

.output-area {
    position: relative;
}

.output-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    z-index: 10;
}

.action-btn {
    padding: 10px 18px;
    background: var(--gradient-end);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    font-weight: 500;
}

.action-btn:hover {
    background: var(--gradient-start);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}

.action-btn.copied {
    background: var(--success);
}

.action-btn.saved {
    background: var(--success);
}

.file-actions {
    display: flex;
    justify-content: center;
    padding: 0 30px 25px;
    gap: 20px;
}

.file-input {
    display: none;
}

.file-label {
    padding: 12px 25px;
    background: var(--primary-blue);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0, 102, 204, 0.25);
}

.file-label:hover {
    background: var(--secondary-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 102, 204, 0.3);
}

.stats-container {
    display: flex;
    justify-content: space-around;
    padding: 25px 20px;
    background-color: var(--primary-blue);
    flex-wrap: wrap;
    gap: 20px;
    border-radius: 0 0 16px 16px;
}

.stat-box {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    min-width: 180px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-box h4 {
    font-size: 1.05rem;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    font-size: 0.95rem;
}

.footer p {
    font-size: 15px;
    opacity: 0.9;
}

/* Syntax highlighting for CSS */
.css-property {
    color: #d33682;
    font-weight: bold;
}

.css-selector {
    color: #268bd2;
    font-weight: bold;
}

.css-value {
    color: #2aa198;
}

.css-comment {
    color: #93a1a1;
    font-style: italic;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 0.5s ease;
}

@media (max-width: 768px) {
    .tool-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .tool-actions {
        width: 100%;
        justify-content: center;
    }

    .btn {
        flex: 1;
        justify-content: center;
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .stat-box {
        flex: 1;
        min-width: 140px;
        padding: 15px;
    }

    .file-actions {
        flex-direction: column;
        align-items: center;
    }
}