/* Neelix Hightech-Layer — Styles */

:root {
    --nc-ht-mood-hue: 200;
    --nc-ht-mood-sat: 60%;
    --nc-ht-mood-light: 96%;
    --nc-ht-mood-intensity: 0.06;
    --nc-ht-bg: hsl(var(--nc-ht-mood-hue) var(--nc-ht-mood-sat) var(--nc-ht-mood-light));
    --nc-ht-accent: hsl(var(--nc-ht-mood-hue) 65% 45%);
}

body[data-nc-mood] {
    background-image: radial-gradient(
        circle at 50% -20%,
        hsla(var(--nc-ht-mood-hue), var(--nc-ht-mood-sat), 75%, var(--nc-ht-mood-intensity)),
        transparent 60%
    );
    transition: background-image 600ms ease;
}

/* ---------- Landing-Wrapper ---------- */
.nc-ht-landing-pulse {
    margin: 0 0 24px 0;
    padding: 18px 20px 6px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 0% 0%, rgba(43, 208, 122, 0.08), transparent 60%),
        radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.07), transparent 60%),
        rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(20, 30, 60, 0.05);
}
.nc-ht-landing-pulse__title {
    margin: 0 0 6px 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: #4a5878;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.nc-ht-landing-pulse__title::before {
    content: '';
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #2bd07a;
    box-shadow: 0 0 0 0 rgba(43, 208, 122, 0.7);
    animation: nc-ht-pulse-dot 1.6s ease-out infinite;
}

/* ---------- 1. Pulse ---------- */
.nc-ht-pulse {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 16px 0;
}
.nc-ht-pulse__card {
    position: relative;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(20, 30, 60, 0.06), 0 0 0 1px rgba(20, 30, 60, 0.04);
    overflow: hidden;
}
.nc-ht-pulse__card.is-live::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(80, 200, 120, 0.10) 50%, transparent 100%);
    animation: nc-ht-shimmer 3.5s linear infinite;
}
@keyframes nc-ht-shimmer {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}
.nc-ht-pulse__num {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
    color: #11203d;
    font-variant-numeric: tabular-nums;
}
.nc-ht-pulse__label {
    margin-top: 4px;
    font-size: 12px;
    color: #5a6a85;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.nc-ht-pulse__dot {
    position: absolute;
    top: 12px; right: 12px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #2bd07a;
    box-shadow: 0 0 0 0 rgba(43, 208, 122, 0.7);
    animation: nc-ht-pulse-dot 1.6s ease-out infinite;
}
@keyframes nc-ht-pulse-dot {
    0%   { box-shadow: 0 0 0 0   rgba(43, 208, 122, 0.7); }
    70%  { box-shadow: 0 0 0 10px rgba(43, 208, 122, 0);   }
    100% { box-shadow: 0 0 0 0   rgba(43, 208, 122, 0);   }
}

/* ---------- 2. Privacy Badge + Sentiment ---------- */
.nc-ht-sentiment {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 12px;
    color: #4a5878;
}
.nc-ht-privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #e6f5ff, #f3e8ff);
    color: #25356b;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(37, 53, 107, 0.10);
}
.nc-ht-sentiment__ind {
    font-variant-numeric: tabular-nums;
}

/* ---------- 4. Voice Button ---------- */
[data-nc-hightech="voice"] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
[data-nc-hightech="voice"].is-listening {
    background: #ff3b6b !important;
    color: #fff !important;
    animation: nc-ht-voice-pulse 1.2s ease-in-out infinite;
}
@keyframes nc-ht-voice-pulse {
    0%, 100% { box-shadow: 0 0 0 0   rgba(255, 59, 107, 0.55); }
    50%      { box-shadow: 0 0 0 14px rgba(255, 59, 107, 0);   }
}

