/* Base variables and styles */
:root {
    --primary: #ff7b25; /* Kept vibrant orange */
    --secondary: #2e9d80; /* Teal instead of purple */
    --accent: #f7a046; /* Softer orange accent instead of cyan */
    --background: #ffffff; /* White background */
    --card: #f8f8f8; /* Light gray card background */
    --text: #333333; /* Dark gray text */
    --text-secondary: #666666; /* Medium gray secondary text */
    --success: #4caf50; /* Softer green success */
    --warning: #ff9800; /* Softer orange warning */
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
html {
  scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
}

body {
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
/* Header Styles - Full Width */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
   
    top: 0;
    z-index: 100;
   
    width: 100%;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
   
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #4f46e5;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    width: auto;
    height: auto;
    border-radius: 8px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-menu a {
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a:hover {
    color: #4f46e5;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #374151;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}
.container img {
    display: block;  /* Makes the image a block element */
    max-width: 100%;  /* Ensures responsiveness */
    height: auto;  /* Maintains aspect ratio */
    margin: 0 auto 20px;  /* Centers image & adds 20px space below */
    border-radius: 10px;  /* Optional: Rounded corners */
    box-shadow: 1rem;
}
/* Main Content */
.card {
    background: var(--card);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.6s ease-out;
    border: 1px solid #eaeaea;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(20px);}
    to {opacity: 1; transform: translateY(0);}
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 500;
}

.input-wrapper {
    position: relative;
}

textarea, select {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: white;
    color: var(--text);
    font-size: 1.3rem;
    transition: var(--transition);
    resize: none;
}

textarea {
    min-height: 120px;
}

textarea:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent);
    border-color: var(--accent);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Copy button */
.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 123, 37, 0.1);
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background: rgba(255, 123, 37, 0.2);
    color: var(--text);
}

.copy-icon {
    width: 16px;
    height: 16px;
}

/* Status indicator */
.status {
    display: flex;
    align-items: center;
    margin-top: 1rem;
    font-size: 1.0rem;
    color: var(--text-secondary);
}

.status-icon {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    position: relative;
}

.status-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--success);
    border-radius: 50%;
    animation: status-pulse 1.5s ease infinite;
}

@keyframes status-pulse {
    0% {transform: scale(0.8); opacity: 0.2;}
    50% {transform: scale(1); opacity: 0.6;}
    100% {transform: scale(0.8); opacity: 0.2;}
}

/* Binary background */
.binary-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    opacity: 0.03;
    pointer-events: none;
}

