
.htz-ttw {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Trebuchet MS", Roboto, sans-serif;
}

.htz-ttw {
    --tv-bg-card: #131722;
    --tv-bg-card-hover: #1c2030;
    --tv-bg-control: #2a2e39;
    --tv-bg-control-hover: #363c4e;
    --tv-border: #2a2e39;
    --tv-border-hover: #363c4e;
    --tv-text-main: #ffffff;
    --tv-text-title: #f0f3fa;
    --tv-text-muted: rgba(255, 255, 255, 0.70);
    --tv-text-soft: rgba(255, 255, 255, 0.80);
    --tv-loading-text: #787b86;
    --tv-positive: #AAFF00;
    --tv-negative: #ef5350;
    --tv-accent: #E50000;
    --tv-wkn: rgba(255, 255, 255, 0.80);
    --tv-wkn-hover: #AAFF00;
    --tv-tooltip-bg: #AAFF00;
    --tv-tooltip-text: #131722;
    color-scheme: dark;
}

.htz-ttw.tv-theme-light {
    --tv-bg-card: #ffffff;
    --tv-bg-card-hover: #f3f5f8;
    --tv-bg-control: #e9edf2;
    --tv-bg-control-hover: #dce2e9;
    --tv-border: #b8c0cc;
    --tv-border-hover: #8f9aaa;
    --tv-text-main: #111827;
    --tv-text-title: #0f172a;
    --tv-text-muted: #5f6875;
    --tv-text-soft: #3f4752;
    --tv-loading-text: #4b5563;
    --tv-positive: #14833b;
    --tv-negative: #c62828;
    --tv-wkn: #3D5C3A;
    --tv-wkn-hover: #29452A;
    --tv-tooltip-bg: #29452A;
    --tv-tooltip-text: #ffffff;
    color-scheme: light;
}

.htz-ttw.tv-theme-light .tv-trader-card {
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.06);
}

.htz-ttw.tv-theme-light .tv-filter-pill {
    color: #3f4752;
    border-color: #d8dee6;
}

.htz-ttw.tv-theme-light .tv-wkn-copy {
    font-weight: 600;
    text-decoration: underline !important;
    text-decoration-color: rgba(61, 92, 58, 0.48) !important;
    text-underline-offset: 3px;
}

.htz-ttw.tv-theme-light .tv-wkn-copy:hover {
    text-decoration-color: var(--tv-wkn-hover) !important;
}

.htz-ttw .tv-theme-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 18px;
}

.htz-ttw .tv-theme-label {
    color: var(--tv-text-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.htz-ttw .tv-theme-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--tv-border);
    border-radius: 999px;
    background: var(--tv-bg-control);
}

.htz-ttw .tv-theme-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 999px;
    padding: 8px 13px;
    background: transparent;
    color: var(--tv-text-soft);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.htz-ttw .tv-theme-button:hover {
    color: var(--tv-text-main);
}

.htz-ttw .tv-theme-button.active {
    background: var(--tv-accent);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(229, 0, 0, 0.22);
}

.htz-ttw .tv-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    justify-content: center;
}

.htz-ttw .tv-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    background: var(--tv-bg-card);
    color: var(--tv-text-soft);
    border: 1px solid var(--tv-border);
    padding: 5px 15px 5px 6px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    font-family: inherit;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.htz-ttw .tv-filter-pill:hover {
    background: var(--tv-bg-card-hover);
    border-color: var(--tv-border-hover);
    color: var(--tv-text-main);
    transform: translateY(-1px);
}

.htz-ttw .tv-filter-pill.active {
    background: #E50000 !important;
    color: #ffffff !important;
    border-color: #E50000 !important;
    box-shadow: 0 6px 16px rgba(229, 0, 0, 0.22);
}

.htz-ttw .tv-filter-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 36px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: var(--tv-bg-control);
}

.htz-ttw .tv-filter-pill:not(.active) .tv-filter-avatar {
    border-color: var(--tv-border);
}

.htz-ttw .tv-filter-all-avatar {
    width: 38px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    position: relative;
    flex: 0 0 38px;
}

.htz-ttw .tv-filter-all-avatar img {
    position: absolute;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--tv-bg-card);
    background: var(--tv-bg-control);
}

.htz-ttw .tv-filter-all-avatar img:nth-child(1) { left: 0; z-index: 3; }
.htz-ttw .tv-filter-all-avatar img:nth-child(2) { left: 10px; z-index: 2; }
.htz-ttw .tv-filter-all-avatar img:nth-child(3) { left: 20px; z-index: 1; }

.htz-ttw .tv-filter-pill.active .tv-filter-all-avatar img {
    border-color: #E50000;
}

