/* --- CSS Variables for Theming (White Background) --- */
:root {
    --bg-main: #ffffff;
    --bg-offset: #f9fafb;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-green: #16a34a;
    --accent-green-hover: #15803d;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --shadow-small: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-medium: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
    --border-radius: 0.75rem;
    --header-height: 70px;
}

/* --- Base Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}
body {
    /* --- Your existing body styles --- */
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    padding-top: var(--header-height);

    zoom: 0.70;
}

/* --- Site Header --- */
.site-header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo img {
    height: 40px; /* Default desktop logo height */
    width: auto;
    display: block;
}

/* --- Main Navigation (Desktop) --- */
.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem;
    transition: color 0.2s;
}
.main-nav a:hover {
    color: var(--accent-blue);
}

/* --- Main Content & Shared Styles --- */
.main-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}
.main-header {
    padding: 2rem 1rem;
    margin-bottom: 3rem;
    text-align: center;
}
.hero-content {
    max-width: 800px;
    margin: 0 auto;
}
.hero-content .title {
    font-size: clamp(3rem, 4vw, 5rem);
    font-weight: 700;
    line-height: 1.2;
}
.hero-content .title .highlight {
    color: var(--accent-blue);
}
.hero-content .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 1.5rem auto 2.5rem;
}
.card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 2rem;
    box-shadow: var(--shadow-medium);
}
.input-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
#text-input {
    width: 100%;
    min-height: 180px;
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}
#text-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* --- Drag & Drop --- */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
}
.drop-zone.dragover {
    background-color: #eef2ff;
    border-color: var(--accent-blue);
}
.drop-zone-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-secondary);
}
.upload-icon {
    width: 2.5rem;
    height: 2.5rem;
    stroke-width: 1.5;
    color: var(--text-secondary);
}
.file-button-link {
    font-weight: 600;
    color: var(--accent-blue);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* --- Buttons --- */
.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.button-primary, .button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    gap: 0.5rem;
    padding: 0.8rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    flex-grow: 1;
}
.button-primary {
    background-color: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
}
.button-primary:hover {
    background-color: var(--accent-blue-hover);
    border-color: var(--accent-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}
.button-secondary {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
}
.button-secondary:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

/* --- Results --- */
.results-section {
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
    margin-top: 4rem;
}
.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.stat-item {
    background-color: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    text-align: center;
}
.stat-item .count {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-green);
}
.stat-item .label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}
.export-actions {
    text-align: center;
    margin-bottom: 3rem;
}
.export-btn {
    background-color: var(--accent-green);
    color: #fff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.export-btn:hover {
    background-color: var(--accent-green-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2);
}
.results-header {
    text-align: center;
    margin-bottom: 2rem;
}
.results-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}
.results-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0.5rem auto 0;
}
.grouped-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}
.domain-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease-in-out;
}
.domain-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-blue);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.domain-info .domain-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    display: block;
}
.domain-info .domain-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.export-btn-small {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f3f4f6;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s;
}
.export-btn-small:hover {
    background-color: #e5e7eb;
    color: var(--text-primary);
}

/* --- Info & FAQ Sections --- */
.info-section {
    text-align: center;
    padding: 4rem 1.5rem;
    margin-top: 4rem;
}
.info-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-primary);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    text-align: left;
}
.feature-card {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}
.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}
.feature-card p {
    color: var(--text-secondary);
}

/* --- Footer --- */
.main-footer-bottom {
    text-align: center;
    padding: 3rem 1rem 2rem;
    margin-top: 2rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

/* --- Mobile Menu Button --- */
.mobile-menu-btn {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1010; /* Must be on top of the menu */
    position: relative;
}
.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* --- Language Switcher --- */
.language-switcher-container {
    position: relative;
}
#language-switcher {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 0.5rem 2rem 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--bg-card);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.language-switcher-container::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    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='%236b7280' 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;
    pointer-events: none;
}
#language-switcher:hover {
    border-color: var(--accent-blue);
}
#language-switcher:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* --- Content Page & Footer Link Styles --- */
.content-card {
    max-width: 800px;
    margin: 0 auto 4rem auto; /* Center the card on the page */
    text-align: left;
}

.content-card h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.content-card p, .content-card li {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.content-card ul {
    list-style-position: inside;
    padding-left: 1rem;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-blue);
  
}
/* ---------------------------------- */



/* ---------------------------------- */
/* --- Professional Responsive Design --- */
/* ---------------------------------- */

@media (max-width: 900px) {
    /* --- Modern Off-Canvas Menu Setup --- */
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 300px; /* Width of the slide-in menu */
        height: 100vh; /* Full screen height */
        background-color: var(--bg-main);
        box-shadow: -5px 0px 15px rgba(0,0,0,0.1);
        transform: translateX(100%); /* Hides menu off-screen to the right */
        transition: transform 0.3s ease-in-out;
        padding-top: var(--header-height);
        z-index: 1005;
    }
    .main-nav.active {
        transform: translateX(0); /* Slides menu into view */
    }
    .main-nav ul {
        flex-direction: column;
        align-items: flex-start; /* Align links to the left */
        gap: 0;
        padding: 1rem 0;
        height: 100%;
    }
    .main-nav li {
        width: 100%;
    }
    .main-nav a {
        display: block;
        padding: 1rem 1.5rem;
        width: 100%;
        font-size: 1.1rem;
    }
    .language-switcher-container {
        padding: 1rem 1.5rem; /* Add padding to position switcher in menu */
    }
    #language-switcher {
        width: 100%; /* Make dropdown full-width within the menu */
    }

    /* --- Hamburger Menu --- */
    .mobile-menu-btn {
        display: block; /* Show the button on mobile */
    }
    /* Animated 'X' for active state */
    .mobile-menu-btn.active .hamburger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-menu-btn.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-btn.active .hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* --- Header & Content Spacing --- */
    .header-container {
        padding: 0 1rem;
    }
    .logo img {
        height: 35px; /* Slightly smaller logo on mobile */
    }
    .main-container {
        padding: 1.5rem 1rem;
    }
    .main-header {
        padding: 1.5rem 0;
        margin-bottom: 2rem;
    }
    .info-section {
        padding: 3rem 1rem;
        margin-top: 3rem;
    }
}


/* == For Smaller Mobile Devices (breakpoint: 576px) == */
@media (max-width: 576px) {
    /* --- Typography --- */
    .hero-content .title {
        font-size: clamp(2rem, 10vw, 2.5rem); /* Adjust clamp for mobile */
    }
    .hero-content .subtitle {
        font-size: 1rem;
    }
    .info-section h2, .results-header h2 {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    /* --- Layout & Spacing --- */
    .card {
        padding: 1.5rem;
    }
    .summary-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .button-primary, .button-secondary {
        width: 100%;
        padding: 1rem 1.5rem; /* Larger tap targets for buttons */
        font-size: 1.1rem;
    }
    .drop-zone {
        padding: 2rem 1.5rem;
    }
}




