/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Primary Color Variables */
:root {
    --primary: #233dff;
    --primary-light: #5c6fff;
    --primary-dark: #1a2bcc;
    --primary-50: #eff1ff;
    --primary-100: #e1e7ff;
    --primary-200: #c7d2fe;
    --primary-300: #a5b4fc;
    --primary-400: #818cf8;
    --primary-500: #233dff;
    --primary-600: #1a2bcc;
    --primary-700: #1e3a8a;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
}

/* Base Styles */
html {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #f9fafb;
}

/* Primary Color Utilities */
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-primary-light { background-color: var(--primary-light) !important; }
.bg-primary-dark { background-color: var(--primary-dark) !important; }
.border-primary { border-color: var(--primary) !important; }
.ring-primary { --tw-ring-color: var(--primary); }
.focus\:ring-primary:focus { --tw-ring-color: var(--primary); }
.hover\:bg-primary:hover { background-color: var(--primary) !important; }
.hover\:bg-primary-dark:hover { background-color: var(--primary-dark) !important; }
.hover\:text-primary:hover { color: var(--primary) !important; }

/* CLEAN HEADER CSS - New Approach */

/* Desktop Menu - Always visible on medium screens and up */
.desktop-menu {
    display: none; /* Hidden by default (mobile first) */
}

@media (min-width: 768px) {
    .desktop-menu {
        display: block !important; /* Show on desktop - !important to override conflicts */
    }
}

/* Mobile Menu Button - Only visible on mobile */
.mobile-menu-button {
    display: block; /* Visible by default (mobile first) */
}

@media (min-width: 768px) {
    .mobile-menu-button {
        display: none !important; /* Hide on desktop */
    }
}

/* Mobile Menu Panel - Hidden by default, shown when toggled */
.mobile-menu-panel {
    display: none; /* Hidden by default */
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

.mobile-menu-panel.show {
    display: block; /* Show when toggled */
}

@media (min-width: 768px) {
    .mobile-menu-panel {
        display: none !important; /* Always hidden on desktop */
    }
}

/* Navigation Link Styles */
.nav-link {
    transition: all 0.2s ease-in-out;
    position: relative;
    color: #4b5563;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.2s ease-in-out;
}

/* Ensure icons toggle properly */
#hamburger-icon.hidden {
    display: none !important;
}

#close-icon.hidden {
    display: none !important;
}
/* Logo Styles */
.logo {
    height: 3rem; /* 48px */
    width: auto;
    max-height: 3.5rem; /* 56px on larger screens */
    transition: all 0.2s ease-in-out;
}

.logo:hover {
    transform: scale(1.05);
}

/* Responsive logo sizing */
@media (min-width: 1024px) {
    .logo {
        height: 3.5rem; /* 56px on desktop */
    }
}

@media (max-width: 768px) {
    .logo {
        height: 2.5rem; /* 40px on mobile */
    }
}

/* Logo loading state */
.logo {
    background-color: #f3f4f6;
    border-radius: 0.375rem;
}

.logo:not([src]) {
    opacity: 0.5;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin-bottom: 1rem;
    color: #6b7280;
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--primary-dark);
}

/* Header Styles */
header, nav {
    position: relative;
    z-index: 50;
}

/* Mobile Menu - Remove previous styles that might conflict */
.mobile-menu {
    transition: all 0.3s ease-in-out;
}

/* Footer Styles */
footer {
    background-color: #111827;
    color: #f9fafb;
}

.footer-link {
    transition: color 0.2s ease-in-out;
    color: #d1d5db;
}

.footer-link:hover {
    color: #ffffff;
}

/* Button Styles */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 0.75rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    border: none;
    outline: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-primary:disabled {
    background-color: var(--primary-light);
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

.btn-success {
    background-color: #10b981;
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-success:disabled {
    background-color: #6ee7b7;
    cursor: not-allowed;
}

/* Form Elements */
input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(35, 61, 255, 0.1);
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
}

/* File Input Styles */
.file-input {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 10;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: 2px dashed #9ca3af;
    border-radius: 0.75rem;
    padding: 2.5rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: #ffffff;
    min-height: 200px;
}

.file-label:hover,
.file-label.dragover {
    border-color: var(--primary);
    background-color: var(--primary-50);
    transform: translateY(-2px);
}

.file-label svg {
    color: #9ca3af;
    margin-bottom: 1rem;
}

.file-label:hover svg,
.file-label.dragover svg {
    color: var(--primary);
}

/* Range Slider Styles */
input[type="range"], .primary-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    outline: none;
    width: 100%;
}

input[type="range"]::-webkit-slider-track, .primary-slider::-webkit-slider-track {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
}