.binary-stream {
    position: absolute;
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 14px;
    white-space: nowrap;
    user-select: none;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 140px;
    background-color: white;
    color: var(--text);
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 150%;
    left: 50%;
    margin-left: -40px;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: var(--shadow);
    font-size: 1.0rem;
    border: 1px solid #eaeaea;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}
h1 {
    font-size: 2.5rem;
            font-weight: 700;
            letter-spacing: 1px;
            text-align: center;
            align-items: center;
            margin-bottom: 0.5rem;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            animation: gradientText 8s ease infinite;
            background-size: 200% 200%;
            text-shadow: 0 0 8px var(--text-shadow);
}

h2 {
            font-size: 2.5rem;
            font-weight: 700;
            text-align: center;
            letter-spacing: 1px;
            margin-bottom: 0.5rem;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            animation: gradientText 8s ease infinite;
            background-size: 200% 200%;
            text-shadow: 0 0 8px var(--text-shadow);
        }
h3 {
    color: #2c3e50;
            border-bottom: 2px solid #3498db;
            padding-bottom: 10px;
            margin-top: 30px;
}

p {
     margin-bottom: 15px;
            text-align: justify;
    font-size: 17px;
    color: var(--text);
    line-height: 1.6;
}

@keyframes gradientText {
    0% {background-position: 0% 50%;}
    50% {background-position: 100% 50%;}
    100% {background-position: 0% 50%;}
}
.site-footer {
    background-color: #f8f9fa;
    padding: 30px 0;
    margin-top: 60px;
    border-top: 1px solid #e9ecef;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links a {
    color: #8b5cf6;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #7c3aed;
}

.separator {
    color: #8b5cf6;
    font-size: 14px;
}

.footer-copyright {
    color: #6b7280;
    font-size: 14px;
}

.footer-copyright a {
    color: #8b5cf6;
    text-decoration: none;
}

.footer-copyright a:hover {
    color: #7c3aed;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1.5rem;
       

        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        padding: 1rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .nav-menu a:last-child {
        border-bottom: none;
    }

    .mobile-menu-btn {
        display: block;
    }
}
.maininfo {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family:  Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.maininfo h2 {
    font-size: 2.5rem;
            font-weight: 700;
             text-align: center;
            letter-spacing: 1px;
            margin-bottom: 0.5rem;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            animation: gradientText 8s ease infinite;
            background-size: 200% 200%;
            text-shadow: 0 0 8px var(--text-shadow);
    
}

.maininfo h3 {
    color: #34495e;
    font-size: 1.3em;
    margin-top: 25px;
    margin-bottom: 12px;
    font-weight: 600;
    text-align: left;
}

.maininfo p {
    margin-bottom: 15px;
    text-align: justify;
    font-size: 1em;
}

.maininfo p b {
    color: #2c3e50;
    font-weight: 600;
}

.maininfo code {
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #e74c3c;
    font-size: 0.9em;
    border: 1px solid #e9ecef;
}

.maininfo .highlight {
    background: linear-gradient(135deg, #8d8787 0%, #d7cce2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.maininfo .highlight p {
    margin: 0;
    font-size: 1.05em;
}

.maininfo .highlight strong {
    color: #fff;
    font-weight: 700;
}

/* Responsive design */
@media (max-width: 768px) {
    .maininfo {
        padding: 15px;
        margin: 0 10px;
    }
    
    .maininfo h2 {
        font-size: 1.5em;
    }
    
    .maininfo h3 {
        font-size: 1.2em;
    }
    
    .maininfo p {
        text-align: left;
    }
}
table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
        }
        
        th, td {
            border: 1px solid #ddd;
            padding: 8px;
            text-align: center;
            font-size: 14px;
        }
        
        th {
            background-color: #4CAF50;
            color: white;
            font-weight: bold;
            position: sticky;
            top: 0;
        }
        
        tr:nth-child(even) {
            background-color: #f9f9f9;
        }
        
        tr:hover {
            background-color: #f0f0f0;
        }
        
        .binary-col {
            font-weight: bold;
            color: #2196F3;
        }
        
        .decimal-col {
            color: #FF9800;
        }
        
        .ascii-col {
            font-weight: bold;
            color: #4CAF50;
        }
        
        .hex-col {
            color: #9C27B0;
            font-weight: bold;
        }
        
        .control-char {
            font-style: italic;
            color: #666;
        }
        
        @media (max-width: 600px) {
            th, td {
                padding: 6px;
                font-size: 12px;
            }
        }
         .binary-example {
            background-color: #f8f9fa;
            padding: 15px;
            border-left: 4px solid #3498db;
            margin: 10px 0;
            font-family: monospace;
        }
        .result {
            background-color: #e8f5e8;
            padding: 10px;
            border-radius: 5px;
            margin: 10px 0;
        }
        
         .faq-container {
            background: white;
            padding: 30px;
            border-radius: 10px;
        }
       .faq-container    h2 {
            color: #333;
            text-align: center;
            margin-bottom: 30px;
            padding-bottom: 10px;
        }
       .faq-container    h3 {
            color: #2c3e50;
            margin-top: 25px;
            margin-bottom: 10px;
            font-size: 1.2em;
            border-left: 4px solid #3498db;
            padding-left: 15px;
        }
       .faq-container    p {
            color: #555;
            margin-bottom: 15px;
            text-align: justify;
        }
         .faq-container  code {
            background-color: #f8f9fa;
            padding: 2px 6px;
            border-radius: 3px;
            font-family: monospace;
            color: #e74c3c;
        }
        .binary-example {
            background-color: #ecf0f1;
            padding: 10px;
            border-radius: 5px;
            font-family: monospace;
            margin: 10px 0;
        }