/* Berrybot Studio — tema (renkler js/site-config.js) */

body {
    background-color: var(--c-bg);
    color: var(--c-text);
    transition: background-color 0.25s ease, color 0.25s ease;
}

::selection {
    background: rgba(244, 63, 94, 0.25);
    color: var(--c-text);
}

.theme-header {
    background: var(--c-header-bg);
    border-color: var(--c-header-border);
}

.theme-brand { color: var(--c-brand); }
.theme-tech { color: var(--c-tech); }
.theme-tech-light { color: var(--c-tech-light); }
.theme-muted { color: var(--c-text-muted); }
.theme-dim { color: var(--c-text-dim); }
.theme-heading { color: var(--c-text); }

.theme-gradient-text {
    background: linear-gradient(to right, var(--c-gradient-from), var(--c-gradient-to));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.theme-blob-rose { background-color: var(--c-blob-rose); }
.theme-blob-tech { background-color: var(--c-blob-tech); }

.theme-section {
    background: var(--c-bg);
    border-color: var(--c-section-border);
}

.theme-section-alt {
    background: var(--c-section-alt-bg);
    border-color: var(--c-section-border);
}

.theme-card {
    background: var(--c-card-bg);
    border-color: var(--c-card-border);
}

.theme-viewer {
    background: var(--c-viewer-bg);
    border-color: var(--c-card-border);
}

.theme-btn-primary {
    background: var(--c-btn-primary);
    color: var(--c-btn-primary-text);
}
.theme-btn-primary:hover {
    background: var(--c-btn-primary-hover);
}

/* ── 3D kutu (viewerBox) ── */
#hero-viewer-wrap {
    position: relative;
    width: var(--viewer-width, 100%);
    max-width: var(--viewer-max-width-mobile, 100%);
    transform: translate(var(--viewer-offset-x, 0px), var(--viewer-offset-y, 0px));
}

@media (min-width: 1024px) {
    #hero-viewer-wrap {
        max-width: var(--viewer-max-width, 32rem);
    }
    #hero-viewer-wrap[data-align="left"] {
        margin-right: auto;
        margin-left: 0;
    }
    #hero-viewer-wrap[data-align="center"] {
        margin-left: auto;
        margin-right: auto;
    }
    #hero-viewer-wrap[data-align="right"] {
        margin-left: auto;
        margin-right: 0;
    }
}

.theme-viewer.hero-3d-stage {
    aspect-ratio: var(--viewer-aspect-ratio, 1 / 1);
    border-radius: var(--viewer-radius, 1rem);
    border: none;
    background: color-mix(in srgb, var(--viewer-bg, var(--c-bg)) var(--viewer-bg-blend, 98%), transparent);
    box-shadow: 0 4px 24px -4px color-mix(in srgb, var(--c-text) calc(var(--viewer-shadow-strength, 0.06) * 100%), transparent);
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

#hero-viewer-wrap[data-glow="off"] .hero-3d-stage,
#hero-viewer-wrap[data-mode="ai"] .hero-3d-stage,
#hero-viewer-wrap[data-mode="scan"] .hero-3d-stage {
    box-shadow: 0 4px 24px -4px color-mix(in srgb, var(--c-text) calc(var(--viewer-shadow-strength, 0.06) * 100%), transparent);
}

#hero-viewer-wrap.is-interacting .hero-3d-stage {
    box-shadow: 0 6px 28px -4px color-mix(in srgb, var(--c-text) calc(var(--viewer-shadow-strength, 0.06) * 1.4 * 100%), transparent);
}

.hero-3d-stage::after {
    display: none;
}

/* ── Hero yumuşak geçiş (heroRotate) ── */
.hero-rotate-panel {
    opacity: 1;
    transition: opacity var(--hero-fade-out-ms, 700ms) ease-in-out;
}
.hero-rotate-panel.is-fade-out {
    opacity: var(--hero-fade-min, 0.45);
}
.hero-rotate-panel.is-fade-in {
    transition: opacity var(--hero-fade-in-ms, 900ms) ease-in-out;
    opacity: 1;
}

