/**
 * Streams Page Styles
 * Ella Radio Theme
 */

/* ==============================================
   STREAMS HEADER
============================================== */
.streams-page {
    background: #ffffff;
    min-height: calc(100vh - 144px);
}

.streams-header {
    padding: 2rem 0 3rem;
}

.streams-header-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .streams-header-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.streams-header-text h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .streams-header-text h1 {
        font-size: 3rem;
    }
}

.streams-description {
    font-size: 1.125rem;
    color: #4a3c31;
    line-height: 1.7;
    max-width: 600px;
}

/* Search Field */
.streams-search-wrapper {
    display: flex;
    justify-content: flex-start;
}

@media (min-width: 1024px) {
    .streams-search-wrapper {
        justify-content: flex-end;
    }
}

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

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

@media (min-width: 768px) {
    .search-icon {
        left: 1.25rem;
    }
}

.search-input {
    width: 100%;
    height: 3rem;
    padding-left: 2.5rem;
    padding-right: 1rem;
    background: white;
    border: 1px solid rgba(60, 46, 37, 0.2);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.2s;
}

@media (min-width: 768px) {
    .search-input {
        height: 3.5rem;
        padding-left: 3rem;
        padding-right: 1.25rem;
    }
}

.search-input:focus {
    outline: none;
    border-color: #e10717;
    box-shadow: 0 0 0 3px rgba(225, 7, 23, 0.1);
}

.search-input::placeholder {
    color: #999;
}

/* ==============================================
   STREAMS GRID
============================================== */
.streams-grid-section {
    padding: 2rem 0 4rem;
}

.streams-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 1024px) {
    .streams-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1280px) {
    .streams-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==============================================
   STREAM CARDS
============================================== */
.stream-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stream-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.stream-card.playing {
    box-shadow: 0 0 0 2px #e10717, 0 10px 30px -5px rgba(225, 7, 23, 0.5);
}

/* Removed - not needed anymore */

.stream-card-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.stream-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.stream-card:hover .stream-card-image img {
    transform: scale(1.1);
}

/* Gradient Overlay */
.stream-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2) 50%, transparent);
    pointer-events: none;
}

/* Play Button */
.stream-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3rem;
    height: 3rem;
    background: rgba(225, 7, 23, 0.9);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0;
    z-index: 10;
}

@media (min-width: 768px) {
    .stream-card-play {
        width: 4rem;
        height: 4rem;
    }
}

.stream-card:hover .stream-card-play {
    opacity: 1;
}

/* Wenn spielend, IMMER sichtbar! */
.stream-card-play.playing {
    opacity: 1 !important;
    background: #e10717;
    animation: pulse 2s ease-in-out infinite;
    pointer-events: auto !important;
}

.stream-card-play:hover {
    background: #e10717;
    transform: translate(-50%, -50%) scale(1.1);
}

.stream-card-play svg {
    width: 1.5rem;
    height: 1.5rem;
    margin-left: 2px;
}

.stream-card-play .play-icon,
.stream-card-play .pause-icon {
    display: block;
    pointer-events: none;
}

.stream-card-play .pause-icon {
    display: none;
}

.stream-card-play.playing .play-icon {
    display: none !important;
}

.stream-card-play.playing .pause-icon {
    display: block !important;
    margin-left: 0;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(225, 7, 23, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(225, 7, 23, 0);
    }
}

/* Text Info */
.stream-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    color: white;
    z-index: 5;
    text-decoration: none;
    display: block;
    transition: background 0.2s;
}

.stream-card-info:hover {
    background: rgba(0, 0, 0, 0.1);
}

.stream-card-name {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .stream-card-name {
        font-size: 1.125rem;
    }
}

.stream-card-genre {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    display: none;
}

@media (min-width: 768px) {
    .stream-card-genre {
        display: block;
        font-size: 0.875rem;
    }
}

/* ==============================================
   NO RESULTS MESSAGE
============================================== */
.no-results-message {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results-text {
    font-size: 1.25rem;
    color: #4a3c31;
}

.no-channels-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.no-channels-message p {
    font-size: 1.125rem;
    color: #4a3c31;
}

/* ==============================================
   SEARCH HIDDEN STATE
============================================== */
.stream-card.hidden {
    display: none !important;
}

/* ==============================================
   RESPONSIVE
============================================== */
@media (max-width: 767px) {
    .streams-header {
        padding: 1.5rem 0 2rem;
    }
    
    .streams-description {
        font-size: 1rem;
        color: #4a3c31;
    }
    
    .streams-grid-section {
        padding: 1.5rem 0 3rem;
    }
}
