/* ==========================================================================
   ORANGECAT FILM - AUDIO PLAYER STYLESHEET
   ========================================================================== */

/* ==========================================================================
   1. GLOBALE FARBVARIABLEN
   ========================================================================== */

/* --- Light Mode (Standard) --- */
:root {
    --site-bg: #f5f5f7;                 
    --player-bg: #fdfdfd;               

    --text-primary: #1a1a1a;            
    --text-secondary: #737373;          

    --accent-base: #1a1a1a;             
    --control-icon-color: var(--accent-base); 
    
    --icon-sun: #f5a623;
    --icon-moon: #4a90e2;

    --track-hover-bg: #f5f5f5;          
    --track-active-bg: #eeeeee;         
    --divider-color: #e5e5ea;           

    --btn-streaming-bg: #f5f5f7;        
    --btn-streaming-bg-hover: #e5e5ea;  
    --btn-streaming-text: #1a1a1a;      
}

/* --- Dark Mode --- */
html.dark-mode, body.dark-mode {
    --site-bg: #121212;                 
    --player-bg: #1e1e1e;               

    --text-primary: #ededed;            
    --text-secondary: #a1a1a6;

    --accent-base: #ededed;
    --control-icon-color: var(--accent-base);
    
    --track-hover-bg: #2c2c2e;
    --track-active-bg: #3a3a3c;
    --divider-color: #38383a;
    
    --btn-streaming-bg: #2c2c2e;
    --btn-streaming-bg-hover: #3a3a3c;
    --btn-streaming-text: #ededed;
}

/* ==========================================================================
   2. TEXT-MARKIERUNG (Selection)
   ========================================================================== */

/* Light Mode: Schwarzer Hintergrund, weiße Schrift */
::selection {
    background: black;
    color: white;
}
::-moz-selection {
    background: black;
    color: white;
}

/* Dark Mode: Weißer Hintergrund, schwarze Schrift */
body.dark-mode ::selection {
    background: white;
    color: black;
}
body.dark-mode ::-moz-selection {
    background: white;
    color: black;
}

/* ==========================================================================
   3. BASIS-LAYOUT & PAGE TRANSITION
   ========================================================================== */

html {
    background-color: var(--site-bg);
}

body {
    margin: 0;
    padding: 20px;
    background-color: var(--site-bg);
    font-family: 'Acumin Pro', Arial, sans-serif;
    
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100dvh;
    box-sizing: border-box;
    overflow: hidden;
    
    /* Weicher Seitenübergang (Fade-In) */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

body.page-loaded {
    opacity: 1;
}

/* ==========================================================================
   4. NAVIGATION (Home- & Theme-Toggle)
   ========================================================================== */

.oc-home-btn, 
.oc-theme-toggle {
    position: absolute;
    top: 20px;
    background: var(--player-bg);
    border: 1px solid var(--divider-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s, background 0.2s;
    z-index: 100;
}

.oc-home-btn:hover, 
.oc-theme-toggle:hover {
    transform: scale(1.1);
}

.oc-home-btn { 
    left: 20px; 
}

.oc-theme-toggle { 
    right: 20px; 
    color: var(--text-primary); 
    font-size: 1.2rem; 
}

/* --- Navigations-Icons --- */
.oc-home-icon,
.oc-theme-icon {
    display: inline-block;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.oc-home-icon {
    width: 20px;
    height: 20px;
    background-color: var(--control-icon-color);
    -webkit-mask-image: url('/assets/img/home.svg');
    mask-image: url('/assets/img/home.svg');
}

.oc-theme-icon {
    position: absolute; 
    width: 22px;
    height: 22px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.oc-theme-sun {
    background-color: var(--icon-sun);
    -webkit-mask-image: url('/assets/img/sun.svg');
    mask-image: url('/assets/img/sun.svg');
}

.oc-theme-moon {
    background-color: var(--icon-moon);
    -webkit-mask-image: url('/assets/img/moon.svg');
    mask-image: url('/assets/img/moon.svg');
}

/* ==========================================================================
   5. LANDINGPAGE (Album-Übersicht)
   ========================================================================== */

/* --- Header-Bereich der Landingpage --- */
.oc-landing-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-height: 100dvh;
    box-sizing: border-box;
    padding: 40px 0;
}

.oc-landing-wrapper h1 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 2.2rem; 
    font-weight: 600;
    padding: 0 20px; 
}

.oc-landing-desc {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0 0 40px 0;
    padding: 0 20px;
    max-width: 600px;
    line-height: 1.5;
}

/* --- Album-Grid (Listen-Layout) --- */
.grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 750px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px 20px 40px 20px; 
    box-sizing: border-box;
}

/* --- Einzelne Album-Karte --- */
.album-card {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 18px;
    background: var(--player-bg);
    border-radius: 16px;
    border: 1px solid var(--divider-color);
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03); 
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    
    /* Hardware-Beschleunigung gegen Text-Zittern ("Sub-pixel Rendering Jitter") */
    transform: translateZ(0); 
    backface-visibility: hidden; 
    -webkit-font-smoothing: antialiased; 
}

