:root {
    --bg-0: #f8fafc;
    --bg-1: #f1f5f9;
    --ink-0: #0f172a;
    --ink-1: #334155;
    --ink-soft: #64748b;
    --line: rgba(15, 23, 42, 0.1);
    --panel: rgba(255, 255, 255, 0.9);
    --panel-strong: #ffffff;
    --brand: #0f766e;
    --brand-deep: #0f4c4a;
    --brand-soft: #ccfbf1;
    --brand-hover: #0d9488;
    --accent: #e11d48;
    --danger: #be123c;
    --ok: #059669;
    --busy: #2563eb;
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow: 0 30px 60px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    color: var(--ink-0);
    background:
        radial-gradient(circle at 10% 0%, rgba(204, 251, 241, 0.6) 0%, transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(254, 226, 226, 0.4) 0%, transparent 30%),
        linear-gradient(160deg, var(--bg-0) 0%, var(--bg-1) 100%);
    position: relative;
    overflow-x: hidden;
    line-height: 1.5;
}

.bg-shape {
    position: fixed;
    z-index: -1;
    border-radius: 999px;
    filter: blur(8px);
    opacity: 0.6;
}

.shape-a {
    width: 320px;
    height: 320px;
    left: -100px;
    top: 20vh;
    background: rgba(15, 118, 110, 0.12);
}

.shape-b {
    width: 400px;
    height: 400px;
    right: -150px;
    top: 5vh;
    background: rgba(225, 29, 72, 0.08);
}

.container {
    width: min(1200px, calc(100% - 2.5rem));
    margin: 1rem auto 3rem;
}

/* App Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0 2rem;
}

.small-header {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1.5rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--brand-deep);
    letter-spacing: -0.02em;
}

.free-badge {
    background: var(--brand-soft);
    color: var(--brand-deep);
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid rgba(15, 118, 110, 0.2);
}

/* Hero Section */
.hero {
    margin-bottom: 2rem;
    text-align: center;
}

.eyebrow {
    margin: 0;
    font-family: "IBM Plex Mono", monospace;
    color: var(--accent);
    letter-spacing: 0.08em;
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
}

h1 {
    margin: 0.5rem 0 1rem;
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: var(--brand-deep);
}

.hero-text {
    margin: 0 auto;
    max-width: 800px;
    color: var(--ink-1);
    font-size: 1.15rem;
}

.tool-hero {
    text-align: left;
}
.tool-hero .hero-text {
    margin: 0;
    max-width: 650px;
}

/* Base Panel */
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.7rem;
    backdrop-filter: blur(12px);
}

.panel h2 {
    margin: 0 0 1rem;
    font-size: 1.4rem;
    color: var(--brand-deep);
}

.panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.panel-wide {
    min-height: 60vh;
}

.landing-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tool-description {
    margin: 0 0 1.5rem;
    color: var(--ink-soft);
}

/* Tool Cards Grid */
.tool-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.tool-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: all 250ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
}

.tool-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: var(--brand-deep);
}

.tool-card p {
    margin: 0 0 1.25rem;
    color: var(--ink-soft);
    font-size: 0.95rem;
    flex-grow: 1;
}

.tool-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-family: "IBM Plex Mono", monospace;
    font-weight: 500;
    color: var(--brand);
    transition: color 150ms ease;
}

.tool-card:hover,
.tool-card:focus-visible,
.tool-card.is-active {
    transform: translateY(-5px);
    border-color: rgba(15, 118, 110, 0.4);
    box-shadow: 0 20px 40px rgba(15, 118, 110, 0.1);
}
.tool-card:hover .tool-card-cta {
    color: var(--accent);
}

/* Forms & Inputs */
input, select, textarea, button {
    font: inherit;
}

select, input:not([type="file"]), textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #ffffff;
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    color: var(--ink-0);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

input[type="file"]::file-selector-button {
    border: 1px solid var(--line);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    background: var(--bg-1);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    margin-right: 0.8rem;
}

select:focus, input:not([type="file"]):focus, textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.field-block {
    margin-bottom: 1.25rem;
}

.field-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--ink-1);
}

.field-help {
    margin: 0.4rem 0 1rem;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

/* Buttons */
.submit-btn,
.download-btn,
.preview-open-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    padding: 0.8rem 1.4rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: all 200ms ease;
    text-align: center;
}

.submit-btn, .download-btn {
    background: var(--brand);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.3);
}

.submit-btn:hover, .download-btn:hover {
    background: var(--brand-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 118, 110, 0.4);
}

.preview-open-btn {
    background: var(--bg-1);
    color: var(--ink-1);
    border: 1px solid var(--line);
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}
.preview-open-btn:hover {
    background: #e2e8f0;
}

.back-link {
    display: inline-block;
    text-decoration: none;
    color: var(--brand-deep);
    font-weight: 500;
    transition: color 150ms ease;
}
.back-link:hover {
    color: var(--accent);
}

