/*
 * Ana sayfa (form) görünümü. Canlı üretim ekranıyla aynı dili konuşur: koyu zemin, ince çizgiler,
 * tek vurgu rengi (sinyal turuncusu). Kutu gölgesi yok; derinliği arka plandaki ışık veriyor.
 */

:root {
    --b-bg: #09090b;
    --b-panel: rgba(16, 16, 19, 0.78);
    --b-field: rgba(255, 255, 255, 0.035);
    --b-line: rgba(255, 255, 255, 0.08);
    --b-line-strong: rgba(255, 255, 255, 0.15);
    --b-text: #ececef;
    --b-muted: #8e8e99;
    --b-faint: #5f5f69;
    --b-signal: #ff6a2b;
    --halo-size: min(980px, 120vw);
    color-scheme: dark;
}

html,
body.builder-page {
    background: var(--b-bg);
    color: var(--b-text);
}

::selection {
    background: rgba(255, 106, 43, 0.35);
    color: #fff;
}

.tone-muted { color: var(--b-muted); }
.tone-faint { color: var(--b-faint); }

/* ---------- Arka plan sahnesi ---------- */

.bg-stage {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/*
 * Işık halkası: logodaki eğik "O"dan türetildi. Perspektifle eğik duran ince bir halka; üzerindeki
 * parlak bölge (conic-gradient) halka döndükçe çevresinde dolaşır. builder-fx.js döndürür ve imlece göre eğer.
 */
.bg-halo-wrap {
    position: absolute;
    top: 34vh;
    left: 80%;
    opacity: 0.6;
    perspective: 1400px;
}

.bg-halo {
    position: absolute;
    width: var(--halo-size);
    height: var(--halo-size);
    margin: calc(var(--halo-size) / -2) 0 0 calc(var(--halo-size) / -2);
    transform: rotateX(58deg) rotateY(-14deg) rotateZ(-18deg);
    transform-style: preserve-3d;
}

/* Halkanın içinde hafif bir karanlık, dışında soluk bir korona: tutulma hissi. */
.bg-halo::before {
    content: "";
    position: absolute;
    inset: -22%;
    border-radius: 50%;
    background: radial-gradient(circle closest-side, rgba(9, 9, 11, 0.55) 52%, rgba(255, 106, 43, 0.05) 68%, rgba(255, 106, 43, 0) 100%);
}

.bg-halo-spin {
    position: absolute;
    inset: 0;
}

.bg-halo-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(255, 106, 43, 0) 0deg,
        rgba(255, 106, 43, 0.12) 70deg,
        rgba(255, 140, 80, 0.7) 150deg,
        rgba(255, 236, 214, 1) 182deg,
        rgba(255, 128, 64, 0.55) 215deg,
        rgba(255, 106, 43, 0.08) 290deg,
        rgba(255, 106, 43, 0) 360deg
    );
    -webkit-mask: radial-gradient(circle closest-side, transparent 97%, #000 98%, #000 99%, transparent 100%);
    mask: radial-gradient(circle closest-side, transparent 97%, #000 98%, #000 99%, transparent 100%);
}

/* Bulanıklık maskeden sonra uygulansın diye ayrı sarmalayıcıda: halkanın etrafına ışık taşar. */
.bg-halo-bloom {
    position: absolute;
    inset: 0;
    filter: blur(22px);
    opacity: 0.85;
}

.bg-halo-bloom .bg-halo-ring {
    -webkit-mask: radial-gradient(circle closest-side, transparent 90%, #000 96%, #000 99%, transparent 100%);
    mask: radial-gradient(circle closest-side, transparent 90%, #000 96%, #000 99%, transparent 100%);
}

/* Form ve kartlardan yayılan halka (builder-fx.js oluşturur). */
.bg-pulse {
    position: absolute;
    width: 0;
    height: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(255, 160, 110, 0.7), 0 0 28px rgba(255, 106, 43, 0.35);
}

/* Işıktan kendiliğinden yayılan geniş dalga: daha soluk ve yumuşak. */
.bg-pulse.is-soft {
    box-shadow:
        inset 0 0 0 1px rgba(255, 175, 125, 0.55),
        inset 0 0 50px rgba(255, 106, 43, 0.13),
        0 0 50px rgba(255, 106, 43, 0.2);
}

@media (max-width: 767px) {
    :root {
        --halo-size: 620px;
    }

    .bg-halo-wrap {
        top: 4vh;
        left: 96%;
        opacity: 0.38;
    }
}

.bg-glow {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 50%;
    will-change: transform;
}

.bg-glow--main {
    width: 820px;
    height: 820px;
    margin: -410px 0 0 -410px;
    background: radial-gradient(circle, rgba(255, 106, 43, 0.2) 0%, rgba(255, 106, 43, 0.07) 32%, rgba(255, 106, 43, 0) 68%);
    transform: translate(70vw, 28vh);
}

.bg-glow--soft {
    width: 1500px;
    height: 900px;
    margin: -450px 0 0 -750px;
    background: radial-gradient(ellipse, rgba(255, 228, 210, 0.055), rgba(255, 228, 210, 0) 65%);
    transform: translate(40vw, -5vh);
}

/* Hafif film greni: düz dijital siyahı kırar. */
.bg-grain {
    position: absolute;
    inset: -50%;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Başlık alanı ---------- */

.brand-mark {
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.brand-name {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-link {
    padding: 7px 11px;
    border-radius: 8px;
    color: var(--b-muted);
    font-size: 13px;
    font-weight: 500;
    transition: color 0.15s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--b-text);
}

/* .builder-page öneki: Tailwind preflight'ın [type='button'] arka plan sıfırlamasını yenmek için. */
.builder-page .nav-button {
    height: 32px;
    padding: 0 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 0 0 1px var(--b-line-strong);
    color: var(--b-text);
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.15s ease;
}

.builder-page .nav-button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.page-lead {
    max-width: 34rem;
    margin-top: 20px;
    color: var(--b-muted);
    font-size: 15.5px;
    line-height: 1.65;
}

.hero-title {
    font-size: clamp(2.6rem, 7.4vw, 4.4rem);
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1;
}

.hero-title-muted {
    color: var(--b-faint);
}

/* ---------- Panel ve alanlar ---------- */

.panel {
    position: relative;
    border-radius: 16px;
    background: var(--b-panel);
    box-shadow: inset 0 0 0 1px var(--b-line);
}

/* Işığa bakan kenar aydınlanır: --lx/--ly/--la değerlerini builder-fx.js her karede günceller. */
[data-lit] {
    position: relative;
}

[data-lit]::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 1px;
    border-radius: inherit;
    background: radial-gradient(380px circle at var(--lx, -999px) var(--ly, -999px), rgba(255, 140, 80, 0.9), rgba(255, 106, 43, 0) 70%);
    opacity: var(--la, 0);
    pointer-events: none;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.panel-section,
.panel-footer {
    border-top: 1px solid var(--b-line);
}

.panel-footer {
    border-radius: 0 0 16px 16px;
    background: rgba(255, 255, 255, 0.015);
}

.field-label {
    display: block;
    margin-bottom: 7px;
    color: var(--b-muted);
    font-size: 12px;
    font-weight: 500;
}

.field-hint {
    color: var(--b-faint);
    font-size: 11.5px;
}

.field-input {
    width: 100%;
    padding: 10px 14px;
    border: 0;
    border-radius: 10px;
    outline: none;
    background: var(--b-field);
    box-shadow: inset 0 0 0 1px var(--b-line);
    color: var(--b-text);
    font-size: 14px;
    transition: box-shadow 0.18s ease, background-color 0.18s ease;
}

.field-input::placeholder {
    color: var(--b-faint);
}

.field-input:hover {
    box-shadow: inset 0 0 0 1px var(--b-line-strong);
}

.field-input:focus {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(255, 106, 43, 0.7), 0 0 0 4px rgba(255, 106, 43, 0.12);
}

.brief-input {
    display: block;
    padding: 13px 16px;
    font-size: 14.5px;
    line-height: 1.65;
    resize: vertical;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.model-select {
    width: auto;
    min-width: 12rem;
    padding: 7px 34px 7px 11px;
    font-size: 13px;
    cursor: pointer;
}

.model-select option {
    background: #16161a;
    color: var(--b-text);
}

.logo-drop {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 42px;
    overflow: hidden;
    border-radius: 10px;
    background-color: #1b1b1f;
    background-image: conic-gradient(#2a2a2f 25%, transparent 0 50%, #2a2a2f 0 75%, transparent 0);
    background-size: 10px 10px;
    box-shadow: inset 0 0 0 1px var(--b-line);
    color: var(--b-muted);
    cursor: pointer;
    transition: box-shadow 0.18s ease, color 0.18s ease;
}

.logo-drop:hover {
    box-shadow: inset 0 0 0 1px var(--b-line-strong);
    color: var(--b-text);
}

@media (min-width: 640px) {
    .logo-drop {
        width: 42px;
    }
}

.chip {
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px var(--b-line);
    color: var(--b-muted);
    font-size: 12px;
    transition: color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.chip:hover {
    box-shadow: inset 0 0 0 1px var(--b-line-strong);
    color: var(--b-text);
}

.chip.is-used {
    background: rgba(255, 106, 43, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 106, 43, 0.45);
    color: #ff9a6b;
}

/* ---------- Butonlar ---------- */

/* .builder-page öneki: Tailwind preflight'ın [type='submit'] { background: transparent } kuralı
   aynı özgüllükte ve sayfaya bizden sonra eklendiği için onu yenmek gerekiyor. */
.builder-page .cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    overflow: hidden;
    border-radius: 10px;
    background: var(--b-text);
    color: var(--b-bg);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.3s ease;
}

.builder-page .cta:hover:not(:disabled) {
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06), 0 10px 40px -10px rgba(255, 106, 43, 0.55);
}

.builder-page .cta:disabled {
    background: rgba(255, 255, 255, 0.07);
    color: var(--b-faint);
    cursor: not-allowed;
}

/* Form hazır olduğunda butonun üstünden geçen ışık şeridi. */
.cta::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 140, 80, 0.55) 50%, transparent 70%);
    transform: translateX(-120%);
    pointer-events: none;
}

.cta.is-shining::after {
    animation: b-shine 1.1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.cta.is-shining {
    animation: b-cta-glow 1.6s ease-out;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px var(--b-line-strong);
    color: var(--b-text);
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.15s ease;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ---------- Hazır prompt kartları ---------- */

.section-label {
    color: var(--b-text);
    font-size: 14px;
    font-weight: 600;
}

.builder-page .example-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px 15px;
    border-radius: 12px;
    background: rgba(16, 16, 19, 0.6);
    box-shadow: inset 0 0 0 1px var(--b-line);
    text-align: left;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.builder-page .example-card:hover {
    background: rgba(24, 24, 28, 0.85);
    transform: translateY(-2px);
}

.builder-page .example-card.is-active {
    background: rgba(255, 106, 43, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 106, 43, 0.5);
}

.example-vibe {
    margin-bottom: 10px;
    color: var(--b-faint);
    font-size: 11.5px;
}

.example-name {
    color: var(--b-text);
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.example-industry {
    margin-top: 2px;
    color: var(--b-muted);
    font-size: 12.5px;
}

.example-state {
    position: absolute;
    top: 13px;
    right: 14px;
    color: var(--b-signal);
    font-size: 11.5px;
    font-weight: 500;
}

.example-state > span {
    display: inline-block;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.example-state-active {
    position: absolute;
    right: 0;
}

.example-card:hover:not(.is-active) .example-state-use,
.example-card.is-active .example-state-active {
    opacity: 1;
    transform: none;
}

/* ---------- Pricing ---------- */

/* Paketler yatay satırlar: bilgi | özellikler | fiyat. Mobilde alt alta. */
.pricing-grid {
    display: grid;
    gap: 12px;
    margin-top: 44px;
}

.plan {
    position: relative;
    display: grid;
    gap: 22px;
    padding: 24px 22px;
    border-radius: 16px;
    background: var(--b-panel);
    box-shadow: inset 0 0 0 1px var(--b-line);
    transition: background-color 0.25s ease;
}

.plan:not(.is-featured):hover {
    background: rgba(22, 22, 26, 0.88);
}

@media (min-width: 768px) {
    .plan {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 0.85fr);
        gap: 0;
        align-items: stretch;
        padding: 26px 0;
    }

    .plan > * {
        padding: 0 26px;
    }

    .plan > * + * {
        border-left: 1px solid var(--b-line);
    }
}

/* Paket illüstrasyonları (assets/pricing/*.png, şeffaf zemin). Dosya yoksa hiç basılmaz. */
.plan-art {
    display: block;
    width: 96px;
    height: 96px;
    margin: -6px 0 14px -6px;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.plan:not(.is-featured):hover .plan-art {
    transform: translateY(-3px);
}

.plan.is-featured .plan-art {
    filter: drop-shadow(0 10px 24px rgba(255, 106, 43, 0.35));
    animation: plan-float 6s ease-in-out infinite;
}

@keyframes plan-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.plan-name {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.plan-quota {
    margin-top: 2px;
    color: var(--b-muted);
    font-size: 13.5px;
}

.plan-desc {
    margin-top: 16px;
    color: var(--b-muted);
    font-size: 13.5px;
    line-height: 1.6;
}

.plan-features {
    display: grid;
    align-content: center;
    gap: 10px;
    font-size: 13.5px;
    line-height: 1.45;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.plan-features svg {
    flex: none;
    width: 15px;
    height: 15px;
    margin-top: 2px;
    color: var(--b-muted);
}

.plan-buy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.plan-amount {
    font-size: 40px;
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1;
}

.plan-term {
    margin-top: 8px;
    color: var(--b-faint);
    font-size: 12.5px;
}

.plan-unit {
    margin-top: 3px;
    color: var(--b-muted);
    font-size: 13px;
}

.plan .cta,
.plan .btn-ghost {
    justify-content: center;
    width: 100%;
    margin-top: 20px;
}

@media (max-width: 767px) {
    .plan-features,
    .plan-buy {
        padding-top: 20px;
        border-top: 1px solid var(--b-line);
    }
}

/* Önerilen paket: kenarında dolaşan bir ışık izi (logodaki halkanın dili), nefes alan bir parıltı
   ve birkaç saniyede bir butondan geçen ışık şeridi. */
@property --plan-orbit {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.plan.is-featured {
    background: rgba(26, 26, 30, 0.92);
    box-shadow: inset 0 0 0 1px rgba(255, 140, 80, 0.28), 0 30px 80px -45px rgba(255, 106, 43, 0.4);
    animation: plan-breathe 5s ease-in-out infinite;
}

.plan.is-featured::after {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(
        from var(--plan-orbit),
        rgba(255, 106, 43, 0) 0deg,
        rgba(255, 106, 43, 0) 240deg,
        rgba(255, 140, 80, 0.5) 300deg,
        rgba(255, 214, 190, 1) 340deg,
        rgba(255, 106, 43, 0) 360deg
    );
    pointer-events: none;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: plan-orbit 4.5s linear infinite;
}

.plan.is-featured .plan-unit {
    color: #ff9a6b;
}

.plan.is-featured .plan-features svg {
    color: var(--b-signal);
}

.plan.is-featured .cta::after {
    animation: plan-shine 5s cubic-bezier(0.4, 0, 0.2, 1) 1.5s infinite;
}

@keyframes plan-orbit {
    to { --plan-orbit: 360deg; }
}

@keyframes plan-breathe {
    0%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 140, 80, 0.28), 0 30px 80px -45px rgba(255, 106, 43, 0.35); }
    50% { box-shadow: inset 0 0 0 1px rgba(255, 140, 80, 0.4), 0 30px 90px -32px rgba(255, 106, 43, 0.6); }
}

@keyframes plan-shine {
    0% { transform: translateX(-120%); }
    25%, 100% { transform: translateX(120%); }
}

@media (prefers-reduced-motion: reduce) {
    .plan.is-featured,
    .plan.is-featured::after,
    .plan.is-featured .cta::after,
    .plan.is-featured .plan-art {
        animation: none;
    }
}

.pricing-includes {
    display: grid;
    gap: 1px;
    margin-top: 12px;
    padding: 1px;
    overflow: hidden;
    border-radius: 16px;
    background: var(--b-line);
}

@media (min-width: 640px) {
    .pricing-includes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .pricing-includes {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.include-item {
    padding: 18px 18px 20px;
    background: #101013;
}

.include-title {
    font-size: 13.5px;
    font-weight: 600;
}

.include-text {
    margin-top: 6px;
    color: var(--b-muted);
    font-size: 12.5px;
    line-height: 1.55;
}

.pricing-volume {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 12px;
    padding: 20px;
}

@media (min-width: 640px) {
    .pricing-volume {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.pricing-volume-title {
    font-size: 15px;
    font-weight: 600;
}

.pricing-volume-text {
    margin-top: 4px;
    color: var(--b-muted);
    font-size: 13.5px;
}

.pricing-note {
    margin-top: 18px;
    color: var(--b-faint);
    font-size: 12px;
    line-height: 1.6;
}

/* ---------- Klasik yükleme / sonuç ---------- */

.loader-ring {
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--b-signal);
    border-radius: 50%;
    animation: b-spin 0.9s linear infinite;
}

.result-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 22px;
}

.result-icon.is-ok {
    background: rgba(143, 227, 176, 0.1);
    color: #8fe3b0;
}

.result-icon.is-error {
    background: rgba(255, 107, 107, 0.1);
    color: #ff8a8a;
}

/* ---------- Animasyonlar ---------- */

@keyframes b-shine {
    to { transform: translateX(120%); }
}

@keyframes b-cta-glow {
    0% { box-shadow: 0 0 0 0 rgba(255, 106, 43, 0.55); }
    100% { box-shadow: 0 0 0 14px rgba(255, 106, 43, 0); }
}

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

@media (prefers-reduced-motion: reduce) {
    .cta.is-shining,
    .cta.is-shining::after {
        animation: none;
    }

    .example-card:hover {
        transform: none;
    }
}