.album-card:hover {
    transform: translateY(-2px) translateZ(0);
    box-shadow: 0 6px 16px rgba(0,0,0,0.07); 
    background: var(--track-hover-bg);
}

.album-card img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.album-card-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; 
}

.album-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.4rem;
    font-weight: 600; 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   6. PLAYER: CONTAINER & HEADER
   ========================================================================== */

#orange-cat-player-root {
    width: 100%;
    max-width: 750px;
    height: 100%;
    display: flex;
    align-items: center;
}

.oc-player {
    background: var(--player-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 30px;
    box-sizing: border-box;
    width: 100%;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

.oc-header {
    display: flex;
    gap: 24px;
    align-items: center;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--divider-color);
    flex-shrink: 0;
}

.oc-cover {
    width: 150px;
    height: 150px;
    border-radius: 5px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

.oc-album-title {
    margin: 0 0 5px 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.oc-artist {
    margin: 0 0 15px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   7. PLAYER: STEUERUNG & FORTSCHRITTSBALKEN
   ========================================================================== */

.oc-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.oc-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oc-btn:hover {
    opacity: 0.6;
}

.oc-icon, 
.oc-icon-large {
    display: inline-block;
    background-color: var(--control-icon-color); 
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.oc-icon { width: 24px; height: 24px; }
.oc-icon-large { width: 50px; height: 50px; }

/* --- Fortschrittsbalken (Scrubber) --- */
.oc-progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

#oc-time-current, 
#oc-time-total {
    width: 32px;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

#oc-time-current { text-align: left; }
#oc-time-total { text-align: right; }

#oc-progress {
    flex: 1;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    outline: none;
    width: 100%;
}

#oc-progress::-webkit-slider-runnable-track,
#oc-progress::-moz-range-track {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--accent-base) var(--progress, 0%), var(--divider-color) var(--progress, 0%));
}

#oc-progress::-webkit-slider-thumb,
#oc-progress::-moz-range-thumb {
    -webkit-appearance: none;
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: var(--accent-base);
    margin-top: -4px; 
    border: none;
    box-shadow: none;
    transition: transform 0.1s;
}

#oc-progress::-webkit-slider-thumb:hover,
#oc-progress::-moz-range-thumb:hover {
    transform: scale(1.3);
}

/* ==========================================================================
   8. PLAYER: PLAYLIST
   ========================================================================== */

.oc-playlist {
    list-style: none;
    padding: 20px 0px 20px 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
	scrollbar-width: none; /* Versteckt Scrollbar in Firefox */
    -ms-overflow-style: none; /* Versteckt Scrollbar in IE und Edge Legacy */
    
    /* Fade-Effekt für den Scrollbereich oben/unten */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 25px, black calc(100% - 25px), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 25px, black calc(100% - 25px), transparent 100%);
}

/* Versteckt Scrollbar in Webkit-Browsern (Chrome, Safari, modernes Edge) */
.oc-playlist::-webkit-scrollbar { 
    display: none; 
}

/* --- Einzelner Track in der Playlist --- */
.oc-track {
    position: relative; 
    display: flex;
    gap: 15px;
    padding: 12px 10px;
    cursor: pointer;
    border-radius: 6px;
    color: var(--text-primary);
    transition: background 0.2s;
    margin-bottom: 2px; 
}

.oc-track:hover {
    background: var(--track-hover-bg);
}

