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

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #6b7280;
    --background-color: #f9fafb;
    --surface-color: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --error-color: #ef4444;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 80px; /* Account for fixed navbar */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    height: 80px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    height: 40px;
    width: 40px;
    object-fit: contain;
}

.nav-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.1);
    font-weight: 600;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.nav-toggle:hover {
    background: var(--background-color);
}

.nav-toggle-bar {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

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

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

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

/* Header Styles */
.header {
    text-align: center;
    padding: 60px 0 40px 0;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Main Content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Input Section */
.input-section {
    background: var(--surface-color);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.input-container {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.url-input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: var(--font-family);
    background: var(--surface-color);
    transition: all 0.2s ease;
    outline: none;
}

.url-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(79 70 229 / 0.1);
}

.url-input::placeholder {
    color: var(--text-secondary);
}

.grab-btn {
    padding: 14px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
    justify-content: center;
}

.grab-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.grab-btn:active {
    transform: translateY(0);
}

.grab-btn:disabled {
    background: var(--secondary-color);
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow-sm);
}

/* Button Loading State */
.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 20px;
    height: 20px;
    animation: rotate 1s linear infinite;
}

.spinner .path {
    stroke-linecap: round;
    stroke-dasharray: 90, 150;
    stroke-dashoffset: 0;
    animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.info-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Error Message */
.error-message {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fef2f2;
    color: var(--error-color);
    border: 1px solid #fecaca;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

/* Output Section */
.output-section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.output-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.output-section h2 {
    text-align: center;
    margin-bottom: 32px;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Thumbnail Grid */
.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Ensure multiple columns on desktop */
@media (min-width: 769px) {
    .thumbnail-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 24px;
    }
}

/* Force 4 columns on large desktop */
@media (min-width: 1024px) {
    .thumbnail-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}


.thumbnail-card {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
    width: 100%;
}

.thumbnail-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.thumbnail-card:nth-child(1) { animation-delay: 0.1s; }
.thumbnail-card:nth-child(2) { animation-delay: 0.2s; }
.thumbnail-card:nth-child(3) { animation-delay: 0.3s; }
.thumbnail-card:nth-child(4) { animation-delay: 0.4s; }

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

.thumbnail-header {
    padding: 16px 20px;
    background: var(--background-color);
    border-bottom: 1px solid var(--border-color);
}

.thumbnail-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.thumbnail-resolution {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.thumbnail-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    display: block;
    background: #f8f9fa;
    border-radius: 4px;
}

.thumbnail-actions {
    padding: 16px 20px;
    display: flex;
    gap: 12px;
}

.download-btn {
    flex: 1;
    padding: 10px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-family);
}

.download-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.download-btn:active {
    transform: translateY(0);
}

.preview-btn {
    padding: 10px 16px;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family);
}

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

/* Clickable thumbnail image */
.thumbnail-image:hover {
    opacity: 0.9;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

/* Content Sections */
.content-sections {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 0 20px;
}

.content-section {
    margin-bottom: 60px;
}

.content-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.3;
}

.content-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

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