input[type="range"]::-webkit-slider-thumb, .primary-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #233dff !important;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input[type="range"]::-moz-range-track, .primary-slider::-moz-range-track {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    border: none;
}

input[type="range"]::-moz-range-thumb, .primary-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #233dff !important;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input[type="range"]::-webkit-slider-thumb:hover, .primary-slider::-webkit-slider-thumb:hover {
    background: #1a2bcc !important;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

input[type="range"]::-moz-range-thumb:hover, .primary-slider::-moz-range-thumb:hover {
    background: #1a2bcc !important;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* File Card Styles */
.file-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
}

.file-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Progress Bar Styles */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease-in-out;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Override for existing progress bars */
.file-card .bg-indigo-600 {
    background-color: var(--primary) !important;
}

/* Ad Container Styles */
.ad-container {
    display: none;
    margin: 0 auto;
    text-align: center;
    padding: 1rem;
    border-radius: 0.5rem;
}

.ad-container.top-banner {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    margin: 1rem auto;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
}

.ad-container.bottom-banner {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    margin: 1rem auto;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
}

.ad-container.left-sidebar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    min-height: 600px;
    z-index: 10;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
}

.ad-container.right-sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    min-height: 600px;
    z-index: 10;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
}

.ad-container.in-content {
    width: 100%;
    max-width: 336px;
    min-height: 280px;
    margin: 1rem auto;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
}

/* Test Ad Styles */
.test-ad {
    width: 100%;
    min-height: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Message Box Styles */
.message-box {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    color: white;
    z-index: 1000;
    transition: all 0.5s ease-in-out;
    opacity: 0;
    text-align: center;
    max-width: 90%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.message-box.show {
    top: 20px;
    opacity: 1;
}

.message-box.info {
    background-color: var(--primary);
}

.message-box.success {
    background-color: #10b981;
}

.message-box.error {
    background-color: #ef4444;
}

.message-box.warning {
    background-color: #f59e0b;
}

/* Ad Blocker Detection Styles */
.adblock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.adblock-modal {
    background: white;
    border-radius: 1rem;
    max-width: 500px;
    width: 90%;
    margin: 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.adblock-content {
    padding: 2rem;
    text-align: center;
}

.adblock-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.adblock-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.adblock-content p {
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 1rem;
}

.adblock-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.adblock-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    border: none;
    min-width: 140px;
    font-size: 0.875rem;
}

.adblock-btn.primary {
    background-color: var(--primary);
    color: white;
}

.adblock-btn.primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.adblock-btn.secondary {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.adblock-btn.secondary:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease-in-out;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.card-body {
    color: #6b7280;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Loading Animation */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Skeleton Loading */
.skeleton {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    background-color: #e5e7eb;
    border-radius: 0.375rem;
}

.skeleton-text {
    height: 1rem;
    background-color: #e5e7eb;
    border-radius: 0.25rem;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Focus Styles for Accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Hover Effects */
.hover-scale:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease-in-out;
}

.hover-lift:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease-in-out;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Grid and Layout */
.grid {
    display: grid;
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }

.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }

.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
    transition: background-color 0.2s ease-in-out;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

::-webkit-scrollbar-corner {
    background: #f1f5f9;
}

/* Button Hover States Override */
button.bg-primary:hover {
    background-color: var(--primary-dark) !important;
}

button.disabled\:bg-primary-light:disabled {
    background-color: var(--primary-light) !important;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Ad Test Element (for detection) */
.ad-test {
    position: absolute !important;
    left: -1000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .ad-container.left-sidebar,
    .ad-container.right-sidebar {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .ad-container.top-banner,
    .ad-container.bottom-banner {
        max-width: 320px;
        min-height: 50px;
    }
    
    .ad-container.in-content {
        max-width: 300px;
        min-height: 250px;
    }

    .grid-cols-2 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
    .grid-cols-3 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
    .grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    
    .adblock-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .adblock-btn {
        width: 100%;
    }
    
    .message-box {
        max-width: 95%;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .file-label {
        padding: 1.5rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .card {
        padding: 1rem;
    }
    
    .adblock-content {
        padding: 1.5rem;
    }
    
    .file-label {
        padding: 1rem;
        min-height: 150px;
    }
}

/* Print Styles */
@media print {
    .ad-container,
    .adblock-overlay,
    .message-box {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #0000ff;
        --primary-dark: #000080;
    }
    
    .file-label {
        border-width: 3px;
    }
    
    button {
        border: 2px solid transparent;
    }
    
    button:focus {
        border-color: #000000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .loading-spinner {
        animation: none;
    }
}

/* AdSense Responsive Styles */
.adsbygoogle {
    margin: 0 auto;
    text-align: center;
}

/* Ensure proper spacing for ads */
.ad-container:not(.hidden) {
    display: block;
}