.media-container {
    max-width: 1200px;
    margin: 0 auto;
}

.media-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.media-filter {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
    color: #fff;
    font-size: 0.9rem;
    border: 1px solid var(--glass-border);
    transition: 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.media-card {
    overflow: hidden;
    padding: 0 !important; /* Glas-Effekt bis zum Rand */
    transition: transform 0.3s ease;
}

.media-card:hover {
    transform: translateY(-5px);
}

.media-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
    opacity: 0.8;
    transition: 0.3s;
}

.media-thumb {
    position: relative; /* Wichtig für die Positionierung des Overlays */
    cursor: pointer;
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10; /* Sicherstellen, dass es oben liegt */
    background: rgba(0, 0, 0, 0.2); /* Leichte Abdunkelung beim Drüberfahren */
    transition: background 0.3s;
}

.media-overlay:hover {
    background: rgba(0, 0, 0, 0.5);
}

.play-button {
    pointer-events: none; /* Der Klick soll durch das Icon auf das Overlay gehen */
    font-size: 3rem;
    color: #fff;
    text-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.media-card:hover .play-overlay {
    opacity: 1;
    background: rgba(255, 77, 77, 0.4);
}

.media-info {
    padding: 15px;
}

.media-info h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.media-date {
    font-size: 0.8rem;
    opacity: 0.6;
}

.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92); /* Sehr dunkles Overlay */
    backdrop-filter: blur(8px); /* Optional: macht den Hintergrund unscharf */
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    z-index: 10000;
}

.video-responsive-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Format */
    height: 0;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.1);
}

.video-responsive-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.close-modal {
    position: absolute;
    top: -45px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.close-modal:hover {
    transform: scale(1.2);
    color: var(--accent-color);
}

.media-img-obj {
    width: 100%;
    height: 200px; /* Oder deine gewünschte Höhe */
    object-fit: cover; /* Schneidet die Ränder sauber ab statt zu quetschen */
    display: block;
}