.haeuser-page {
    padding: 20px 0;
}

.haeuser-header {
    text-align: center;
    margin-bottom: 40px;
}

.haeuser-header h1 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.haeuser-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Special Categories */
.special-categories {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.special-category-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 200px;
}

.special-category-card:hover {
    transform: translateY(-4px);
    border-color: var(--purple);
    box-shadow: 0 8px 24px rgba(145, 70, 255, 0.3);
}

.category-gilden_lore {
    border-color: #8b6914;
}

.category-gilden_lore:hover {
    border-color: #d4a017;
    box-shadow: 0 8px 24px rgba(212, 160, 23, 0.3);
}

.category-drama {
    border-color: #b33a3a;
}

.category-drama:hover {
    border-color: #ff4444;
    box-shadow: 0 8px 24px rgba(255, 68, 68, 0.3);
}

.category-icon {
    font-size: 2rem;
}

.category-info h3 {
    color: var(--text-color);
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
}

.category-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Search */
.haeuser-search {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-container input {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    background: var(--card-bg);
    color: var(--text-color);
    outline: none;
    transition: all 0.3s ease;
}

.search-container input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.2);
}

.search-container input::placeholder {
    color: var(--text-secondary);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.search-suggestions.active {
    display: block;
}

.search-suggestion {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.search-suggestion:last-child {
    border-bottom: none;
}

.search-suggestion:hover,
.search-suggestion.selected {
    background: var(--bg-secondary);
}

.search-suggestion .streamer-name {
    font-weight: 500;
    color: var(--text-color);
}

.search-suggestion .haus-badge {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.search-suggestion .haus-badge.menschen { background: rgba(74, 144, 217, 0.3); color: #4a90d9; }
.search-suggestion .haus-badge.zwerge { background: rgba(201, 162, 39, 0.3); color: #c9a227; }
.search-suggestion .haus-badge.nachtelfen { background: rgba(123, 104, 238, 0.3); color: #7b68ee; }
.search-suggestion .haus-badge.gnome { background: rgba(231, 76, 60, 0.3); color: #e74c3c; }
.search-suggestion .haus-badge.unassigned { background: rgba(100, 100, 100, 0.3); color: #888; }

.no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
}

/* Card Grid - 4 Karten oben, Fraktionslos zentriert unten */
.haeuser-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.haeuser-grid .haus-card {
    flex: 0 0 calc(25% - 15px);
    max-width: calc(25% - 15px);
}

/* Fraktionslos zentriert in zweiter Reihe */
.haeuser-grid .haus-card[data-haus="unassigned"] {
    flex: 0 0 calc(25% - 15px);
    max-width: calc(25% - 15px);
}

/* Einzelne Haus-Karte */
.haus-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.haus-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
    transition: all 0.3s ease;
}

.haus-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.haus-card:hover::before {
    background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.85) 100%);
}

.haus-card.active {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.haus-card:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.haus-card-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.haus-card:hover .haus-card-bg {
    transform: scale(1.1);
}

/* Centered banner variant for unassigned */
.haus-card.centered-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.haus-card.centered-banner .haus-card-bg {
    width: 60%;
    height: auto;
    max-height: 60%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    object-fit: contain;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.5));
}

.haus-card.centered-banner:hover .haus-card-bg {
    transform: translate(-50%, -60%) scale(1.1);
}

.haus-card.centered-banner::before {
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
}

.haus-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.haus-card h2 {
    font-size: 1.4rem;
    color: #fff;
    margin: 0 0 8px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.haus-card .haus-count {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.haus-card .haus-expand-hint {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.haus-card:hover .haus-expand-hint {
    opacity: 1;
    transform: translateY(0);
}

/* Haus-spezifische Farben für Karten */
.haus-card[data-haus="menschen"] { border: 3px solid transparent; }
.haus-card[data-haus="menschen"].active { border-color: #4a90d9; }
.haus-card[data-haus="menschen"] .haus-count { background: rgba(74, 144, 217, 0.8); }

.haus-card[data-haus="zwerge"] { border: 3px solid transparent; }
.haus-card[data-haus="zwerge"].active { border-color: #c9a227; }
.haus-card[data-haus="zwerge"] .haus-count { background: rgba(201, 162, 39, 0.8); }

.haus-card[data-haus="nachtelfen"] { border: 3px solid transparent; }
.haus-card[data-haus="nachtelfen"].active { border-color: #7b68ee; }
.haus-card[data-haus="nachtelfen"] .haus-count { background: rgba(123, 104, 238, 0.8); }

.haus-card[data-haus="gnome"] { border: 3px solid transparent; }
.haus-card[data-haus="gnome"].active { border-color: #e74c3c; }
.haus-card[data-haus="gnome"] .haus-count { background: rgba(231, 76, 60, 0.8); }

.haus-card[data-haus="unassigned"] { border: 3px solid transparent; }
.haus-card[data-haus="unassigned"].active { border-color: #888; }
.haus-card[data-haus="unassigned"] .haus-count { background: rgba(100, 100, 100, 0.8); }

/* Expanded Content Area */
.haus-content-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.3s ease;
    opacity: 0;
    background: var(--card-bg);
    border-radius: 16px;
    margin-top: -10px;
}

.haus-content-container.active {
    max-height: 3000px;
    opacity: 1;
    transition: max-height 0.6s ease-in, opacity 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.haus-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
}

.haus-content-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-color);
}

.haus-close-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.haus-close-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-color);
}

/* Clips Grid */
.clips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 25px;
}

.haus-clip-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
}

.haus-clip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.haus-clip-card .clip-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.haus-clip-card .clip-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.haus-clip-card:hover .clip-thumbnail img {
    transform: scale(1.05);
}

.haus-clip-card .clip-thumbnail .no-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.haus-clip-card .clip-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.haus-clip-card .clip-info {
    padding: 12px;
}

.haus-clip-card .clip-info h4 {
    margin: 0 0 6px 0;
    font-size: 0.9rem;
    line-height: 1.3;
    color: var(--text-color);
}

.haus-clip-card .clip-broadcaster {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.no-clips {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-clips p {
    margin: 0;
    font-style: italic;
}

/* Haus-spezifische Hover-Farben für Clip-Cards */
[data-active-haus="menschen"] .haus-clip-card:hover { border-color: #4a90d9; }
[data-active-haus="zwerge"] .haus-clip-card:hover { border-color: #c9a227; }
[data-active-haus="nachtelfen"] .haus-clip-card:hover { border-color: #7b68ee; }
[data-active-haus="gnome"] .haus-clip-card:hover { border-color: #e74c3c; }
[data-active-haus="unassigned"] .haus-clip-card:hover { border-color: #888; }

/* Mobile Responsive */
@media (max-width: 1024px) {
    .haeuser-grid .haus-card {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }

    .haeuser-grid {
        gap: 15px;
    }

    .haus-card h2 {
        font-size: 1.2rem;
    }

    .clips-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .haeuser-header h1 {
        font-size: 1.6rem;
    }

    .haeuser-description {
        font-size: 0.95rem;
    }

    .special-categories {
        gap: 0.75rem;
    }

    .special-category-card {
        padding: 0.75rem 1rem;
    }

    .search-container input {
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    .haeuser-grid .haus-card {
        flex: 0 0 calc(50% - 8px);
        max-width: calc(50% - 8px);
    }

    .haus-card h2 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .haeuser-header h1 {
        font-size: 1.4rem;
    }

    .haeuser-description {
        font-size: 0.875rem;
    }

    .special-categories {
        gap: 0.5rem;
    }

    .special-category-card {
        padding: 0.6rem 0.875rem;
        min-width: 100%;
    }

    .category-icon {
        font-size: 1.25rem;
    }

    .special-category-card span {
        font-size: 0.875rem;
    }

    .search-container input {
        padding: 10px 14px;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .haeuser-grid {
        gap: 10px;
    }

    .haeuser-grid .haus-card {
        flex: 0 0 calc(50% - 5px);
        max-width: calc(50% - 5px);
    }

    .haus-card {
        aspect-ratio: 1;
    }

    .haus-card h2 {
        font-size: 0.9rem;
    }

    .haus-card .haus-count {
        padding: 3px 8px;
        font-size: 0.7rem;
    }

    .haus-card-content {
        padding: 10px;
    }

    .clips-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 12px;
    }

    .haus-clip-card .clip-info {
        padding: 8px;
    }

    .haus-clip-card .clip-info h4 {
        font-size: 0.75rem;
        line-height: 1.25;
    }

    .haus-clip-card .clip-meta {
        font-size: 0.65rem;
    }
}
