/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

a {
    color: #3b82f6;
}

/* ===== LAYOUT ===== */
.app-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
}

/* ===== HEADER ===== */
.header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.logo-area h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tagline {
    font-size: 0.85rem;
    color: #64748b;
}

/* ===== NAV ===== */
.main-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.main-nav a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: #3b82f6;
}

/* ===== ADS ===== */
.ad-container {
    background: #f1f5f9;
    border-radius: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-ad {
    width: 728px;
    max-width: 100%;
}

.footer-ad {
    width: 300px;
    max-width: 100%;
    margin: 0 auto 1rem;
    min-height: 250px;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.tab-btn.active {
    background: #3b82f6;
    color: white;
}

.tab-btn:hover:not(.active) {
    background: #f1f5f9;
    color: #1e293b;
}

/* ===== TOOL PANELS ===== */
.tool-panel {
    display: none;
}

.tool-panel.active {
    display: block;
}

/* ===== UPLOAD AREA ===== */
.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 1rem;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.upload-area:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

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

/* ===== SETTINGS PANEL ===== */
.settings-panel {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #374151;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: #1e293b;
    background: white;
    transition: border-color 0.2s;
}

.input-group input[type="number"] {
    width: 150px;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 1rem;
}

/* ===== RESULT AREA ===== */
.result-area {
    margin-top: 2rem;
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.before-after {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.before, .after {
    flex: 1;
    text-align: center;
}

.before h3, .after h3 {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.before img, .after img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    background-image: linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
                      linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
                      linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* ===== BUTTONS ===== */
.primary-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.primary-btn:hover {
    background: #2563eb;
}

.btn-outline {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.5);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== CONTENT SECTION (AdSense content) ===== */
.content-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.content-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    color: #1e293b;
}

.content-section p {
    color: #475569;
    margin-bottom: 1rem;
    max-width: 800px;
}

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

.feature-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.feature-card p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

.why-list, .how-to-list {
    margin: 0.5rem 0 1.5rem 1.5rem;
    color: #475569;
}

.why-list li, .how-to-list li {
    margin-bottom: 0.5rem;
}

/* ===== FAQ ===== */
.faq {
    margin-top: 1rem;
}

.faq-item {
    background: white;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
}

.faq-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #1e293b;
}

.faq-item p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

/* ===== STATIC PAGES ===== */
.static-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem 0 3rem;
}

.static-page h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.static-page .lead {
    font-size: 1.05rem;
    color: #475569;
    margin-bottom: 2rem;
}

.static-page h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 2rem 0 0.5rem;
    color: #1e293b;
}

.static-page p, .static-page li {
    color: #475569;
    margin-bottom: 0.75rem;
}

.static-page ul, .static-page ol {
    margin: 0.5rem 0 1rem 1.5rem;
}

/* ===== CONTACT FORM ===== */
.contact-form-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.contact-form {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
}

.contact-info {
    padding: 1rem 0;
}

.contact-info h2 {
    margin-top: 0 !important;
}

/* ===== BLOG ===== */
.blog-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.blog-card {
    background: white;
    border-radius: 1rem;
    padding: 1.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.blog-meta {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.blog-card h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.blog-card p {
    color: #475569;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.blog-read-more {
    display: inline-block;
    margin-top: 0.5rem;
    color: #3b82f6;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
}

.blog-read-more:hover {
    text-decoration: underline;
}

/* ===== FOOTER ===== */
.footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
}

.footer-links {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #64748b;
    text-decoration: none;
    margin: 0 0.4rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e293b;
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    z-index: 10000;
    font-size: 0.875rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.cookie-banner p {
    margin: 0;
    flex: 1;
}

.cookie-banner a {
    color: #93c5fd;
}

.cookie-btns {
    display: flex;
    gap: 0.5rem;
}

.cookie-banner button {
    background: #3b82f6;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    color: white;
    font-family: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s;
}

.cookie-banner button:hover {
    background: #2563eb;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .contact-form-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .header {
        flex-direction: column;
        text-align: center;
    }

    .main-nav {
        justify-content: center;
        gap: 1rem;
    }

    .top-ad {
        min-height: 50px;
    }

    .before-after {
        flex-direction: column;
    }

    .tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

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

    .static-page h1 {
        font-size: 1.5rem;
    }
}