.feature-list {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.feature-list li {
    padding: 12px 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding-left: 24px;
}

.feature-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 12px;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.feature-list li:last-child {
    border-bottom: none;
}

.step-list {
    counter-reset: step-counter;
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.step-list li {
    counter-increment: step-counter;
    padding: 16px 24px;
    margin-bottom: 12px;
    background: var(--background-color);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    position: relative;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.step-list li:before {
    content: counter(step-counter);
    position: absolute;
    left: -2px;
    top: 16px;
    background: var(--primary-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.quality-item {
    background: var(--surface-color);
    padding: 24px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

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

.quality-item h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.quality-item p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.faq-item {
    background: var(--background-color);
    padding: 24px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

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

.faq-item h3 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.faq-item p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Static Page Styles (Privacy Policy, etc.) */
.static-page-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.2;
}

.static-page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.static-page-content h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 40px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
}

.static-page-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 12px 0;
}

.static-page-content p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

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

.privacy-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.privacy-list li {
    padding: 8px 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    position: relative;
    padding-left: 20px;
}

.privacy-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    top: 8px;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.privacy-notice {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin: 32px 0;
}

.privacy-notice h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.privacy-notice p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.static-page-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.static-page-content a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Responsive adjustments for content sections */
@media (max-width: 768px) {
    .content-sections {
        margin-top: 60px;
        padding: 0 16px;
    }
    
    .content-section {
        margin-bottom: 40px;
    }
    
    .content-section h2 {
        font-size: 1.5rem;
    }
    
    .content-section h3 {
        font-size: 1.2rem;
    }
    
    .quality-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .step-list li {
        padding: 14px 20px;
    }
    
    .quality-item,
    .faq-item {
        padding: 20px;
    }

    /* Static page responsive styles */
    .static-page-title {
        font-size: 1.8rem;
    }
    
    .static-page-content {
        padding: 0 16px;
    }
    
    .static-page-content h2 {
        font-size: 1.4rem;
        margin: 32px 0 14px 0;
    }
    
    .static-page-content h3 {
        font-size: 1.2rem;
    }
    
    .privacy-notice {
        padding: 20px;
        margin: 24px 0;
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0 30px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-disclaimer {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 30px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.footer-disclaimer p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
    text-align: left;
}

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

.footer-links {
    margin-top: 20px;
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer {
        padding: 30px 20px 20px 20px;
    }
    
    .footer-disclaimer {
        padding: 16px;
        margin-bottom: 20px;
        border-radius: var(--border-radius);
    }
    
    .footer-disclaimer p {
        font-size: 0.8rem;
        line-height: 1.5;
    }
    
    .footer-links {
        margin-top: 15px;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    min-width: 400px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
    min-height: auto;
}

/* Ensure proper modal content order */
.modal-image-container {
    order: 1;
}

.modal-ad-container {
    order: 2;
}

.modal-actions {
    order: 3;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.modal-close:hover {
    background: var(--background-color);
    color: var(--text-primary);
}

.modal-image-container {
    padding: 15px;
    text-align: center;
    flex: 0 0 auto;
    overflow: visible;
    display: block;
    background: #f5f5f5;
    min-height: auto;
    order: 2;
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 60vh;
    max-width: 100%;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: block;
    cursor: zoom-in;
}

.modal-actions {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: center;
    background: var(--surface-color);
    order: 3;
}

.modal-download-btn {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.modal-download-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.modal-ad-container {
    margin: 15px 0;
    padding: 12px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    flex: 0 0 auto;
    min-height: 70px;
    background: #fafafa;
    position: relative;
    order: 2;
    border-radius: 6px;
}

.modal-ad-container .adsbygoogle {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    position: relative;
}

.modal-ad-container .ad-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.modal-ad-container .ad-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 14px;
    z-index: 1;
}

/* Tablet responsive modal ads */
@media (max-width: 1024px) and (min-width: 769px) {
    .modal-ad-container {
        padding: 10px;
        min-height: 70px;
    }
}

/* Mobile responsive modal ads */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95vw;
        width: 95%;
        margin: 0;
    }
    
    .modal-ad-container {
        margin: 10px 0;
        padding: 8px;
        min-height: 70px;
        background: #f8f9fa;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .modal-ad-container .adsbygoogle {
        max-width: 300px;
        min-height: 50px;
        width: 300px;
        height: 50px;
    }
    
    .modal-ad-container .ad-label {
        font-size: 10px;
        margin-bottom: 5px;
        color: #666;
        text-align: left;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .modal-content {
        max-width: 98vw;
        width: 98%;
        max-height: 95vh;
    }
    
    .modal-image {
        max-height: 40vh;
    }
    
    .modal-ad-container {
        padding: 8px;
        min-height: 70px;
    }
    
    .modal-ad-container .adsbygoogle {
        max-width: 300px;
        min-height: 50px;
        width: 300px;
        height: 50px;
    }
}

/* Result ads after thumbnail grid */
.result-ad-container {
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.result-ad-container .adsbygoogle {
    display: block;
    margin: 0 auto;
    max-width: 100%;
}

/* Responsive result ads */
@media (max-width: 768px) {
    .result-ad-container {
        margin-top: 20px;
        padding: 15px 0;
    }
}

/* Modal compact layout */
.modal-overlay {
    align-items: center;
    padding: 3vh 0;
    justify-content: center;
}

/* Responsive modal styles */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 10px;
        align-items: center;
        justify-content: center;
    }
    
    .modal-content {
        max-width: 98vw;
        max-height: 95vh;
        min-width: unset;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-image-container {
        padding: 10px;
        min-height: 150px;
    }
    
    .modal-image {
        max-height: 50vh;
    }
    
    .modal-actions {
        padding: 15px;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    
    .modal-ad-container {
        padding: 15px;
        min-height: 200px;
        margin-top: 10px;
    }
}

/* Blog Styles */
.blog-intro {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 3rem 0;
    margin-bottom: 3rem;
    border-radius: 12px;
    text-align: center;
}

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

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.blog-card.featured {
    grid-column: 1 / -1;
    flex-direction: row;
    max-width: none;
}

.blog-image {
    position: relative;
    overflow: hidden;
}

.blog-card.featured .blog-image {
    flex: 1;
    min-height: 300px;
}

.blog-card:not(.featured) .blog-image {
    height: 200px;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.blog-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card.featured .blog-content {
    flex: 1.2;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.blog-date {
    display: flex;
    align-items: center;
}

.blog-date::before {
    content: "📅";
    margin-right: 0.5rem;
}

.blog-category {
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.blog-content h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    line-height: 1.4;
}

.blog-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-content h3 a:hover {
    color: var(--primary-color);
}

.blog-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: #f1f3f4;
    color: #5f6368;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
    align-self: flex-start;
}

.read-more:hover {
    color: var(--primary-hover);
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

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

.category-card h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
}

.category-card p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.category-count {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Newsletter Signup */
.newsletter-signup {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 3rem;
}

.newsletter-content h2 {
    color: white;
    margin-bottom: 1rem;
}

.newsletter-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto 1rem;
    gap: 1rem;
}

.newsletter-input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

.newsletter-btn {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-btn:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
}

.newsletter-privacy {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

/* Article Styles */
.breadcrumb {
    margin: 2rem 0;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.article-category {
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
}

.article-date, .read-time {
    display: flex;
    align-items: center;
}

.article-header h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 1rem 0;
    color: var(--text-primary);
}

.article-subtitle {
    font-size: 1.2rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 2rem;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.article-image {
    margin: 2rem 0;
    text-align: center;
}

.article-image img {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.article-image figcaption {
    margin-top: 1rem;
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
}

.table-of-contents {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    border-left: 4px solid var(--primary-color);
}

.table-of-contents h2 {
    margin-top: 0;
    color: var(--text-primary);
}

.table-of-contents ol {
    margin-bottom: 0;
}

.table-of-contents a {
    color: var(--primary-color);
    text-decoration: none;
}

.table-of-contents a:hover {
    text-decoration: underline;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
}

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

.article-content h2 {
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.article-content h3 {
    color: var(--text-primary);
    margin: 2rem 0 1rem 0;
}

.article-content p {
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #333;
}

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

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.tool-review {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.pros, .cons {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
}

.pros h4 {
    color: #28a745;
    margin-bottom: 1rem;
}

.cons h4 {
    color: #ffc107;
    margin-bottom: 1rem;
}

.tip-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    margin: 2rem 0;
}

.tip-box h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.comparison-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.comparison-table tbody tr:hover {
    background: #f8f9fa;
}

.legal-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.cta-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    margin: 3rem 0;
}

.cta-box h3 {
    color: white;
    margin-bottom: 1rem;
}

.cta-box p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.cta-primary, .cta-secondary {
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

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

.cta-primary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.cta-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.cta-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.inline-ad {
    margin: 3rem 0;
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
}

.related-articles {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

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

.related-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.related-card:hover {
    transform: translateY(-2px);
}

.related-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.related-content {
    padding: 1rem;
}

.related-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.related-content a {
    color: var(--text-primary);
    text-decoration: none;
}

.related-content a:hover {
    color: var(--primary-color);
}

.related-content p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .blog-card.featured {
        flex-direction: column;
    }
    
    .blog-card.featured .blog-image {
        min-height: 200px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
    
    .pros-cons {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* Additional utility classes */
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none !important; }
.visible { opacity: 1 !important; }

/* Responsive Navigation */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--surface-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-md);
        border-top: 1px solid var(--border-color);
        gap: 0;
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        padding: 16px 20px;
        display: block;
        width: 100%;
        font-size: 1.1rem;
    }

    .nav-toggle {
        display: flex;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header {
        padding: 40px 0 30px 0;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .input-section {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .input-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .grab-btn {
        width: 100%;
    }
    
    .thumbnail-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 16px;
        padding: 15px 16px;
        max-width: 100%;
    }
    
    .thumbnail-card {
        width: 100%;
    }
    
    .thumbnail-header {
        padding: 12px 16px;
    }
    
    .thumbnail-title {
        font-size: 0.9rem;
    }
    
    .thumbnail-resolution {
        font-size: 0.8rem;
    }
    
    .thumbnail-image {
        height: 140px;
    }
    
    .thumbnail-actions {
        flex-direction: column;
    }
    
    .download-btn,
    .preview-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        font-size: 0.9rem;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.75rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .input-section {
        padding: 24px 16px;
    }
    
    .url-input {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
    
    /* Extra small mobile thumbnail styles */
    .thumbnail-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 10px 8px;
    }
    
    .thumbnail-card {
        width: 100%;
        max-width: none;
    }
    
    .thumbnail-header {
        padding: 8px 12px;
    }
    
    .thumbnail-title {
        font-size: 0.8rem;
    }
    
    .thumbnail-resolution {
        font-size: 0.7rem;
    }
    
    .thumbnail-image {
        height: 100px;
    }
    
    .thumbnail-actions {
        padding: 10px 12px;
        gap: 6px;
    }
    
    .download-btn,
    .preview-btn {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    
    .grab-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .output-section h2 {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }

    /* Modal responsive styles */
    .modal-content {
        max-width: 95%;
        max-height: 95vh;
        margin: 0 10px;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-image-container {
        padding: 16px;
        max-height: 50vh;
        min-height: 150px;
    }

    .modal-image {
        max-width: 100%;
        max-height: 100%;
    }

    .modal-actions {
        padding: 16px;
        flex-direction: column;
    }

    .modal-download-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }
}