/* Tool page layout */
.tool-grid {
    display: flex;
    gap: 0;
    align-items: start;
}

.form-panel {
    flex: 1;
    min-width: 320px;
}

.preview-panel {
    width: 500px;
    min-width: 280px;
    max-width: 85vw;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Panel Ayırıcı (Resizer) */
.resizer-handle {
    width: 12px;
    cursor: col-resize;
    margin: 0 -6px;
    z-index: 100;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.resizer-handle::after {
    content: '';
    width: 4px;
    height: 40px;
    background: var(--line);
    border-radius: 2px;
    transition: background 0.2s, height 0.2s;
}

.resizer-handle:hover::after, 
.resizer-handle.is-dragging::after {
    background: var(--brand);
    height: 60px;
}

.manual-preview-notice {
    margin-bottom: 1.2rem;
    padding: 1.25rem;
    background: rgba(37, 99, 235, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(37, 99, 235, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.manual-preview-notice p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ink-1);
    line-height: 1.5;
}

.preview-manual-btn {
    background: var(--busy);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.preview-manual-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.preview-toolbar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.preview-status {
    font-size: 0.9rem;
    color: var(--ink-soft);
}
.status-ok { color: var(--ok); }
.status-error { color: var(--danger); }
.status-busy { color: var(--busy); }

.live-preview-wrap {
    position: relative;
    flex-grow: 1;
    min-height: 520px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--line);
    background: #eaeff5;
}

.live-preview-wrap iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 520px;
    border: 0;
    background: #fff;
}

.empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 1.5rem;
    color: var(--ink-soft);
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(4px);
}
.empty strong {
    color: var(--brand-deep);
    display: block;
    margin-bottom: 0.6rem;
    font-size: 1.1rem;
}

.static-empty {
    position: relative;
    min-height: 240px;
    border-radius: var(--radius-md);
    border: 2px dashed rgba(15, 118, 110, 0.2);
    background: transparent;
}

/* Result Page */
.result-page {
    width: min(720px, calc(100% - 2rem));
    margin: 4rem auto;
    background: var(--panel-strong);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    text-align: center;
}
.result-page h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--ok);
}
.result-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: 1.5rem 0;
}

/* Footer Section */
.site-footer {
    border-top: 1px solid var(--line);
    margin-top: 4rem;
    padding-top: 2rem;
    text-align: center;
}

.footer-note {
    font-size: 0.9rem;
    color: var(--ink-soft);
    margin-bottom: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--brand-deep);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}
.footer-links a:hover {
    text-decoration: underline;
}

.copyright {
    display: block;
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin: 0;
}

.center-note {
    text-align: center;
    font-size: 0.9rem;
}

@media (max-width: 1024px) {
    .tool-grid {
        flex-direction: column;
    }
    .resizer-handle {
        display: none;
    }
    .preview-panel {
        width: 100% !important;
        max-width: 100%;
        min-height: 400px;
        margin-top: 1.5rem;
    }
    .live-preview-wrap, .live-preview-wrap iframe {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 0 1rem;
        margin-top: 0.5rem;
    }
    .panel {
        padding: 1.25rem;
    }
    .landing-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .submit-btn, .download-btn, .preview-open-btn {
        width: 100%;
    }
    .app-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    .small-header {
        flex-direction: row;
        gap: 0;
        align-items: center;
        justify-content: space-between;
    }
    .small-header .back-link {
        font-size: 0.9rem;
    }
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

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

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

.breadcrumb-sep {
    color: var(--ink-soft);
    font-size: 0.8rem;
}
/* FAQ Section */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #ffffff;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item[open] {
    border-color: rgba(15, 118, 110, 0.3);
    box-shadow: 0 12px 30px rgba(15, 118, 110, 0.08);
}

.faq-item summary {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink-0);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 200ms ease, color 200ms ease;
    user-select: none;
    border-radius: var(--radius-md);
}

.faq-item:not([open]) summary:hover {
    background: #fdfdfd;
    color: var(--brand-deep);
}

.faq-item[open] summary {
    color: var(--brand-deep);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding-bottom: 0.75rem;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '';
    display: block;
    min-width: 20px;
    width: 20px;
    height: 20px;
    margin-left: 1rem;
    background-image: url("data:image/svg+xml,%3Csvg stroke='%23334155' fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item[open] summary::after {
    transform: rotate(180deg);
    background-image: url("data:image/svg+xml,%3Csvg stroke='%230f766e' fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

.faq-item p {
    margin: 0;
    padding: 0 1.5rem 1.4rem;
    color: var(--ink-1);
    font-size: 0.95rem;
    line-height: 1.7;
    animation: faq-fade-in 350ms ease-out forwards;
}

@keyframes faq-fade-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
