/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors - Solid Only */
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --success: #48bb78;
    --success-dark: #38a169;
    --danger: #f56565;
    --warning: #ed8936;
    --info: #4299e1;
    
    /* Neutral Colors */
    --white: #ffffff;
    --black: #000000;
    --gray-50: #f8fafc;
    --gray-100: #f7fafc;
    --gray-200: #edf2f7;
    --gray-300: #e2e8f0;
    --gray-400: #cbd5e0;
    --gray-500: #a0aec0;
    --gray-600: #718096;
    --gray-700: #4a5568;
    --gray-800: #2d3748;
    --gray-900: #1a202c;
    
    /* Success/Status Colors */
    --success-light: #c6f6d5;
    --success-bg: #f0fff4;
    --info-light: #bee3f8;
    --info-bg: #ebf8ff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--black);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: bold;
    font-size: 1.2rem;
}

.logo-image {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
}

.footer-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
    margin-right: 8px;
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--black);
    margin: 0;
}

.logo-text p {
    font-size: 0.875rem;
    color: var(--gray-700);
    margin: 0;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav a:hover {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

/* AdSense Styles - Clean Implementation Without Visual Containers */
.ad-banner, .ad-rectangle {
    text-align: center;
    margin: 25px auto;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    max-width: 100%;
    overflow: visible;
}

.ad-banner {
    margin: 25px 0;
}

.ad-rectangle {
    margin: 35px auto;
    max-width: 336px;
}

/* Responsive optimization for mobile ad performance */
@media (max-width: 768px) {
    .ad-banner, .ad-rectangle {
        margin: 20px auto;
        padding: 0;
    }
    
    .ad-banner {
        margin: 20px 0;
    }
    
    .ad-rectangle {
        margin: 25px auto;
        max-width: 320px;
    }
}

@media (max-width: 480px) {
    .ad-banner, .ad-rectangle {
        margin: 15px auto;
        padding: 0;
    }
}

/* Hero Section - Solid Color Only */
.hero {
    background: var(--primary);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--white);
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-features span {
    background: var(--primary-dark);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

/* Tools Section */
.tools-section {
    background: var(--white);
    padding: 4rem 0;
}

.tools-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--black);
}

.tool-category {
    margin-bottom: 3rem;
}

.tool-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--black);
}

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

.tool-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s;
    border: 1px solid var(--black);
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.tool-card.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.tool-card.coming-soon:hover {
    transform: none;
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tool-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--black);
}

.tool-card p {
    color: var(--gray-700);
    font-size: 0.875rem;
}

/* About Section */
.about-section {
    background: var(--white);
    padding: 4rem 0;
}

.about-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--black);
}

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

.feature {
    text-align: center;
    padding: 1.5rem;
    border: 1px solid var(--black);
    border-radius: 8px;
    background: var(--white);
}

.feature h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--black);
}

.feature p {
    color: var(--gray-700);
}

/* Footer */
.footer {
    background: var(--black);
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

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

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

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

.footer-section ul li a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s;
    font-weight: 700;
}

.footer-section ul li a:hover {
    opacity: 0.8;
}

.footer-section p {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 700;
}

.footer-section .logo span {
    color: var(--white);
    font-weight: 700;
}

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

.footer-bottom p {
    color: var(--white);
    font-weight: 700;
}

/* Tool Page Styles */
.tool-page {
    min-height: 100vh;
    background: var(--white);
}

.tool-hero {
    background: var(--primary);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.tool-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tool-hero p {
    font-size: 1.125rem;
}

.tool-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.tool-main {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--black);
}

.tool-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--black);
}

.sidebar-card h3 {
    color: var(--black);
    margin-bottom: 1rem;
}

.upload-area {
    border: 3px dashed var(--gray-400);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background: var(--white);
}

.upload-area:hover {
    border-color: var(--primary);
    background: var(--white);
}

.upload-area.dragover {
    border-color: var(--primary);
    background: var(--info-bg);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-text h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--black);
}

.upload-text p {
    color: var(--gray-700);
    margin-bottom: 1rem;
}

.upload-btn, .convert-btn, .download-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
    font-size: 1rem;
}

.upload-btn:hover, .convert-btn:hover:not(:disabled), .download-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.convert-btn {
    background: var(--success);
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1.125rem;
    margin: 1.5rem 0;
    width: 100%;
}

.convert-btn:hover:not(:disabled) {
    background: var(--success-dark);
}

.convert-btn:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
    transform: none;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--white);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.success-area {
    background: var(--success-bg);
    border: 1px solid var(--black);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.success-area h3 {
    color: var(--success-dark);
    margin-bottom: 0.5rem;
}

.download-btn {
    background: var(--success);
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
}

.download-btn:hover {
    background: var(--success-dark);
}

/* Content Section */
.content-section {
    background: var(--white);
    padding: 3rem 0;
}

.content-section .container {
    max-width: 800px;
}

.content-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--black);
}