/* ---------- 7. Recovery-Wrapped ---------- */
.nc-ht-wrapped {
    display: block;
    margin: 18px 0;
}
.nc-ht-wrapped-snapshot {
    padding: 18px 18px 14px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 0% 0%, hsla(var(--nc-ht-mood-hue), 70%, 88%, 0.5), transparent 55%),
        radial-gradient(circle at 100% 100%, hsla(calc(var(--nc-ht-mood-hue) + 30), 70%, 90%, 0.5), transparent 55%),
        #ffffff;
    box-shadow: 0 8px 30px rgba(20, 30, 60, 0.10);
}
.nc-ht-wrapped__brand {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    color: #1a2447;
}
.nc-ht-wrapped__brand strong {
    font-size: 16px;
    letter-spacing: 0.02em;
}
.nc-ht-wrapped__brand span {
    font-size: 12px;
    color: #5a6a85;
    text-transform: uppercase;
    letter-spacing: 0.10em;
}
.nc-ht-wrapped__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.nc-ht-wrapped__foot {
    margin-top: 12px;
    text-align: center;
    font-size: 11px;
    color: #8190ad;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.nc-ht-wrapped__actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.nc-ht-wrapped__share {
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(20, 30, 60, 0.12);
    background: #fff;
    color: #1a2447;
    font-weight: 600;
    cursor: pointer;
}
.nc-ht-wrapped__share:hover { background: #f4f6fb; }
.nc-ht-wrapped__share[disabled] { opacity: 0.6; cursor: progress; }
.nc-ht-wrapped__card {
    padding: 18px 20px;
    border-radius: 18px;
    background: linear-gradient(140deg,
        hsla(var(--nc-ht-mood-hue), 70%, 96%, 1) 0%,
        hsla(calc(var(--nc-ht-mood-hue) + 30), 70%, 92%, 1) 100%);
    box-shadow: 0 6px 24px rgba(20, 30, 60, 0.08);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 500ms ease, transform 500ms ease;
}
.nc-ht-wrapped__card.is-in {
    opacity: 1;
    transform: translateY(0);
}
.nc-ht-wrapped__card h3 {
    margin: 0 0 6px 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4a5878;
}
.nc-ht-wrapped__card p {
    margin: 0;
    font-size: 18px;
    color: #11203d;
    line-height: 1.4;
}
.nc-ht-wrapped__card.is-premium {
    background: linear-gradient(140deg, #fff7e0 0%, #ffe1f0 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.nc-ht-wrapped__card.is-cta {
    background: linear-gradient(140deg, #1a2447, #2c3e75);
    color: #fff;
}
.nc-ht-wrapped__card.is-cta h3,
.nc-ht-wrapped__card.is-cta p { color: #fff; }
.nc-ht-wrapped__play {
    grid-column: 1 / -1;
    justify-self: start;
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    background: var(--nc-ht-accent, #1a2447);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}
.nc-ht-wrapped__play:hover { filter: brightness(1.05); }

.nc-ht-empty {
    padding: 16px;
    border-radius: 12px;
    background: rgba(20, 30, 60, 0.04);
    color: #4a5878;
    font-size: 14px;
}

/* ---------- Streaming / Typing Indicator ---------- */
.nc-ht-typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    min-height: 22px;
}
.nc-ht-typing .nc-ht-typing-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.4;
    animation: nc-ht-typing-bounce 1.1s infinite ease-in-out;
}
.nc-ht-typing .nc-ht-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.nc-ht-typing .nc-ht-typing-dot:nth-child(3) { animation-delay: 0.30s; }
@keyframes nc-ht-typing-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.35; }
    40%           { transform: scale(1.0); opacity: 0.95; }
}

/* ---------- 8. rPPG Atem-Coach ---------- */
.nc-ht-breath {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 14px;
    border-radius: 16px;
    background: linear-gradient(160deg, #f0f9ff, #fdf2f8);
    min-height: 200px;
}
.nc-ht-breath__circle {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #91d2ff, #5e8fd8 80%);
    box-shadow: 0 8px 24px rgba(94, 143, 216, 0.35);
    margin-bottom: 12px;
    --breath-in: 4s;
    --breath-hold: 2s;
    --breath-out: 6s;
}
.nc-ht-breath__circle.is-running {
    animation:
        nc-ht-breath-cycle calc(var(--breath-in) + var(--breath-hold) + var(--breath-out)) ease-in-out infinite;
}
@keyframes nc-ht-breath-cycle {
    0%   { transform: scale(0.7); }
    33%  { transform: scale(1.15); }
    50%  { transform: scale(1.15); }
    100% { transform: scale(0.7); }
}
.nc-ht-breath__bpm {
    font-size: 22px;
    font-weight: 700;
    color: #11203d;
    font-variant-numeric: tabular-nums;
}
.nc-ht-breath__info {
    margin-top: 6px;
    font-size: 12px;
    color: #4a5878;
    text-align: center;
    max-width: 320px;
}
.nc-ht-breath__stop {
    margin-top: 10px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(20, 30, 60, 0.15);
    background: #fff;
    cursor: pointer;
    font-size: 12px;
}

/* ---------- 8b. Vital-Mini-Card (Profil → Stimmung-Tab) ---------- */
.nc-ht-vital-mini {
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    border: 1px solid transparent;
}
.nc-ht-vital-mini:hover,
.nc-ht-vital-mini:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(79, 172, 254, 0.18);
    border-color: rgba(79, 172, 254, 0.45);
    outline: none;
}
.nc-ht-vital-mini:focus-visible {
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.35);
}

/* ---------- 9. 3D Recovery-Pflanze ---------- */
.nc-ht-plant-card [data-nc-hightech="plant"] {
    position: relative;
    background: radial-gradient(circle at 50% 30%, #fffae6, #f4f7fb);
    border-radius: 14px;
    overflow: hidden;
}
.nc-ht-plant__caption {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    text-align: center;
    font-size: 12px;
    color: #4a5878;
}

/* ---------- 10. Translate ---------- */
.nc-ht-translate-btn {
    margin-top: 6px;
    font-size: 11px !important;
    padding: 3px 10px !important;
    opacity: 0.75;
}
.nc-ht-translate-btn:hover { opacity: 1; }

/* ---------- 11. Frag Deine Recovery ---------- */
.nc-ht-ask__row {
    display: flex;
    gap: 6px;
    align-items: flex-start;
}
.nc-ht-ask__row textarea {
    flex: 1;
    resize: vertical;
}
.nc-ht-ask__out {
    margin-top: 12px;
}
.nc-ht-ask__bubble {
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(140deg, #f0f9ff, #fdf2f8);
    color: #11203d;
    line-height: 1.5;
    white-space: pre-wrap;
}
.nc-ht-ask__meta {
    margin-top: 6px;
    font-size: 11px;
    color: #888;
    text-align: right;
}

/* ---------- 12. AR-Atem-Notbremse ---------- */
.nc-ht-ar-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    --ar-tint: hsla(200, 60%, 55%, 0.30);
}
.nc-ht-ar-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--ar-tint);
    mix-blend-mode: screen;
    pointer-events: none;
    transition: background 600ms ease;
}
.nc-ht-ar-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.65) saturate(1.1);
}
.nc-ht-ar-ringwrap {
    position: relative;
    z-index: 2;
    width: min(70vmin, 480px);
    height: min(70vmin, 480px);
    pointer-events: none;
}
.nc-ht-ar-ring {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.55));
}
.nc-ht-ar-ring-inner {
    transition: r 200ms ease;
}
.nc-ht-ar-label {
    position: absolute;
    bottom: 22%;
    left: 0; right: 0;
    z-index: 3;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 12px rgba(0,0,0,0.55);
}
.nc-ht-ar-timer {
    position: absolute;
    top: 24px; right: 24px;
    z-index: 3;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    background: rgba(0,0,0,0.45);
    padding: 6px 12px;
    border-radius: 999px;
}
.nc-ht-ar-stop {
    position: absolute;
    top: 24px; left: 24px;
    z-index: 3;
    background: rgba(255,255,255,0.92);
    color: #11203d;
    border: none;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
}

