/*
 * TRset Artificial Intelligence Generation III / Version 5.0
 * TRset Yapay Zeka Tabanli Bilgi Servisi
 * TRset.com Jenerasyon III / Version 5.0
 *
 * 27 03 2026 - Oguzhan YURTSEVER
 * Powered by Bilisim Park (c)
 * Neva CMS + Ouzkahn Script Framework + TRawl
 */
.trset-public-header {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(14px);
    /* N00000167 */
    border-bottom: 1px solid color-mix(in srgb, var(--accent-cyan) 38%, var(--border-soft));
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--accent-cyan) 10%, transparent),
        0 10px 32px rgba(17, 26, 45, 0.14),
        inset 0 1px 0 color-mix(in srgb, #ffffff 6%, transparent);
    background: color-mix(in srgb, var(--bg-layer) 86%, transparent);
}

/* N00000168 */
body.theme-light .trset-public-header {
    border-bottom-color: color-mix(in srgb, var(--accent-cyan) 32%, var(--border-soft));
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--accent-cyan) 8%, transparent),
        0 8px 26px rgba(17, 26, 45, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
    background: color-mix(in srgb, var(--bg-main) 90%, transparent);
}

body.theme-dark .trset-public-header {
    border-bottom-color: color-mix(in srgb, var(--accent-cyan) 45%, var(--border-soft));
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--accent-cyan) 18%, transparent),
        0 12px 36px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    background: color-mix(in srgb, #0a0b10 82%, transparent);
}

/* N00000174 */
@keyframes trset-header-scan-sweep {
    0% {
        transform: translateX(-120%);
        opacity: 0;
    }
    12% {
        opacity: 0.95;
    }
    100% {
        transform: translateX(120%);
        opacity: 0;
    }
}

.trset-header-scan {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    overflow: hidden;
    pointer-events: none;
}

.trset-header-scan::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 42%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        color-mix(in srgb, var(--accent-cyan) 70%, transparent),
        color-mix(in srgb, var(--accent-purple) 50%, transparent),
        transparent
    );
    animation: trset-header-scan-sweep 1.15s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;
}

body.trset-motion-calm .trset-header-scan::after {
    animation: none !important;
    opacity: 0.75;
}

@media (prefers-reduced-motion: reduce) {
    body:not(.trset-motion-full) .trset-header-scan::after {
        animation: none !important;
    }
}

.trset-public-header-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0.6rem var(--trset-page-gutter) 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.trset-header-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem 0.75rem;
}

.trset-header-brand {
    min-width: 0;
}

.trset-logo-link {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    text-decoration: none;
    line-height: 1;
    filter: drop-shadow(0 0 0.5px rgba(255, 255, 255, 0.95)) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
    transform-origin: center center;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.trset-logo-link:hover {
    transform: scale(1.2);
}

@media (prefers-reduced-motion: reduce) {
    body:not(.trset-motion-full) .trset-logo-link {
        transition: none;
    }

    body:not(.trset-motion-full) .trset-logo-link:hover {
        transform: none;
    }
}

body.theme-dark .trset-logo-link {
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

.trset-logo-tr,
.trset-logo-set {
    font-family: "Montserrat", system-ui, sans-serif;
    font-weight: 800;
    transition: color 0.4s ease, text-shadow 0.4s ease;
    -webkit-text-stroke: 0.45px rgba(255, 255, 255, 0.55);
    paint-order: stroke fill;
}

body.theme-light .trset-logo-tr {
    color: #b01010;
    font-size: clamp(1.35rem, 3.5vw, 1.85rem);
    letter-spacing: -0.03em;
    -webkit-text-stroke-color: rgba(20, 20, 30, 0.35);
    text-shadow:
        0 0 1px rgba(255, 255, 255, 0.9),
        1px 1px 0 rgba(255, 255, 255, 0.35);
}

body.theme-light .trset-logo-set {
    color: #1c1530;
    font-size: clamp(0.95rem, 2.4vw, 1.22rem);
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
}

body.theme-dark .trset-logo-tr {
    color: #ff2a2a;
    font-size: clamp(1.35rem, 3.5vw, 1.85rem);
    letter-spacing: -0.03em;
    -webkit-text-stroke-color: rgba(0, 0, 0, 0.45);
    text-shadow:
        0 0 1px rgba(0, 0, 0, 0.6),
        0 1px 2px rgba(0, 0, 0, 0.45);
}

body.theme-dark .trset-logo-set {
    color: #f4f4f8;
    font-size: clamp(0.95rem, 2.4vw, 1.22rem);
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.55);
}

body.theme-light .trset-logo-link:hover .trset-logo-tr {
    color: #5a0404;
}

body.theme-dark .trset-logo-link:hover .trset-logo-tr {
    color: #ff6b6b;
}

body.theme-light .trset-logo-link:hover .trset-logo-set {
    color: #0f0f18;
}

body.theme-dark .trset-logo-link:hover .trset-logo-set {
    color: #ffffff;
}

.trset-header-cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem 0.32rem;
}

