/* Container */
.szbt-comp-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    font-family: inherit;
    color: #1f2937;
    margin-top: 2rem;
}

/* --- HEADER & SUCHE (Z-INDEX FIX) --- */
.szbt-comp-header {
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative; /* Wichtig für Ebenen */
    z-index: 10;        /* Header über Content */
}

/* Der Wrapper ist jetzt der visuelle Rahmen (Pille) */
.szbt-comp-search-wrap {
    position: relative;
    
    /* FIX: Hoher Z-Index, damit Dropdown über dem Referenzball liegt */
    z-index: 500; 
    
    margin: 1.5rem auto; 
    max-width: 720px;
    
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 99px;
    padding: 8px 24px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    transition: all 0.2s;
}

.szbt-comp-search-wrap:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
    transform: translateY(-1px);
}

.search-icon {
    font-size: 1.4rem;
    opacity: 0.5;
    margin-right: 16px;
    display: flex;
    align-items: center;
}

/* Das Input Feld */
.szbt-comp-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    padding: 10px 0;
    outline: none;
    line-height: 1.5;
    color: #111;
}

/* Dropdown */
.szbt-search-dropdown {
    position: absolute;
    top: 100%; left: 0; right: 0;
    margin-top: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 15px 40px -5px rgba(0,0,0,0.15);
    
    /* FIX: Muss noch höher sein als der Wrapper */
    z-index: 1000; 
    
    max-height: 380px;
    overflow-y: auto;
    text-align: left;
}
.szbt-search-item {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 20px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.1s;
}
.szbt-search-item:hover { background: #f9fafb; }
.si-img {
    width: 48px; height: 48px; flex-shrink: 0;
    background: #f3f4f6; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.si-img img { width: 100%; height: 100%; object-fit: contain; }
.si-info { flex: 1; min-width: 0; }
.si-title { font-weight: 600; color: #111827; font-size: 1rem; }
.si-meta { font-size: 0.85rem; color: #6b7280; text-transform: uppercase; }
.si-act { font-size: 0.8rem; color: #2563eb; background: #eff6ff; padding: 5px 10px; border-radius: 6px; font-weight: 600; }
.szbt-search-msg { padding: 20px; text-align: center; color: #6b7280; font-size: 0.95rem; }

/* --- REFERENZ BEREICH (Horizontal) --- */
.szbt-anchor-area {
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1; /* Niedriger als Suche */
}
.szbt-card-anchor.horizontal {
    display: grid;
    grid-template-columns: 130px 1fr 240px; 
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: 4px solid #2563eb; 
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    gap: 24px;
}
@media (max-width: 850px) {
    .szbt-card-anchor.horizontal {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }
    .szbt-anchor-visual { margin: 0 auto; }
    .szbt-anchor-details { align-items: center; display: flex; flex-direction: column; }
    .szbt-anchor-right { width: 100%; border-top: 1px solid #f3f4f6; padding-top: 16px; }
}

.szbt-card-img.large {
    width: 130px; height: 130px;
    display: flex; align-items: center; justify-content: center;
}
.szbt-card-img.large img { width: 100%; height: 100%; object-fit: contain; }

.szbt-anchor-details { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.szbt-badge-ref {
    display: inline-block; width: fit-content;
    font-size: 0.75rem; background: #eff6ff; color: #2563eb;
    padding: 4px 10px; border-radius: 6px; font-weight: 700;
    margin-bottom: 10px; letter-spacing: 0.05em;
}
.szbt-card-title.large { font-size: 1.75rem; font-weight: 800; line-height: 1.2; margin-bottom: 6px; color: #111827; }
.szbt-card-sub { font-size: 1.05rem; color: #6b7280; font-weight: 500; margin-bottom: 14px; }

/* Info Grid */
.szbt-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    width: 100%;
}
.szbt-info-pill {
    display: flex; flex-direction: column;
    background: #f9fafb; border: 1px solid #e5e7eb;
    border-radius: 8px; padding: 6px 10px;
}
.szbt-info-pill .lbl { font-size: 0.7rem; text-transform: uppercase; color: #9ca3af; font-weight: 700; margin-bottom: 2px; }
.szbt-info-pill .val { font-size: 0.85rem; color: #374151; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Stats */
.szbt-anchor-right { display: flex; flex-direction: column; gap: 16px; justify-content: center; }

/* --- CHALLENGER GRID --- */
.szbt-challengers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
    position: relative;
    z-index: 1;
}
@media (max-width: 1000px) { .szbt-challengers-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .szbt-challengers-grid { grid-template-columns: 1fr; } }

/* Card Styling */
.szbt-comp-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    display: flex; flex-direction: column; gap: 14px;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s;
}

.szbt-card-challenger {
    border-top: 4px solid #f59e0b;
    cursor: pointer;
}
.szbt-card-challenger:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -5px rgba(0,0,0,0.12);
    border-color: #d1d5db;
    background: #ffffff;
}

.szbt-card-head { display: flex; gap: 12px; border-bottom: 1px solid #f3f4f6; padding-bottom: 14px; }
.szbt-card-img { width: 64px; height: 64px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.szbt-card-img img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.3s; }
.szbt-card-challenger:hover .szbt-card-img img { transform: scale(1.05); }

.szbt-card-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.szbt-card-title { font-weight: 700; font-size: 1.05rem; line-height: 1.25; color: #111827; margin-bottom: 3px; }
.szbt-card-sub { font-size: 0.85rem; color: #6b7280; margin-bottom: 6px; }

.szbt-info-compact { display: flex; flex-wrap: wrap; gap: 5px; }
.szbt-pill-sm {
    font-size: 0.7rem; background: #f3f4f6; border: 1px solid #e5e7eb;
    padding: 2px 7px; border-radius: 6px; color: #4b5563; font-weight: 500;
}

.szbt-btn-remove {
    background: transparent; border: 1px solid #f3f4f6; border-radius: 50%; width: 32px; height: 32px;
    color: #9ca3af; cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; line-height: 1; padding-bottom: 2px; margin-left: auto;
    transition: all 0.2s;
    z-index: 2; position: relative;
}
.szbt-btn-remove:hover { color: #ef4444; border-color: #fecaca; background: #fef2f2; transform: scale(1.1); }

/* Match Content */
.szbt-comp-match { text-align: center; padding: 8px 0; }
.match-score { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.match-label { font-size: 0.75rem; font-weight: 700; opacity: 0.6; letter-spacing: 0.05em; margin-top: 4px; }
.szbt-comp-text {
    font-size: 0.9rem; color: #374151; background: #f9fafb; padding: 12px; border-radius: 10px; line-height: 1.5;
}

/* Stats */
.szbt-stat-row { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; }
.szbt-stat-row .label { width: 50px; color: #6b7280; font-weight: 600; }
.szbt-stat-row .val { width: 35px; text-align: right; font-weight: 700; color: #111827; }
.bar-bg { flex: 1; height: 8px; background: #f3f4f6; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: #2563eb; border-radius: 4px; }
.bar-fill.shape { background: #8b5cf6; }
.szbt-comp-stats.mini { display: flex; gap: 8px; margin-top: auto; opacity: 0.8; }
.szbt-comp-stats.mini .bar-bg { height: 6px; }

/* Placeholders */
.szbt-card-placeholder {
    border: 2px dashed #e5e7eb; background: #fafafa;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; color: #9ca3af; min-height: 160px;
    border-radius: 16px;
}
.anchor-placeholder { min-height: 180px; border-color: #bfdbfe; background: #eff6ff; color: #1e40af; }
.small-placeholder { min-height: 340px; transition: background 0.2s, border-color 0.2s; }
.small-placeholder:hover { background: #f9fafb; border-color: #d1d5db; }
.ph-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.8; }
.ph-text { font-size: 0.95rem; line-height: 1.4; }

/* Anti Lazy Load */
.szbt-card-img img, .si-img img {
    opacity: 1 !important; visibility: visible !important; display: block !important;
    transition: none !important; min-width: 100%; min-height: 100%;
}