.content-section h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--black);
}

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

.content-section ul, .content-section ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.faq-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--black);
    border-left: 4px solid var(--primary);
}

.faq-item h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--black);
}

/* File Info Display */
.file-info {
    background: var(--white);
    border: 1px solid var(--black);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--white);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--black);
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-name {
    font-weight: 600;
    color: var(--black);
    word-break: break-word;
}

.file-size {
    color: var(--gray-700);
    font-size: 0.875rem;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-300);
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: var(--success);
    transition: width 0.3s ease;
}

/* Alerts and Messages */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    border: 1px solid var(--black);
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid var(--black);
    color: var(--success-dark);
}

.alert-error {
    background: #fff5f5;
    border: 1px solid var(--black);
    color: #c53030;
}

.alert-info {
    background: var(--info-bg);
    border: 1px solid var(--black);
    color: #2b6cb0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-features {
        gap: 1rem;
        font-size: 0.875rem;
    }

    .tool-container {
        grid-template-columns: 1fr;
    }

    .nav {
        display: none;
    }

    .header-content {
        justify-content: center;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

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

    .tool-hero h1 {
        font-size: 1.75rem;
    }

    .tool-hero p {
        font-size: 1rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .tool-main, .sidebar-card {
        padding: 1.5rem;
    }
}

/* Print styles - hide ads when printing */
@media print {
    .ad-banner, .ad-rectangle {
        display: none !important;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--black) !important;
    color: var(--white) !important;
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    border-top: 2px solid var(--white);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.cookie-banner.hidden {
    display: none;
}

.cookie-text {
    flex: 1;
    min-width: 250px;
}

.cookie-text p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-text a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.cookie-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s;
}

.cookie-btn.accept {
    background: var(--success);
    color: var(--white);
}

.cookie-btn.accept:hover {
    background: var(--success-dark);
}

.cookie-btn.decline {
    background: transparent;
    color: var(--gray-300);
    border: 1px solid var(--gray-600);
}

.cookie-btn.decline:hover {
    background: var(--gray-600);
    color: var(--white);
}


/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s;
    z-index: 100;
    display: none;
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.scroll-to-top.visible {
    display: block;
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Enhanced Mobile Responsiveness & Revenue Optimization */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .nav a {
        padding: 12px 18px;
        font-size: 16px;
        min-height: 44px; /* Touch target optimization */
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tool-card {
        padding: 25px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    /* Revenue optimization: Better ad visibility */
    .ad-banner {
        margin: 20px auto;
        max-width: 100%;
        min-height: 100px;
    }
    
    .ad-rectangle {
        margin: 25px auto;
        max-width: 100%;
        min-height: 280px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero p {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    
    .btn {
        width: 100%;
        margin: 8px 0;
        padding: 15px;
        font-size: 16px;
        min-height: 44px;
    }
    
    .tool-card h3 {
        font-size: 1.3rem;
    }
    
    .tool-card p {
        font-size: 1rem;
    }
    
    /* Mobile-first ad optimization */
    .ad-banner {
        margin: 15px auto;
        padding: 10px;
    }
    
    .ad-rectangle {
        margin: 20px auto;
        padding: 10px;
    }
}

/* Performance & Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode for Better Accessibility */
@media (prefers-contrast: high) {
    :root {
        --primary: #0000ff;
        --success: #008000;
        --danger: #ff0000;
        --gray-800: #000000;
        --gray-600: #333333;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .tool-card {
        border: 2px solid var(--black);
    }
}

/* Disabled Dark Mode - Forcing Light Theme */
@media (prefers-color-scheme: dark) {
    /* Force light theme colors even in dark mode */
    :root {
        --gray-50: #f8fafc !important;
        --gray-100: #f7fafc !important;
        --gray-200: #edf2f7 !important;
        --gray-300: #e2e8f0 !important;
        --gray-800: #2d3748 !important;
        --gray-900: #1a202c !important;
    }
    
    body {
        background-color: var(--white) !important;
        color: var(--black) !important;
    }
    
    .header {
        background-color: var(--white) !important;
    }
    
    .footer {
        background-color: var(--black) !important;
        color: var(--white) !important;
    }
    
    .tool-card {
        background-color: var(--white) !important;
        color: var(--black) !important;
        border: 1px solid var(--black) !important;
    }
    
    .tools-section {
        background-color: var(--white) !important;
    }
    
    .about-section {
        background-color: var(--white) !important;
    }
    
    .content-section {
        background-color: var(--white) !important;
    }
}

/* Print Styles for Professional Appearance */
@media print {
    .ad-banner, .ad-rectangle, .cookie-banner, .scroll-to-top {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
}

/* Focus Management for Keyboard Navigation */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}