/* N00000180 */
.trset-header-points-wrap {
    display: none;
    align-items: center;
    justify-content: flex-end;
}

@media (min-width: 1100px) {
    .trset-header-points-wrap {
        display: flex;
    }
}

/* N00000192 */
.trset-login-toggle {
    border: 1px solid var(--border-soft);
    background: var(--bg-soft);
    border-radius: 999px;
    color: var(--text-main);
    padding: 0.35rem 0.45rem;
    cursor: pointer;
    font: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    min-height: 2.35rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.trset-login-toggle:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-1px);
}

.trset-login-toggle.is-authenticated {
    border-color: color-mix(in srgb, var(--accent-cyan) 55%, var(--border-soft));
    background: color-mix(in srgb, var(--bg-soft) 82%, var(--accent-cyan) 18%);
}

.trset-login-icon {
    display: inline-block;
}

.trset-login-toggle .trset-toggle-layer.is-trset-hidden {
    display: none;
}

.trset-login-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.trset-login-modal[hidden] {
    display: none !important;
}

.trset-login-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 8, 14, 0.72);
    backdrop-filter: blur(4px);
}

.trset-login-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(96vw, 520px);
    max-height: min(92vh, 720px);
    background: var(--bg-layer);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-cyber);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.trset-login-modal__chrome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--border-soft);
    background: color-mix(in srgb, var(--bg-main) 40%, transparent);
}

.trset-login-modal__title-wrap {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    min-width: 0;
}

.trset-login-modal__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    text-decoration: none;
}

.trset-login-modal__terms {
    font-size: 0.78rem;
    color: var(--text-soft);
    text-decoration: underline;
}

.trset-login-modal__close {
    border: 0;
    background: transparent;
    color: var(--text-main);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    border-radius: 8px;
}

.trset-login-modal__close:hover {
    background: var(--bg-soft);
}

.trset-login-modal__body {
    padding: 0.85rem 0.9rem 1rem;
    overflow: auto;
}

.trset-login-modal__hint {
    margin: 0 0 0.75rem;
}

.trset-login-form {
    display: grid;
    gap: 0.6rem;
}

.trset-login-row {
    display: grid;
    gap: 0.35rem;
}

.trset-login-input {
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 0.6rem 0.7rem;
    background: var(--bg-soft);
    color: var(--text-main);
    font: inherit;
}

.trset-login-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    justify-content: space-between;
    flex-wrap: wrap;
}

.trset-login-submit {
    min-width: 8.5rem;
}

.trset-login-panel-link {
    font-size: 0.85rem;
    color: var(--text-soft);
    text-decoration: underline;
}

.trset-login-status {
    min-height: 1.2em;
}