/* ---------- 13. Streak-Widget (web Live-Activity) ---------- */
.nc-ht-streak {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 9000;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px 8px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #d8f5e8, #d6e9ff);
    color: #11203d;
    box-shadow: 0 6px 20px rgba(20, 30, 60, 0.15);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: transform 180ms ease;
}
.nc-ht-streak:hover { transform: translateY(-1px); }
.nc-ht-streak.is-zero { opacity: 0.55; }
.nc-ht-streak.is-bloom {
    background: linear-gradient(135deg, #ffe9c8, #ffd1ec);
}
.nc-ht-streak__icon { font-size: 18px; }
.nc-ht-streak__num {
    font-size: 18px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #0d6e3f;
}
.nc-ht-streak__label {
    font-size: 11px;
    color: #4a5878;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
@media (max-width: 480px) {
    .nc-ht-streak { bottom: 70px; }
}

/* ---------- 14. Recovery-Vitality-Score ---------- */
.nc-ht-vital {
    padding: 10px 4px;
}
.nc-ht-vital-head {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.nc-ht-vital-gaugewrap {
    position: relative;
    width: 120px;
    height: 120px;
    flex: 0 0 120px;
}
.nc-ht-vital-gauge {
    width: 100%;
    height: 100%;
    transition: transform 600ms ease;
}
.nc-ht-vital-score {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.nc-ht-vital-meta {
    flex: 1 1 220px;
    min-width: 0;
}
.nc-ht-vital-label {
    font-size: 11px;
    color: #5a6a85;
    text-transform: uppercase;
    letter-spacing: 0.10em;
}
.nc-ht-vital-tier {
    font-size: 18px;
    font-weight: 700;
    color: #11203d;
    margin-top: 2px;
}
.nc-ht-vital-sparkwrap {
    margin-top: 8px;
}
.nc-ht-vital-spark {
    width: 100%;
    height: 44px;
}
@media (prefers-reduced-motion: reduce) {
    .nc-ht-vital-spark path[stroke-dasharray] { stroke-dasharray: none; opacity: .55; }
}
.nc-ht-vital-breakdown {
    margin-top: 14px;
    display: grid;
    gap: 8px;
}
.nc-ht-vital-row__top {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #4a5878;
}
.nc-ht-vital-bar {
    margin-top: 3px;
    height: 6px;
    border-radius: 3px;
    background: #eef2f7;
    overflow: hidden;
}
.nc-ht-vital-bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #10b981, #22c55e);
    border-radius: 3px;
    transition: width 600ms ease;
}

/* Reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .nc-ht-pulse__card.is-live::before,
    .nc-ht-pulse__dot,
    [data-nc-hightech="voice"].is-listening,
    .nc-ht-wrapped__card,
    .nc-ht-typing .nc-ht-typing-dot,
    .nc-ht-breath__circle.is-running { animation: none !important; transition: none !important; }

    /* Vital, Plant, Mood-Dot: Übergänge entfernen, aber statisch sichtbar lassen */
    .nc-ht-vital-card *,
    .nc-ht-plant-card *,
    .nc-ht-vital-mini,
    .nc-ht-vital-spark *,
    [data-nc-hightech="plant"] *,
    [data-nc-hightech="vital"] *,
    .nc-mood-2d-axes,
    #nc-mood-2d-dot {
        animation: none !important;
        transition: none !important;
    }
    /* Forecast-Stricheln visuell entschärfen */
    .nc-ht-vital-spark path[stroke-dasharray] { stroke-dasharray: none; opacity: .55; }
}
