* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    background: linear-gradient(135deg, #14B8A6 0%, #0F766E 100%);
    background-attachment: fixed;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #14B8A6 0%, #0F766E 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: white;
}

.header {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
}




.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
    flex-shrink: 0;
}


/* Logo Styles */
.nav-brand {
    flex-shrink: 0;
}

.nav-brand a {
    display: inline-block;
    transition: all 0.3s ease;
}

.nav-brand a:hover {
    transform: scale(1.05);
}

.nav-brand svg {
    transition: all 0.3s ease;
    display: block;
}

.nav-brand a:hover svg {
    filter: drop-shadow(0 0 15px rgba(102, 126, 234, 0.6)) drop-shadow(0 0 25px rgba(118, 75, 162, 0.4));
    transform: translateY(-2px);
}


.nav-menu {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 0.9;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0.8rem;
    border-radius: 20px;
    white-space: nowrap;
    font-size: 0.95rem;
}

.nav-link:hover {
    opacity: 1;
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    opacity: 0.8;
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.encoder-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 1000px;
    width: 100%;
}

.tool-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-align: center;
}

.tool-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 3rem;
    text-align: center;
}

.converter-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 3rem;
}

.input-section {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 2rem;
}

.section-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-align: center;
    opacity: 0.9;
}

.text-area {
    width: 100%;
    min-height: 150px;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    color: white;
    font-size: 0.9rem;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    resize: vertical;
    line-height: 1.4;
}

.text-area:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
}

.text-area::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.convert-arrow {
    font-size: 2rem;
    color: #00FF88;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
}

.action-btn {
    background: rgba(76, 175, 80, 0.8);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    background: rgba(76, 175, 80, 1);
    transform: translateY(-2px);
}

.action-btn.secondary {
    background: rgba(33, 150, 243, 0.8);
}

.action-btn.secondary:hover {
    background: rgba(33, 150, 243, 1);
}

.controls-section {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.controls-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    opacity: 0.9;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.info-section {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.info-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-align: center;
    opacity: 0.9;
}

.info-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 15px;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #00FF88;
    font-family: 'Courier New', monospace;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 0.3rem;
    color: white;
}

.examples-section {
    background: rgba(255, 193, 7, 0.2);
    border: 2px solid #FFC107;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.examples-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.example-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.example-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.example-text {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    opacity: 0.8;
    word-break: break-all;
}

.tools-section {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 2rem;
}

.tools-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    opacity: 0.9;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.tool-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }

    .nav {
        gap: 0.8rem;
    }




    .logo {
        font-size: 1.2rem;
    }


/* Logo Styles */
.nav-brand {
    flex-shrink: 0;
}

.nav-brand a {
    display: inline-block;
    transition: all 0.3s ease;
}

.nav-brand a:hover {
    transform: scale(1.05);
}

.nav-brand svg {
    transition: all 0.3s ease;
    display: block;
}

.nav-brand a:hover svg {
    filter: drop-shadow(0 0 15px rgba(102, 126, 234, 0.6)) drop-shadow(0 0 25px rgba(118, 75, 162, 0.4));
    transform: translateY(-2px);
}


    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        flex-wrap: nowrap;
        z-index: 1000;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        margin-top: 1rem;
        border-radius: 10px;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
        font-size: 1rem;
        white-space: normal;
        border-radius: 0;
    }

    .nav-link:last-child {
        border-bottom: none;
    }


    .back-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .encoder-container {
        padding: 2rem 1rem;
        margin: 1rem;
    }

    .tool-title {
        font-size: 2rem;
    }

    .converter-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .convert-arrow {
        transform: rotate(90deg);
    }

    .controls-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Footer CSS */
.footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 2rem;
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: block;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #fff;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.footer-section ul li a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
    transform: translateX(5px);
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.6);
}

.footer-section ul li a:hover::before {
    width: 100%;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: white;
    transform: translateY(-3px) scale(1.15);
    filter: drop-shadow(0 5px 10px rgba(102, 126, 234, 0.6));
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 2px;
}

.footer-bottom a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.footer-bottom a:hover {
    color: white;
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.8);
    transform: translateY(-2px);
}

.footer-bottom a:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #14B8A6 0%, #0F766E 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.4);
    transition: all 0.3s ease;
    z-index: 9999;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.6);
}

.scroll-to-top.show {
    display: flex;
}

/* Tool Navigation Buttons */
.tool-nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem;
    border-radius: 15px;
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    z-index: 999;
    max-width: 120px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tool-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.tool-nav-btn.prev {
    left: 20px;
}

.tool-nav-btn.next {
    right: 20px;
}

.tool-nav-btn i {
    font-size: 1.5rem;
}

.tool-nav-label {
    font-size: 0.75rem;
    opacity: 0.9;
    font-weight: 500;
}

.tool-nav-name {
    font-size: 0.7rem;
    opacity: 0.7;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .tool-nav-btn {
        padding: 0.6rem;
        max-width: 80px;
        font-size: 0.85rem;
        top: auto;
        bottom: 80px;
        transform: none;
    }

    .tool-nav-btn:hover {
        transform: scale(1.05);
    }

    .tool-nav-btn.prev {
        left: 10px;
    }

    .tool-nav-btn.next {
        right: 10px;
    }

    .tool-nav-btn i {
        font-size: 1.2rem;
    }

    .tool-nav-label {
        font-size: 0.65rem;
    }

    .tool-nav-name {
        font-size: 0.6rem;
        display: none;
    }
}