.trset-login-status.is-error {
    color: color-mix(in srgb, #ff4d4d 70%, var(--text-soft));
}

.trset-login-form.is-blocked .trset-login-row,
.trset-login-form.is-blocked .trset-login-submit {
    display: none;
}

/* N00000186 */
@keyframes trset-header-points-tick {
    0% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.12);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes trset-header-points-glow {
    0%,
    100% {
        box-shadow:
            0 0 0 1px color-mix(in srgb, var(--accent-cyan) 10%, transparent),
            0 2px 8px color-mix(in srgb, var(--text-main) 3%, transparent);
    }
    50% {
        box-shadow:
            0 0 0 1px color-mix(in srgb, var(--accent-cyan) 22%, transparent),
            0 0 14px color-mix(in srgb, var(--accent-cyan) 28%, transparent);
    }
}

@keyframes trset-points-aura-pulse {
    0%,
    100% {
        opacity: 0;
        transform: scale(0.96);
    }
    50% {
        opacity: 0.45;
        transform: scale(1.02);
    }
}

@keyframes trset-points-value-glitch {
    0%,
    100% {
        transform: scale(1) skewX(0);
        color: inherit;
        filter: none;
    }
    30% {
        transform: scale(1.09) skewX(-2deg);
        color: color-mix(in srgb, var(--accent-purple) 65%, var(--text-main));
        filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent-cyan) 45%, transparent));
    }
    55% {
        transform: scale(0.94) skewX(1deg);
    }
}

.trset-header-points-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    padding: 0.22rem 0.48rem;
    border-radius: 999px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-weight: 600;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    color: var(--text-main);
    border: 1px solid color-mix(in srgb, var(--accent-cyan) 32%, var(--border-soft));
    background: linear-gradient(
        145deg,
        color-mix(in srgb, var(--accent-cyan) 14%, var(--bg-layer)),
        color-mix(in srgb, var(--accent-purple) 6%, var(--bg-layer))
    );
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--accent-cyan) 10%, transparent),
        0 2px 10px color-mix(in srgb, var(--text-main) 4%, transparent);
    animation: none;
}

.trset-header-points-badge--cyber {
    animation: trset-header-points-glow 2.8s ease-in-out infinite;
}

body[data-trset-active-pace="1"] .trset-header-points-badge--cyber {
    animation-duration: 1.85s;
}

.trset-header-points-aura {
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    display: none;
    border: 1px solid color-mix(in srgb, var(--accent-cyan) 55%, transparent);
    opacity: 0;
}

.trset-header-points-badge--cyber .trset-header-points-aura {
    display: block;
    animation: trset-points-aura-pulse 3.1s ease-in-out infinite;
}

.trset-header-points-inner {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
}

.trset-header-points-bolt {
    display: none;
    flex-shrink: 0;
    line-height: 0;
    color: color-mix(in srgb, var(--accent-cyan) 75%, var(--text-soft));
}

.trset-header-points-badge--cyber .trset-header-points-bolt {
    display: block;
}

.trset-header-points-badge--tick .trset-header-points-inner {
    animation: trset-header-points-tick 0.65s ease-out;
}

.trset-header-points-badge--glitch #trset-header-points-value {
    animation: trset-points-value-glitch 0.52s ease;
}

body.trset-motion-calm .trset-header-points-badge--cyber,
body.trset-motion-calm .trset-header-points-badge--tick .trset-header-points-inner,
body.trset-motion-calm .trset-header-points-badge--glitch #trset-header-points-value {
    animation: none !important;
}

body.trset-motion-calm .trset-header-points-aura {
    display: none !important;
}

body.trset-motion-calm .trset-header-points-bolt {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    body:not(.trset-motion-full) .trset-header-points-badge--cyber,
    body:not(.trset-motion-full) .trset-header-points-badge--tick .trset-header-points-inner,
    body:not(.trset-motion-full) .trset-header-points-badge--glitch #trset-header-points-value {
        animation: none !important;
    }

    body:not(.trset-motion-full) .trset-header-points-aura {
        display: none !important;
    }

    body:not(.trset-motion-full) .trset-header-points-bolt {
        display: none !important;
    }
}

.trset-lang-switch {
    display: inline-flex;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    overflow: hidden;
    background: var(--bg-soft);
}

.trset-lang-btn {
    padding: 0.32rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-soft);
    border-right: 1px solid var(--border-soft);
    transition: background 0.2s ease, color 0.2s ease;
}