.hero-viewer-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 20;
    border-radius: 9999px;
    border: 1px solid color-mix(in srgb, var(--c-text) 8%, transparent);
    background: color-mix(in srgb, var(--c-bg) 85%, transparent);
    padding: 0.25rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--c-text-muted);
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.hero-mode-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}
.hero-mode-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 9999px;
    border: none;
    background: var(--c-panel-border);
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s, background 0.2s;
}
.hero-mode-dot.is-active {
    background: var(--c-brand);
    transform: scale(1.25);
}
.hero-mode-dot:hover {
    background: var(--c-tech);
}

@media (prefers-reduced-motion: reduce) {
    .hero-rotate-panel { transition: none; }
}

.theme-footer {
    background: var(--c-footer-bg);
    border-color: var(--c-section-border);
}

.theme-nav-link {
    color: var(--c-nav-link);
}
.theme-nav-link:hover {
    color: var(--c-nav-link-hover);
}

.theme-mobile-menu {
    background: var(--c-mobile-menu-bg);
}

.theme-menu-btn {
    background: var(--c-menu-btn-bg);
    border-color: var(--c-menu-btn-border);
}

.theme-input {
    background: var(--c-input-bg);
    border-color: var(--c-input-border);
    color: var(--c-text);
}
.theme-input::placeholder {
    color: var(--c-text-dim);
}

.theme-pill-tech {
    border-radius: 9999px;
    border-color: color-mix(in srgb, var(--c-tech) 30%, transparent);
    background: color-mix(in srgb, var(--c-tech) 10%, transparent);
    color: var(--c-tech-light);
}

.theme-pill-brand {
    border-radius: 9999px;
    border-color: color-mix(in srgb, var(--c-brand) 30%, transparent);
    background: color-mix(in srgb, var(--c-brand) 10%, transparent);
    color: var(--c-brand);
}

#theme-toggle,
[data-theme-toggle] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--c-panel-border);
    background: var(--c-panel-bg);
    color: var(--c-text-muted);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
#theme-toggle:hover,
[data-theme-toggle]:hover {
    color: var(--c-tech);
}

#theme-toggle svg,
[data-theme-toggle] svg {
    width: 1.125rem;
    height: 1.125rem;
}

#theme-toggle .icon-sun,
[data-theme-toggle] .icon-sun { display: none; }
#theme-toggle .icon-moon,
[data-theme-toggle] .icon-moon { display: block; }

html[data-theme="dark"] #theme-toggle .icon-sun,
html[data-theme="dark"] [data-theme-toggle] .icon-sun { display: block; }
html[data-theme="dark"] #theme-toggle .icon-moon,
html[data-theme="dark"] [data-theme-toggle] .icon-moon { display: none; }

#hero-3d-viewer canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    cursor: grab;
}
#hero-3d-viewer canvas:active { cursor: grabbing; }

.menu-bar { background-color: var(--c-text); }

/* ── Proje dosya yükleme çubuğu ── */
.upload-progress-wrap {
    margin-bottom: 0.75rem;
}
.upload-progress-track {
    height: 0.5rem;
    overflow: hidden;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--c-card-border) 65%, transparent);
}
.upload-progress-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--c-brand), var(--c-tech, #38bdf8));
    transition: width 0.2s ease;
}
.upload-progress-label {
    text-align: right;
}
.upload-file-card {
    min-height: 3.25rem;
}

/* ── Dosya red bildirim kutusu ── */
.upload-error-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.upload-error-modal.hidden {
    display: none;
}
.upload-error-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}
.upload-error-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 28rem;
    border-radius: 0.75rem;
    border: 1px solid var(--c-card-border);
    padding: 1.25rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}
