:root {
    --background: hsl(0, 0%, 100%);
    --foreground: hsl(222.2, 84%, 4.9%);
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(222.2, 84%, 4.9%);
    --primary: hsl(222.2, 47.4%, 11.2%);
    --primary-foreground: hsl(210, 40%, 98%);
    --secondary: hsl(210, 40%, 96.1%);
    --secondary-foreground: hsl(222.2, 47.4%, 11.2%);
    --muted: hsl(210, 40%, 96.1%);
    --muted-foreground: hsl(215.4, 16.3%, 46.9%);
    --accent: hsl(210, 40%, 96.1%);
    --accent-foreground: hsl(222.2, 47.4%, 11.2%);
    --border: hsl(214.3, 31.8%, 91.4%);
    --ring: hsl(222.2, 84%, 4.9%);
    --radius: 0.5rem;
    --gradient-focus: radial-gradient(1200px 400px at 50% 0%, hsla(217.2, 91.2%, 59.8%, 0.25), transparent 60%);
    --shadow-elevated: 0 20px 40px -20px hsla(222.2, 84%, 4.9%, 0.25);
    --transition-smooth: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: hsl(222.2, 84%, 4.9%);
        --foreground: hsl(210, 40%, 98%);
        --card: hsl(222.2, 84%, 4.9%);
        --card-foreground: hsl(210, 40%, 98%);
        --primary: hsl(210, 40%, 98%);
        --primary-foreground: hsl(222.2, 47.4%, 11.2%);
        --secondary: hsl(217.2, 32.6%, 17.5%);
        --secondary-foreground: hsl(210, 40%, 98%);
        --muted: hsl(217.2, 32.6%, 17.5%);
        --muted-foreground: hsl(215, 20.2%, 65.1%);
        --accent: hsl(217.2, 32.6%, 17.5%);
        --accent-foreground: hsl(210, 40%, 98%);
        --border: hsl(217.2, 32.6%, 17.5%);
        --ring: hsl(212.7, 26.8%, 83.9%);
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.5;
    min-height: 100vh;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--ring));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    color: var(--muted-foreground);
    max-width: 600px;
    margin: 0 auto;
}

.converter-section {
    margin-top: 2rem;
}

.dropzone {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background-color: var(--card);
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.dropzone:hover {
    border-color: var(--ring);
}

.dropzone:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.dropzone.is-dragover {
    border-color: var(--ring);
    background-color: var(--accent);
}

.dropzone-background {
    position: absolute;
    inset: -2px;
    border-radius: var(--radius);
    background-image: var(--gradient-focus);
    opacity: 0;
    filter: blur(20px);
    transition: var(--transition-smooth);
    pointer-events: none;
    z-index: -1;
}

.dropzone.is-dragover .dropzone-background {
    opacity: 1;
    filter: blur(16px);
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    background-color: var(--secondary);
    border-radius: calc(var(--radius) - 2px);
}

.icon {
    width: 1.75rem;
    height: 1.75rem;
    color: var(--secondary-foreground);
}

.dropzone h2 {
    font-size: clamp(1rem, 3vw, 1.25rem);
    font-weight: 600;
    margin: 0;
}

.dropzone p {
    color: var(--muted-foreground);
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    max-width: 400px;
    margin: 0;
}

.btn {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border: none;
    min-height: 44px;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-top: 0.5rem;
}

.btn:hover {
    opacity: 0.9;
}

.btn:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.result-container {
    margin-top: 1.5rem;
}

.result-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-elevated);
}

.download-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

.download-link:hover {
    background-color: var(--accent);
}

.thumbnail {
    width: 4rem;
    height: 4rem;
    object-fit: cover;
    border-radius: calc(var(--radius) - 2px);
    flex-shrink: 0;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 1rem;
    min-width: 0;
}

.file-details {
    min-width: 0;
    flex: 1;
}

.file-name {
    font-weight: 500;
    margin: 0 0 0.25rem 0;
    word-break: break-all;
}

.file-size {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin: 0;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    border: none;
    min-height: 44px;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.download-btn:hover {
    background-color: var(--accent);
}

.download-btn:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.download-icon {
    width: 1rem;
    height: 1rem;
}

.toast {
    position: fixed;
    top: 1rem;
    left: 50%;
    right: auto;
    bottom: auto;
    background-color: var(--card);
    color: var(--card-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow-elevated);
    transform: translateX(-50%) translateY(-100px);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 1000;
    max-width: 90%;
    top: calc(1rem + env(safe-area-inset-top));
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ================== CONTENT SECTIONS STYLES ================== */

.content-section {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.content-section h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--foreground);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
}

.content-section h3 {
    font-size: clamp(1.125rem, 3vw, 1.375rem);
    color: var(--foreground);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.content-section p {
    color: var(--muted-foreground);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.content-section ul,
.content-section ol {
    margin: 1rem 0 1.5rem 1.5rem;
    color: var(--muted-foreground);
    line-height: 1.8;
}

.content-section li {
    margin-bottom: 0.75rem;
}

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

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.step-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--ring));
    color: var(--primary-foreground);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: bold;
}