.trset-lang-btn:last-child {
    border-right: 0;
}

.trset-lang-btn:hover {
    color: var(--text-main);
    background: color-mix(in srgb, var(--accent-cyan) 12%, var(--bg-soft));
}

.trset-lang-btn.is-active {
    color: var(--text-main);
    font-weight: 700;
    background: color-mix(in srgb, var(--accent-cyan) 30%, var(--bg-soft));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-cyan) 42%, transparent);
}

/* N00000173 */
@keyframes trset-toggle-icon-pulse {
    0%,
    100% {
        opacity: 0.78;
        filter: drop-shadow(0 0 0 transparent);
        transform: scale(1);
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent-cyan) 45%, transparent));
        transform: scale(1.07);
    }
}

/* N00000169 */
.trset-calm-toggle {
    border: 1px solid var(--border-soft);
    background: var(--bg-soft);
    border-radius: 999px;
    color: var(--text-main);
    padding: 0.26rem 0.34rem;
    cursor: pointer;
    font: inherit;
    display: inline-grid;
    place-items: center;
    min-width: 2rem;
    min-height: 2rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.trset-calm-toggle:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-1px);
}

.trset-calm-toggle svg.trset-toggle-layer {
    display: block;
    grid-area: 1 / 1;
}

.trset-calm-toggle .trset-toggle-layer.is-trset-hidden {
    display: none !important;
}

.trset-calm-toggle svg.trset-toggle-layer:not(.is-trset-hidden) {
    animation: trset-toggle-icon-pulse 2.75s ease-in-out infinite;
}

.trset-calm-toggle:hover svg.trset-toggle-layer:not(.is-trset-hidden),
.trset-calm-toggle:focus-visible svg.trset-toggle-layer:not(.is-trset-hidden) {
    animation-play-state: paused;
    opacity: 1;
    filter: none;
    transform: none;
}

/* N00000170 */
html.trset-html-reduced {
    scroll-behavior: auto !important;
}

body.trset-motion-calm *,
body.trset-motion-calm *::before,
body.trset-motion-calm *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
}

@media (prefers-reduced-motion: reduce) {
    body:not(.trset-motion-full) *,
    body:not(.trset-motion-full) *::before,
    body:not(.trset-motion-full) *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }
}

/* N00000171 */
.trset-theme-toggle {
    border: 1px solid var(--border-soft);
    background: var(--bg-soft);
    border-radius: 999px;
    color: var(--text-main);
    padding: 0.26rem 0.34rem;
    cursor: pointer;
    font: inherit;
    display: inline-grid;
    place-items: center;
    min-width: 2rem;
    min-height: 2rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.trset-theme-toggle:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-1px);
}

.trset-theme-toggle[data-trset-theme="dark"] {
    border-color: color-mix(in srgb, var(--accent-purple) 52%, var(--border-soft));
    background: color-mix(in srgb, var(--accent-purple) 16%, var(--bg-soft));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-purple) 26%, transparent);
}

.trset-theme-toggle[data-trset-theme="light"] {
    border-color: color-mix(in srgb, var(--accent-cyan) 48%, var(--border-soft));
    background: color-mix(in srgb, var(--accent-cyan) 14%, var(--bg-soft));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-cyan) 22%, transparent);
}

.trset-theme-toggle svg.trset-toggle-layer {
    display: block;
    grid-area: 1 / 1;
}

.trset-theme-toggle .trset-toggle-layer.is-trset-hidden {
    display: none !important;
}

.trset-theme-toggle svg.trset-toggle-layer:not(.is-trset-hidden) {
    animation: trset-toggle-icon-pulse 2.75s ease-in-out infinite;
}

.trset-theme-toggle:hover svg.trset-toggle-layer:not(.is-trset-hidden),
.trset-theme-toggle:focus-visible svg.trset-toggle-layer:not(.is-trset-hidden) {
    animation-play-state: paused;
    opacity: 1;
    filter: none;
    transform: none;
}