.oc-track.active {
    background: var(--track-active-bg);
    color: var(--accent-base);
    font-weight: 600; 
}

/* --- Typografie innerhalb des Tracks --- */
.oc-track-num {
    color: var(--text-secondary);
    width: 20px;
    text-align: right;
    font-weight: normal; 
}

.oc-track.active .oc-track-num {
    color: var(--accent-base);
}

.oc-track-title {
    flex-grow: 1; 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.oc-track-duration {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums; 
}

/* --- Trennlinien-Logik (Divider) --- */
.oc-track:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -1px; 
    left: 10px;
    right: 10px;
    height: 1px;
    background-color: var(--divider-color);
    transition: opacity 0.2s ease;
}

/* Visueller Fix für nahtlose Hover- und Active-States ohne Lücken. 
   Blendet die Linie ober- und unterhalb der markierten Tracks aus. */
.oc-track.active::after,
.oc-track:hover::after {
    opacity: 0;
}
.oc-track:has(+ .oc-track.active)::after,
.oc-track:has(+ .oc-track:hover)::after {
    opacity: 0;
}

/* ==========================================================================
   9. STREAMING-FOOTER
   ========================================================================== */

.oc-streaming {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--divider-color);
    flex-shrink: 0;
}

.oc-streaming p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 10px 0;
}

.oc-streaming-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.oc-streaming-links a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--btn-streaming-text);
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--btn-streaming-bg);
    transition: background 0.2s;
}

.oc-streaming-links a:hover {
    background: var(--btn-streaming-bg-hover);
}

.oc-streaming-icon { 
    width: 18px; 
    height: 18px; 
    vertical-align: middle; 
    margin-right: 5px; 
}

/* ==========================================================================
   10. RESPONSIVE ANPASSUNGEN (Mobile)
   ========================================================================== */

@media (max-width: 500px) {
    
    body { 
        padding: 0; 
    }
    
    /* --- Mobile Navigation --- */
    .oc-home-btn, 
    .oc-theme-toggle { 
        top: 15px; 
    }
    .oc-home-btn { 
        left: 15px; 
    }
    .oc-theme-toggle { 
        right: 15px; 
    }

    /* --- Mobile Landingpage --- */
    .oc-landing-wrapper { 
        padding: 20px 0; 
    }
    .oc-landing-wrapper h1 { 
        font-size: 1.6rem; 
        margin-bottom: 8px; 
    }
    .oc-landing-desc { 
        font-size: 0.95rem; 
        margin-bottom: 25px; 
    }
    
    .grid { 
        padding: 10px 15px 40px 15px; 
        gap: 15px; 
    }
    .album-card { 
        gap: 15px; 
        padding: 12px; 
        border-radius: 12px; 
    }
    .album-card img { 
        width: 75px; 
        height: 75px; 
        border-radius: 6px; 
    }
    .album-card h3 { 
        font-size: 1.15rem; 
        margin-bottom: 4px; 
    }
    .album-card p { 
        font-size: 0.95rem; 
    }

    /* --- Mobile Player --- */
    .oc-player { 
        height: 100dvh; 
        max-height: 100dvh; 
        border-radius: 0; 
        padding: 20px 15px; 
        box-sizing: border-box;
    }
    .oc-header { 
        flex-direction: column; 
        text-align: center; 
    }
    .oc-cover { 
        width: 150px; 
        height: 150px; 
    }
    .oc-info { 
        width: 100%; 
    }
    .oc-controls { 
        justify-content: center; 
        gap: 35px; 
        margin-bottom: 25px; 
    }
    .oc-controls .oc-icon { 
        width: 32px; 
        height: 32px; 
    }
    .oc-controls .oc-icon-large { 
        width: 52px; 
        height: 52px; 
    }
    .oc-streaming { 
        padding-top: 10px; 
    }
    .oc-streaming p { 
        margin: 0 0 8px 0; 
    }
    .oc-streaming-links { 
        gap: 8px; 
    }
    .oc-streaming-links a { 
        padding: 5px 10px; 
        font-size: 0.75rem; 
    }
    .oc-streaming-icon { 
        width: 14px; 
        height: 14px; 
        margin-right: 4px; 
    }
}