.step-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.step-content p {
    margin-bottom: 0;
}

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

.feature-card {
    padding: 1.5rem;
    background: var(--secondary);
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid var(--border);
    transition: var(--transition-smooth);
}

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

.feature-card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    color: var(--foreground);
}

.feature-card p {
    margin-bottom: 0;
    font-size: 0.9375rem;
}

.faq-section {
    background: var(--background);
}

.faq-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--foreground);
    font-size: 1.125rem;
    font-weight: 600;
}

.faq-item p {
    margin-bottom: 0;
}

.footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.footer a {
    color: var(--muted-foreground);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer a:hover {
    color: var(--foreground);
}

/* ================== PAGE LAYOUT & ADSENSE STYLES ================== */

/* MOBIL-FIRST APPROACH - Alapértelmezett: 1 oszlop */
.page-wrapper {
    display: block;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1rem;
}

.content-area {
    width: 100%;
}

.container {
    padding-top: 0;
    padding-bottom: 0;
}

.ad-container-top,
.ad-container-bottom {
    margin: 1.5rem auto;
    text-align: center;
    min-height: 90px;
    max-width: 970px;
    padding: 0 1rem;
}

/* Oldalsó hirdetések ALAPBÓL REJTVE */
.ad-container-side {
    display: none;
}

/* ================== RESPONSIVE BREAKPOINTS ================== */

/* Extra kis mobil - 0-480px */
@media (max-width: 480px) {
    .container {
        padding: 1rem 0.75rem;
    }
    
    .header {
        margin-bottom: 2rem;
    }
    
    .dropzone {
        padding: 1.5rem 1rem;
    }
    
    .icon-container {
        width: 3rem;
        height: 3rem;
    }
    
    .icon {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .thumbnail {
        width: 5rem;
        height: 5rem;
    }
    
    .file-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .download-btn {
        width: 100%;
        justify-content: center;
    }

    .content-section {
        padding: 1rem;
    }

    .content-section ul,
    .content-section ol {
        margin-left: 1rem;
    }

    .step-item {
        flex-direction: column;
        gap: 1rem;
    }

    .step-number {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
}

/* Kis mobil - 481-640px */
@media (min-width: 481px) and (max-width: 640px) {
    .container {
        padding: 1rem;
    }
    
    .dropzone {
        padding: 2rem 1rem;
    }
    
    .thumbnail {
        width: 4.5rem;
        height: 4.5rem;
    }
}

/* Tablet portrait - 768px-ig továbbra is 1 oszlop */
@media (max-width: 768px) {
    .toast {
        max-width: calc(100% - 2rem);
    }

    .content-section {
        padding: 1.5rem;
        margin: 2rem 0;
    }

    .content-section h2 {
        font-size: 1.5rem;
    }

    .content-section h3 {
        font-size: 1.125rem;
    }

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

    .feature-card {
        padding: 1.25rem;
    }
}

/* Desktop toast pozíció - 768px+ */
@media (min-width: 768px) {
    .toast {
        top: auto;
        bottom: calc(1rem + env(safe-area-inset-bottom));
        left: auto;
        right: 1rem;
        transform: translateY(100px);
        max-width: 400px;
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

/* ⭐ KRITIKUS BREAKPOINT - CSAK 1280px FELETT JELENNEK MEG AZ OLDALSÓ AD SÁVOK! */
@media (min-width: 1280px) {
    /* 3 oszlopos grid layout CSAK nagy képernyőkön */
    .page-wrapper {
        display: grid;
        grid-template-columns: minmax(0, 160px) minmax(auto, 800px) minmax(0, 160px);
        gap: 1.5rem;
        align-items: flex-start;
    }

    /* Oldalsó hirdetések MEGJELENNEK */
    .ad-container-side {
        display: block;
        width: 160px;
        min-height: 600px;
        position: sticky;
        top: calc(1.5rem + env(safe-area-inset-top));
    }
}

/* Nagy desktop - 1400px+ */
@media (min-width: 1400px) {
    .page-wrapper {
        max-width: 1400px;
    }
}

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

/* Print styles */
@media print {
    .ad-container-top,
    .ad-container-bottom,
    .ad-container-side {
        display: none;
    }
    
    .toast {
        display: none;
    }
}