/* ==========================================================================
   1. Global Styles & Variables
   ========================================================================== */
:root {
    /* --- Nebula Dark Theme Palette --- */
    --primary-color: #3b82f6;
    /* Bright blue for primary actions */
    --primary-dark: #2563eb;
    --secondary-color: #4b5563;
    /* Muted gray for secondary elements */
    --accent-color: #10b981;
    /* Vibrant green for highlights */
    --danger-color: #ef4444;
    --warning-color: #f59e0b;

    /* Text Colors */
    --text-primary: #f3f4f6;
    /* Off-white for main text */
    --text-secondary: #a0aec0;
    /* Lighter gray for secondary text */
    --text-light: #718096;
    /* Muted gray for hints */

    /* Background Colors */
    --bg-color: #1E202D;
    /* Deep dark slate for main background */
    --bg-secondary: #2A2D3D;
    /* Slightly lighter charcoal for cards/inputs */
    --bg-dark: #0F172A;
    /* Near-black for footer */
    --bg-glass: rgba(30, 32, 45, 0.85);
    /* For blurred "glass" elements */

    /* Borders & Shadows */
    --border-color: #373A4D;
    /* Subtle border for separation */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.15);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.2), 0 2px 4px -2px rgb(0 0 0 / 0.2);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.25), 0 4px 6px -4px rgb(0 0 0 / 0.25);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);

    /* Radii */
    --radius: 1rem;
    --radius-sm: 0.5rem;
    --radius-lg: 1.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #111827 0%, #1E202D 50%, #0F172A 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding-top: 70px;
    /* Account for fixed navbar */
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
   2. Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-logo:hover {
    color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-logo i {
    font-size: 1.5rem;
    color: #fbbf24;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ==========================================================================
   3. Generic Page Styles (Privacy, Terms, Contact)
   ========================================================================== */
.page-container {
    padding-top: 2rem;
}

.page-content {
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.page-header h1 i {
    color: var(--primary-color);
    font-size: 2.5rem;
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

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

.content-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-section li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.content-section strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ==========================================================================
   4. Index Page Components
   ========================================================================== */

/* 4.1. Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
}

.header-content {
    background: rgba(42, 45, 61, 0.5);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 3rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
}

.title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.title i {
    font-size: 3rem;
    color: #fbbf24;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 4.2. Search Section */
.search-section {
    margin-bottom: 3rem;
}

.search-container {
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.search-icon {
    color: var(--text-light);
    font-size: 1.5rem;
    margin-left: 1rem;
}

.search-input {
    flex: 1;
    padding: 1.25rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    background: transparent;
    color: var(--text-primary);
}

.search-input:focus {
    outline: none;
}

.search-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-md);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.search-hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

/* 4.3. FAQ Section */
.faq-section {
    margin: 4rem 0;
}

.faq-container {
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}

.faq-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.faq-title i {
    color: var(--primary-color);
    font-size: 2rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.faq-item {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 2rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: left;
}

.faq-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.faq-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    line-height: 1.5;
}

.faq-icon {
    color: var(--primary-color);
    font-size: 0.875rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.faq-item:hover .faq-icon {
    transform: rotate(90deg);
}

.faq-answer {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
    margin-left: 1.625rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.faq-answer p:not(:first-child) {
    margin-top: 0.75rem;
}

.faq-answer strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ==========================================================================
   5. Dynamic Content (Loading, Error, Results)
   ========================================================================== */

/* 5.1. Loading & Error States */
.loading,
.error-message {
    text-align: center;
    padding: 4rem;
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    margin-bottom: 4rem;
}

.loading-spinner {
    width: 4rem;
    height: 4rem;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

.loading-note {
    color: var(--text-light);
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 1rem;
    opacity: 0.8;
}

.error-message {
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.error-message i {
    font-size: 4rem;
    margin-bottom: 2rem;
    opacity: 0.7;
}

/* 5.2. Results Section */
.results-section {
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 4rem;
}

.results-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-title {
    font-size: 2rem;
    font-weight: 700;
}

.results-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* 5.3. Results Controls */
.results-controls {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.local-search-box {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.local-search-icon {
    color: var(--text-light);
    font-size: 1rem;
}

.local-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    padding: 0.5rem 0;
}

.local-search-input::placeholder {
    color: var(--text-light);
}

.clear-search-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
}

.clear-search-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.filters {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 equal columns for desktop */
    gap: 2rem;
    align-items: start;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-color);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%; /* Consistent width for all filters */
    min-width: 0; /* Allow shrinking */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='%23a0aec0' d='M6 8L0 2h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
}

/* Truncate long MIME type options */
.filter-group select option {
    background: var(--bg-color);
    color: var(--text-primary);
    padding: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px; /* Prevent extremely wide options */
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Ensure options are visible on mobile */
@media screen and (max-width: 768px) {
    .filter-group select option {
        background: var(--bg-color) !important;
        color: var(--text-primary) !important;
    }
}

/* 5.4. Results Grid & Cards */
.results-grid {
    padding: 2rem;
    display: grid;
    gap: 1.5rem;
}

.result-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.4s ease;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.result-card:hover::before {
    opacity: 1;
}

.result-card .result-header {
    /* Specific to card header */
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
    background: none;
    padding: 0;
    color: inherit;
}

.result-url {
    flex: 1;
    font-weight: 600;
    color: var(--primary-color);
    word-break: break-all;
    font-size: 1.1rem;
    line-height: 1.2;
}

.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.status-200 {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.status-301,
.status-302 {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.status-404 {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.status-500 {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.status-other {
    background: var(--bg-color);
    color: var(--text-secondary);
}

.result-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    min-width: 0; /* Allow items to shrink */
}

.meta-item i {
    color: var(--primary-color);
    width: 1.25rem;
    font-size: 1rem;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.meta-item strong {
    color: var(--text-primary);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0; /* Allow text to shrink */
}

.meta-mime {
    grid-column: span 1;
    max-width: 100%;
}

.meta-mime strong {
    max-width: 150px; /* Specific width for MIME type to prevent overflow */
}

.result-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
}

.btn-archive {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.btn-direct {
    background: linear-gradient(135deg, var(--accent-color) 0%, #059669 100%);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   6. Contact Page Components
   ========================================================================== */
.contact-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-info-section,
.contact-form-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 2rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.contact-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.contact-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-header i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.contact-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    border: none;
    padding: 0;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
}

.contact-method-icon {
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-method-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-method-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    word-break: break-word;
    overflow-wrap: break-word;
}

.contact-method-info a:hover {
    text-decoration: underline;
}

.contact-info {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 2px solid var(--primary-color);
    text-align: center;
}

.contact-info p {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0;
}

.contact-info a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    word-break: break-all;
}

.response-time {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

.faq-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.faq-link:hover {
    gap: 0.75rem;
    text-decoration: underline;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--bg-color);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.form-note {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.form-note p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.contact-info {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 2px solid var(--primary-color);
}

.contact-info a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
}

.contact-info a:hover {
    text-decoration: underline;
    color: var(--primary-color);
}

.help-topics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.help-topic {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.help-topic:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.help-topic i {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.help-topic h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.help-topic p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.response-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.response-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.response-item i {
    color: var(--primary-color);
    font-size: 1.25rem;
    width: 30px;
    text-align: center;
}

.response-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.response-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* ==========================================================================
   7. Footer
   ========================================================================== */
.footer {
    background: var(--bg-dark);
    color: var(--text-primary);
    margin-top: 4rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 1rem 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section h3 i {
    color: #fbbf24;
}

.footer-section h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a,
.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover,
.footer-section a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-light);
}

.footer-bottom p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* ==========================================================================
   8. Utilities & Animations
   ========================================================================== */

/* 8.1. Animations */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card:nth-child(even) {
    animation-delay: 0.1s;
}

.result-card:nth-child(3n) {
    animation-delay: 0.2s;
}

/* 8.2. Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark), #059669);
}

/* 8.3. URL Tooltip */
.result-url[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 0;
    background: var(--bg-dark);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   9. Responsive Design
   ========================================================================== */
@media (max-width: 768px) {

    /* General */
    .container {
        padding: 0.75rem; /* More consistent smaller padding */
    }

    /* Optimize the main header card for mobile */
    .header-content {
        padding: 2rem 1.5rem; /* Reduced top/bottom padding */
        border-radius: var(--radius);
        margin: 0 0.5rem; /* Add margin to prevent edge touching */
    }

    /* Refine the main title for better impact and spacing */
    .title {
        font-size: 2rem; /* Slightly smaller for better balance */
        margin-bottom: 0.75rem;
        gap: 0.75rem;
    }

    /* Adjust the title's icon to be proportional */
    .title i {
        font-size: 2.2rem; /* Proportional scaling */
    }

    /* Adjust the subtitle for readability and balance */
    .subtitle {
        font-size: 1.1rem;
        line-height: 1.5;
        font-weight: 400;
        max-width: 90%;
        margin: 0 auto;
    }

    /* Navigation */
    .nav-menu {
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-glass);
        backdrop-filter: blur(20px);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-menu.active {
        max-height: 500px;
    }

    .nav-link {
        padding: 1rem;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-logo {
        font-size: 1.1rem;
    }

    /* Index Page */
    .header-content,
    .search-container,
    .faq-container {
        padding: 1.5rem; /* Reduced padding for better mobile fit */
        margin: 0 0.5rem; /* Consistent margins */
    }

    .title {
        font-size: 1.8rem; /* Smaller mobile title */
        flex-direction: column;
        gap: 0.5rem;
    }

    .search-box {
        flex-wrap: nowrap;
        padding: 0.5rem;
        gap: 0.5rem;
        margin: 0; /* Remove any unwanted margins */
    }

    .search-input {
        flex: 1;
        padding: 0.75rem 0.5rem;
        min-width: 0;
    }

    .search-btn {
        padding: 0.75rem 1rem;
        flex-shrink: 0;
    }

    .search-icon {
        margin-left: 0.5rem;
    }

    /* Results Section - Better mobile alignment */
    .results-section {
        margin: 0.75rem 0.5rem 2rem 0.5rem; /* Consistent margins */
        border-radius: var(--radius); /* Smaller radius on mobile */
    }

    .results-grid {
        padding: 0.75rem; /* Reduced padding */
        gap: 1rem;
    }

    .results-header {
        flex-direction: row;
        padding: 1.5rem 1rem; /* Reduced horizontal padding */
        align-items: center;
        gap: 1rem; /* Add gap between title and count */
    }

    .results-title {
        font-size: 1.4rem; /* Smaller title */
        white-space: nowrap;
        flex-shrink: 0;
    }

    .results-count {
        padding: 0.4rem 0.8rem; /* Smaller padding */
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    /* Filters - Better mobile layout */
    .filters {
        display: flex; /* Override grid for mobile */
        flex-direction: column;
        gap: 1rem; /* Reduced gap */
        padding: 1.5rem 1rem; /* Consistent with results header padding */
    }

    .filter-group {
        width: 100%; /* Full width on mobile */
    }

    .filter-group select {
        padding: 0.875rem 1rem;
        font-size: 1rem;
        width: 100%; /* Full width selects */
        min-width: 0; /* Remove min-width constraint */
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    /* Local search - consistent padding */
    .local-search-box {
        padding: 1rem;
        margin: 0; /* Remove margins that might cause misalignment */
    }

    /* Result cards - better mobile spacing */
    .result-card {
        padding: 1.25rem; /* Slightly reduced padding */
        margin: 0; /* Ensure no unwanted margins */
    }

    .result-card .result-header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between; /* Ensure status badge stays on the right */
        margin-bottom: 1rem; /* Reduced margin */
        gap: 1rem;
    }

    .result-meta {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        padding: 1rem; /* Reduced padding to match card */
    }

    .meta-mime strong {
        max-width: 120px;
    }

    .result-actions {
        flex-direction: column;
        gap: 0.75rem; /* Add gap between action buttons */
    }

    .action-btn {
        justify-content: center;
        width: 100%; /* Full width buttons on mobile */
    }

    /* FAQ */
    .faq-title {
        font-size: 2rem;
        flex-direction: column;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .faq-item {
        padding: 1.5rem;
    }

    .faq-question {
        font-size: 1rem;
    }

    .faq-answer {
        margin-left: 1.375rem;
        font-size: 0.9rem;
    }

    .faq-item {
        padding: 1.5rem;
        text-align: left;
    }

    .faq-question {
        font-size: 1.05rem;
        line-height: 1.4;
    }

    .faq-answer {
        font-size: 0.9rem;
        margin-left: 0;
        padding-top: 0.5rem;
    }

    .faq-answer ul,
    .faq-answer ol {
        margin-left: 0 !important;
        padding-left: 1.5rem;
        margin-top: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .faq-answer code {
        font-size: 0.85rem;
    }

    /* Generic & Contact Pages */
    .page-content {
        padding: 1rem;
        margin: 0.5rem;
    }

    .page-header {
        text-align: center;
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .page-header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
        line-height: 1.2;
    }

    .page-header p {
        font-size: 1rem;
        margin-top: 0.5rem;
    }

    .contact-main {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .contact-card {
        padding: 1.25rem;
        margin: 0;
    }

    .contact-header {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .contact-header h2 {
        font-size: 1.25rem;
    }

    .contact-method {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem;
        text-align: center;
    }

    .contact-method-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        align-self: center;
    }

    .contact-method-info {
        text-align: center;
        width: 100%;
    }

    .contact-method-info h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .contact-method-info a {
        word-break: break-all;
        font-size: 0.9rem;
        display: inline-block;
        max-width: 100%;
    }

    .response-time {
        font-size: 0.8rem;
        margin-top: 0.5rem;
        display: block;
    }

    .help-topics {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .help-topic {
        padding: 1.25rem;
        text-align: center;
    }

    .help-topic i {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .help-topic h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .help-topic p {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .response-info {
        gap: 1rem;
    }

    .response-item {
        padding: 1rem;
        text-align: left;
    }

    .response-item i {
        font-size: 1.25rem;
    }

    .response-item h4 {
        font-size: 1rem;
    }

    .response-item p {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 1rem;
    }

    .submit-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .form-note {
        padding: 0.875rem;
        margin-top: 0.875rem;
    }

    .form-note p {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    /* Footer */
    .footer-container {
        padding: 2rem 1rem 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section h3 {
        justify-content: center;
    }
}

/* Extra small screens (phones in portrait, less than 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0.5rem; /* Even tighter padding for very small screens */
    }

    /* Page content adjustments */
    .page-content {
        padding: 0.75rem;
        margin: 0.25rem;
        border-radius: var(--radius);
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .page-header p {
        font-size: 0.95rem;
    }

    /* Header and search adjustments for very small screens */
    .header-content,
    .search-container,
    .faq-container {
        padding: 1rem; /* Even smaller padding */
        margin: 0.25rem; /* Tighter margins */
    }

    .title {
        font-size: 1.6rem; /* Smaller title for very small screens */
    }

    .title i {
        font-size: 1.8rem;
    }

    /* Results section improvements for small screens */
    .results-section {
        margin: 0.5rem 0.25rem 1.5rem 0.25rem; /* Tighter margins */
        border-radius: var(--radius-sm); /* Smaller radius */
    }

    .results-header {
        padding: 1rem 0.75rem; /* Tighter padding */
        flex-direction: column; /* Stack title and count vertically */
        align-items: stretch;
        gap: 0.75rem;
        text-align: center;
    }

    .results-title {
        font-size: 1.2rem; /* Smaller for very small screens */
        white-space: normal; /* Allow wrapping */
    }

    .results-count {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        align-self: center; /* Center the count badge */
    }

    /* Filters - even better mobile layout */
    .filters {
        display: flex; /* Override grid for small mobile */
        flex-direction: column;
        padding: 1rem 0.75rem; /* Consistent tighter padding */
        gap: 0.75rem;
    }

    .filter-group label {
        font-size: 0.8rem; /* Smaller labels */
    }

    .filter-group select {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }

    /* Local search adjustments */
    .local-search-box {
        padding: 0.875rem 0.75rem; /* Consistent with filters */
    }

    /* Results grid and cards */
    .results-grid {
        padding: 0.5rem; /* Minimal padding */
    }

    .result-card {
        padding: 1rem; /* Reduced padding for small screens */
    }

    .result-card .result-header {
        margin-bottom: 0.75rem;
        flex-direction: row; /* Keep horizontal layout to maintain status badge on right */
        align-items: flex-start;
        justify-content: space-between; /* Ensure status badge stays on the right */
        gap: 0.75rem;
    }

    /* Contact page adjustments */
    .contact-card {
        padding: 1rem;
    }

    .contact-header h2 {
        font-size: 1.1rem;
    }

    .contact-method {
        padding: 1rem;
        gap: 0.75rem;
    }

    .contact-method-info a {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .help-topic {
        padding: 1rem;
    }

    .help-topic h3 {
        font-size: 0.95rem;
    }

    .help-topic p {
        font-size: 0.85rem;
    }

    /* Form improvements */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.625rem;
        font-size: 0.95rem;
    }

    .submit-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }

    /* Navigation */
    .nav-logo {
        font-size: 1rem;
    }

    /* Footer */
    .footer-container {
        padding: 1.5rem 0.5rem 0.5rem;
    }

    /* Result meta items on very small screens */
    .result-meta {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* Responsive grid that adapts to content */
        gap: 0.5rem;
        padding: 0.875rem; /* Consistent with card padding */
    }

    /* Make the relative time span full width when it's the last item */
    .meta-item:last-child:nth-child(odd) {
        grid-column: 1 / -1; /* Span full width if it's an odd-numbered last item */
    }

    .meta-item {
        font-size: 0.8rem;
        gap: 0.5rem;
    }

    .meta-item i {
        width: 1rem;
        font-size: 0.9rem;
    }

    .meta-mime strong {
        max-width: 100px; /* Even smaller on very small screens */
    }

    /* Action buttons - full width and proper spacing */
    .result-actions {
        gap: 0.5rem;
        margin-top: 0.75rem;
    }

    .action-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}