.htz-ttw .tv-filter-fallback {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    background: var(--tv-bg-control);
    color: var(--tv-text-main);
    font-size: 13px;
    font-weight: 800;
    border: 1px solid var(--tv-border);
}

.htz-ttw .tv-filter-pill.active .tv-filter-fallback {
    background: rgba(255,255,255,0.18);
    color: #fff;
    border-color: rgba(255,255,255,0.35);
}

.htz-ttw .tv-cards-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.htz-ttw .tv-trader-card {
    display: grid;
    grid-template-columns: 2.5fr 3fr 2fr;
    align-items: center;
    background: var(--tv-bg-card);
    border: 1px solid var(--tv-border);
    border-radius: 12px;
    padding: 16px 30px;
    color: var(--tv-text-main);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.htz-ttw .tv-trader-card:hover {
    transform: translateY(-2px);
    border-color: var(--tv-border-hover);
    background: var(--tv-bg-card-hover);
}

.htz-ttw .tv-card-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
}

.htz-ttw .tv-widget-trader-name {
    color: var(--tv-text-title);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.htz-ttw .tv-trader-avatar {
    width: 68px;
    height: 68px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--tv-border);
    background-color: var(--tv-bg-card-hover);
    flex-shrink: 0;
}

.htz-ttw .tv-card-center {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-left: 1px solid var(--tv-border);
    padding-left: 30px;
}

.htz-ttw .tv-widget-basiswert {
    color: var(--tv-text-main);
    font-size: 16px;
    font-weight: 600;
}

.htz-ttw .tv-wkn-copy {
    color: var(--tv-wkn) !important;
    font-size: 13px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center;
    width: fit-content;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    transition: color 0.2s ease !important;
}

.htz-ttw .tv-wkn-copy:hover {
    color: var(--tv-wkn-hover) !important;
    text-decoration: underline !important;
}

.htz-ttw .tv-wkn-copy::after {
    content: "WKN kopieren";
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    background: var(--tv-tooltip-bg);
    color: var(--tv-tooltip-text);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 6px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 5;
}

.htz-ttw .tv-wkn-copy:hover::after,
.htz-ttw .tv-wkn-copy.is-copied::after {
    opacity: 1;
    transform: translateY(0);
}

.htz-ttw .tv-wkn-copy.is-copied::after {
    content: "WKN kopiert";
}

.htz-ttw .tv-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    border-left: 1px solid var(--tv-border);
    padding-left: 30px;
}

.htz-ttw .tv-widget-perf {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
}

.htz-ttw .tv-widget-laufzeit {
    color: var(--tv-text-muted);
    font-size: 12px;
    margin-top: 6px;
}

.htz-ttw .tv-widget-positive {
    color: var(--tv-positive);
}

.htz-ttw .tv-widget-negative {
    color: var(--tv-negative);
}

.htz-ttw .tv-widget-loading {
    text-align: center;
    padding: 40px;
    color: var(--tv-loading-text);
    background: var(--tv-bg-card);
    border: 1px solid var(--tv-border);
    border-radius: 12px;
    font-size: 16px;
}

@media (max-width: 767px) {
    .htz-ttw.tv-theme-light .tv-trader-card {
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.06);
}

.htz-ttw.tv-theme-light .tv-filter-pill {
    color: #3f4752;
    border-color: #d8dee6;
}

.htz-ttw.tv-theme-light .tv-wkn-copy {
    font-weight: 600;
    text-decoration: underline !important;
    text-decoration-color: rgba(61, 92, 58, 0.48) !important;
    text-underline-offset: 3px;
}

.htz-ttw.tv-theme-light .tv-wkn-copy:hover {
    text-decoration-color: var(--tv-wkn-hover) !important;
}

.htz-ttw .tv-theme-toolbar {
        justify-content: space-between;
        gap: 8px;
    }

    .htz-ttw .tv-theme-button {
        padding: 8px 11px;
    }

    .htz-ttw .tv-filter-container {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 2px 2px 10px;
        margin-left: -2px;
        margin-right: -2px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .htz-ttw .tv-filter-container::-webkit-scrollbar {
        display: none;
    }

    .htz-ttw .tv-filter-pill {
        flex: 0 0 auto;
        min-height: 46px;
        padding-right: 14px;
    }

    .htz-ttw .tv-trader-card {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 18px;
    }

    .htz-ttw .tv-card-center,
    .htz-ttw .tv-card-right {
        border-left: none;
        padding-left: 0;
    }

    .htz-ttw .tv-card-right {
        align-items: flex-start;
    }

    .htz-ttw .tv-widget-trader-name {
        font-size: 18px;
    }

    .htz-ttw .tv-widget-perf {
        font-size: 24px;
    }
}
