/**
 * Chillgressive.de - Custom Styles
 *
 * Design: Hell/Minimalistisch, weiß/blau/hellgrau
 * Mobile-first, Bootstrap 5 basiert
 */

/* =================================================================
   CSS Variables / Farben
   ================================================================= */
:root {
    --color-primary: #0d6efd;
    --color-primary-dark: #0b5ed7;
    --color-secondary: #6c757d;
    --color-light: #f8f9fa;
    --color-border: #dee2e6;
    --color-text: #212529;
    --color-text-muted: #6c757d;
    --color-white: #ffffff;
    --color-highlight: #e9ecef;
    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* =================================================================
   Basis Styles
   ================================================================= */
body {
    background-color: var(--color-white);
    color: var(--color-text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Links */
a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* =================================================================
   Navigation
   ================================================================= */
.navbar {
    box-shadow: var(--box-shadow);
}

.navbar-brand {
    color: var(--color-primary) !important;
    font-size: 1.5rem;
}

.nav-link {
    color: var(--color-text) !important;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary) !important;
}

/* =================================================================
   Buttons
   ================================================================= */
.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.btn-outline-primary {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline-primary:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

/* =================================================================
   Cards & Boxen
   ================================================================= */
.card {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.card-header {
    background-color: var(--color-light);
    border-bottom: 1px solid var(--color-border);
}

/* Highlight-Boxen */
.highlight-box {
    background-color: var(--color-highlight);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

/* =================================================================
   Tabellen
   ================================================================= */
.table {
    border: 1px solid var(--color-primary);
}

.table th {
    background-color: var(--color-light);
    border-bottom: 2px solid var(--color-primary);
}

.table td,
.table th {
    border-color: var(--color-border);
}

/* =================================================================
   Modals
   ================================================================= */
.modal-content {
    border: 1px solid var(--color-primary);
    border-radius: var(--border-radius);
}

.modal-header {
    background-color: var(--color-light);
    border-bottom: 1px solid var(--color-border);
}

.modal-footer {
    background-color: var(--color-light);
    border-top: 1px solid var(--color-border);
}

/* =================================================================
   Formulare
   ================================================================= */
.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
}

/* =================================================================
   Audio Player
   ================================================================= */
.audio-player {
    background-color: var(--color-light);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.audio-player .progress {
    height: 8px;
    cursor: pointer;
}

.audio-player .btn-play {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-player .track-info {
    flex: 1;
    min-width: 0;
}

.audio-player .track-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-player .track-artist {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.audio-player .time-display {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.audio-player .volume-slider {
    width: 80px;
}

/* =================================================================
   Playlist
   ================================================================= */
.playlist-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background-color 0.15s;
}

.playlist-item:hover {
    background-color: var(--color-highlight);
}

.playlist-item.active {
    background-color: rgba(13, 110, 253, 0.1);
    border-left: 3px solid var(--color-primary);
}

.playlist-item .track-number {
    width: 30px;
    text-align: center;
    color: var(--color-text-muted);
}

.playlist-item .track-duration {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* =================================================================
   Artist / Release Cards
   ================================================================= */
.artist-card,
.release-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.artist-card:hover,
.release-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.artist-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.release-cover {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--border-radius);
}

/* =================================================================
   Event Cards
   ================================================================= */
.event-card {
    display: flex;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.event-date {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 1rem;
    text-align: center;
    min-width: 80px;
}

.event-date .day {
    font-size: 1.75rem;
    font-weight: bold;
    line-height: 1;
}

.event-date .month {
    font-size: 0.875rem;
    text-transform: uppercase;
}

.event-content {
    padding: 1rem;
    flex: 1;
}

/* =================================================================
   Comments
   ================================================================= */
.comment {
    border-left: 3px solid var(--color-border);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: 500;
}

.comment-date {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.comment-text {
    margin-top: 0.5rem;
}

/* =================================================================
   Hero Section
   ================================================================= */
.hero {
    background-color: var(--color-light);
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero .lead {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

/* =================================================================
   Footer
   ================================================================= */
footer {
    background-color: var(--color-light);
}

footer a {
    color: var(--color-text-muted);
}

footer a:hover {
    color: var(--color-primary);
}

/* =================================================================
   Utility Classes
   ================================================================= */
.text-primary {
    color: var(--color-primary) !important;
}

.bg-highlight {
    background-color: var(--color-highlight);
}

.border-primary {
    border-color: var(--color-primary) !important;
}

/* =================================================================
   Responsive Anpassungen
   ================================================================= */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .hero .lead {
        font-size: 1rem;
    }

    .audio-player .volume-slider {
        display: none;
    }

    .event-card {
        flex-direction: column;
    }

    .event-date {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .event-date .day,
    .event-date .month {
        font-size: 1rem;
    }
}

/* =================================================================
   Gallery
   ================================================================= */
.gallery-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.gallery-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.gallery-card .card-body {
    min-height: 60px;
}

/* Video Player */
video {
    max-width: 100%;
    border-radius: var(--border-radius);
}

/* Lightbox (optional) */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.gallery-lightbox img,
.gallery-lightbox video {
    max-width: 90%;
    max-height: 90%;
}

.gallery-lightbox .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* =================================================================
   Fixed Media Player (Bottom)
   ================================================================= */
.media-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-white);
    border-top: 1px solid var(--color-primary);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    padding: 10px 0;
}

.player-inner {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Video Preview */
.video-preview {
    flex-shrink: 0;
}

.video-preview video {
    width: 80px;
    height: 45px;
    object-fit: cover;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    background: #000;
}

/* Cover & Info */
.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
    max-width: 200px;
    flex-shrink: 0;
}

.player-cover {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--color-border);
}

.player-meta {
    overflow: hidden;
}

.player-title {
    font-weight: 500;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-artist {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Controls */
.player-controls {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.player-controls .btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Progress */
.player-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 100px;
}

.player-progress .progress {
    flex: 1;
    height: 6px;
    cursor: pointer;
    background-color: var(--color-highlight);
}

.player-progress .progress-bar {
    background-color: var(--color-primary);
    transition: width 0.1s linear;
}

.player-progress .time-display {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    min-width: 40px;
    text-align: center;
}

/* Volume */
.player-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.player-volume .btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.player-volume .volume-slider {
    width: 80px;
    height: 6px;
}

/* Playable Track Hover */
.playable-track {
    cursor: pointer;
}

.playable-track:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.playable-track.playing {
    background-color: rgba(13, 110, 253, 0.1);
    border-left: 3px solid var(--color-primary);
}

/* Responsive Player */
@media (max-width: 768px) {
    .player-inner {
        flex-wrap: wrap;
        gap: 8px;
    }

    .player-info {
        order: 1;
        flex: 1;
        min-width: 0;
    }

    .player-controls {
        order: 2;
    }

    .player-progress {
        order: 4;
        flex: 100%;
    }

    .player-volume {
        order: 3;
    }

    .player-volume .volume-slider {
        display: none;
    }

    .video-preview {
        order: 0;
    }

    .video-preview video {
        width: 60px;
        height: 34px;
    }

    #btn-close-player {
        order: 5;
        position: absolute;
        top: 5px;
        right: 10px;
    }

    .media-player .container {
        position: relative;
    }
}

/* Body padding when player is visible */
body.player-active {
    padding-bottom: 70px;
}

body.player-active .back-to-top-btn {
    bottom: 80px;
}

@media (max-width: 768px) {
    body.player-active {
        padding-bottom: 110px;
    }

    body.player-active .back-to-top-btn {
        bottom: 120px;
    }
}

/* Queue-Info im Player */
.player-queue-info {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-left: 5px;
}

/* =================================================================
   Print Styles
   ================================================================= */
@media print {
    .navbar,
    footer,
    .audio-player,
    .btn {
        display: none !important;
    }

    body {
        font-size: 12pt;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}
