/* style.css - Präzise Anpassung für Hintergrund, Icons, Uhr & Frosted Glass */

@keyframes waveGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    background: linear-gradient(-45deg, #06011f, #4d0025, #26004d, #00424d);
    background-size: 400% 400%;
    animation: waveGradient 40s ease infinite;
    color: #f3f4f6;
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    padding: 30px 20px;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    overflow-x: hidden;
}

header {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto 30px auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.logo-area { display: flex; align-items: center; gap: 12px; }

.logo-icon {
    width: 44px; height: 44px; border-radius: 16px;
    background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 20px; box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

h1 { font-size: 26px; font-weight: 700; color: white; margin: 0; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }

.clock-badge {
    display: flex; flex-direction: column; align-items: flex-end;
    background: rgba(20, 20, 25, 0.45); padding: 12px 22px; border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3); text-align: right;
}

#live-time { font-size: 22px; font-weight: bold; color: white; font-family: monospace; letter-spacing: 0.05em; }
#live-date { font-size: 12px; color: rgba(255, 255, 255, 0.6); font-family: sans-serif; margin-top: 2px; }

.dashboard-grid {
    max-width: 1200px; width: 100%; margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px; flex-grow: 1;
}

.dash-col { display: flex; flex-direction: column; gap: 24px; }

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem; padding: 24px;
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    display: flex; flex-direction: column; justify-content: space-between;
    box-sizing: border-box; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; overflow: hidden;
}

.glass-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.12), transparent 40%);
    z-index: 1; opacity: 0; transition: opacity 0.5s; pointer-events: none;
}

.glass-card:hover::before { opacity: 1; }
.glass-card > * { position: relative; z-index: 2; }
.glass-card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.3); box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 0 rgba(255, 255, 255, 0.2); }

/* Wichtige Flexbox Wrapper für den Card-Inhalt */
.card-body {
    display: flex; flex-direction: column; flex-grow: 1; min-height: 0;
}

.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-shrink: 0; }
.card-title-area { display: flex; align-items: center; gap: 12px; }

.icon-box {
    width: 48px !important; height: 48px !important; border-radius: 14px !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    font-size: 20px !important; background: rgba(20, 20, 25, 0.6) !important;
    backdrop-filter: blur(10px) !important; -webkit-backdrop-filter: blur(10px) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.icon-plex { color: #e5a00d !important; border: 1px solid rgba(229, 160, 13, 0.4) !important; box-shadow: 0 0 12px rgba(229, 160, 13, 0.15) !important; }
.icon-ombi { color: #b059d1 !important; border: 1px solid rgba(176, 89, 209, 0.4) !important; box-shadow: 0 0 12px rgba(176, 89, 209, 0.15) !important; }
.icon-tautulli { color: #8b5cf6 !important; border: 1px solid rgba(139, 92, 246, 0.4) !important; box-shadow: 0 0 12px rgba(139, 92, 246, 0.15) !important; }
.icon-minecraft { color: #22c55e !important; border: 1px solid rgba(34, 197, 94, 0.4) !important; box-shadow: 0 0 12px rgba(34, 197, 94, 0.15) !important; }
.icon-teamspeak { color: #3b82f6 !important; border: 1px solid rgba(59, 130, 246, 0.4) !important; box-shadow: 0 0 12px rgba(59, 130, 246, 0.15) !important; }

.glass-card:hover .icon-box { transform: scale(1.05); }

h2 { font-size: 20px; font-weight: 700; color: white; margin: 0; text-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.count-badge { font-size: 11px; padding: 4px 12px; border-radius: 9999px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

/* Interner Scrollbereich (verhindert Abschneiden) */
.content-area { margin-top: 8px; flex-grow: 1; overflow-y: auto; min-height: 0; padding-right: 4px; }
.content-area::-webkit-scrollbar { width: 4px; }
.content-area::-webkit-scrollbar-track { background: transparent; }
.content-area::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }
.content-area::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }

.placeholder-text { font-size: 13px; color: rgba(255, 255, 255, 0.4); text-align: center; padding: 30px 0; margin: 0; }

.link-footer {
    margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;
}

.action-btn {
    background: rgba(255, 255, 255, 0.08); color: white; padding: 7px 14px;
    border-radius: 10px; font-size: 12px; font-weight: 500; text-decoration: none;
    display: flex; align-items: center; gap: 6px; transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1); cursor: pointer;
}
.action-btn:hover { background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.2); }

.mc-copy-box {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(0, 0, 0, 0.3); padding: 10px 14px;
    border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 12px; gap: 8px;
}
.mc-input { background: transparent; border: none; color: rgba(255, 255, 255, 0.9); font-family: monospace; font-size: 13px; width: 100%; outline: none; }
.status-live { font-size: 11px; color: #34d399; background: rgba(16, 185, 129, 0.2); border: 1px solid rgba(16, 185, 129, 0.3); padding: 4px 10px; border-radius: 9999px; font-weight: 600; text-transform: uppercase; }

.row-item { background: rgba(0, 0, 0, 0.25); padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.06); display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.row-text { overflow: hidden; padding-right: 8px; display: flex; align-items: center; gap: 12px; width: 100%; }
.row-title { font-size: 13px; font-weight: 600; color: white; margin: 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.row-sub { font-size: 11px; margin: 0; margin-top: 2px; color: rgba(255, 255, 255, 0.5); }
.badge-tag { font-size: 9px; padding: 2px 8px; border-radius: 6px; font-weight: 700; text-transform: uppercase; }

.plex-stream-card { display: flex; flex-direction: column; background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
.plex-main-content { display: flex; flex-direction: row; gap: 12px; padding: 12px; }
.plex-cover-box { width: 50px; height: 72px; object-fit: cover; border-radius: 6px; background: rgba(0, 0, 0, 0.5); flex-shrink: 0; }
.plex-info-box { flex-grow: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start; }
.plex-show-title { font-size: 13px; font-weight: 700; color: white; margin: 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.plex-episode-title { font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, 0.8); margin: 2px 0 0 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.plex-season-episode { font-size: 11px; color: rgba(255, 255, 255, 0.5); margin: 2px 0 0 0; }
.plex-user-area { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: auto; width: 100%; }
.plex-user-avatar { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
.plex-user-name { font-size: 11px; color: rgba(255, 255, 255, 0.7); margin: 0; }
.plex-bottom-progress-area { width: 100%; margin-top: 2px; background: rgba(0,0,0,0.2); padding-bottom: 4px; }
.plex-time-row { display: flex; justify-content: space-between; font-size: 10px; color: rgba(255, 255, 255, 0.5); font-family: monospace; padding: 4px 12px 2px 12px; }
.plex-progress-bar { width: 100%; height: 4px; background: rgba(255, 255, 255, 0.1); }
.plex-progress-fill { height: 100%; background: #e5a93b; width: 0%; transition: width 0.5s linear; box-shadow: 0 0 8px rgba(229,160,13,0.8); }
.media-cover-box { width: 36px; height: 50px; object-fit: cover; border-radius: 6px; background: rgba(0, 0, 0, 0.5); flex-shrink: 0; }

/* TeamSpeak Baum Layout (eingefügt in den flexiblen Scroll-Container) */
.ts-tree-container { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.ts-channel-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.02); font-size: 13px; color: #e5e7eb; border: 1px solid rgba(255,255,255,0.03); }
.ts-channel-name { font-weight: 500; flex-grow: 1; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.ts-client-row { display: flex; align-items: center; gap: 8px; padding: 3px 10px 3px 32px; font-size: 12px; color: #22d3ee; }
.ts-client-name { font-weight: 400; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.ts-icon-ch { color: #22d3ee; font-size: 12px; flex-shrink: 0; }
.ts-icon-user { color: #22d3ee; font-size: 11px; flex-shrink: 0; }

footer.main-footer { text-align: center; font-size: 12px; color: rgba(255, 255, 255, 0.4); margin-top: 40px; width: 100%; }

/* Responsives Desktop-Design */
@media (min-width: 900px) {
    body {
        height: 100vh;
        overflow: hidden;
        padding: 2vh 20px;
    }
    header { margin-bottom: 2vh; }
    footer.main-footer { margin-top: 1.5vh; margin-bottom: 0; }
    
    .dashboard-grid { min-height: 0; flex-grow: 1; gap: clamp(12px, 2vh, 24px); align-items: stretch; }
    .dash-col { height: 100%; min-height: 0; gap: clamp(12px, 2vh, 24px); }
    
    .glass-card { padding: clamp(12px, 2.5vh, 24px); min-height: 0; }
    
    .card-top { margin-bottom: clamp(8px, 1.5vh, 16px); }
    .link-footer { margin-top: clamp(8px, 2vh, 24px); padding-top: clamp(8px, 1.5vh, 16px); }
    
    .row-item { padding: clamp(6px, 1vh, 10px) 14px; margin-bottom: clamp(4px, 1vh, 10px); }
    .media-cover-box { height: clamp(35px, 5vh, 50px); width: clamp(25px, 3.5vh, 36px); }
    .plex-stream-card { margin-bottom: clamp(4px, 1vh, 8px); }
    .plex-cover-box { height: clamp(45px, 6vh, 72px); width: clamp(32px, 4vh, 50px); }
    .plex-main-content { padding: clamp(8px, 1.2vh, 12px); }
    
    h1 { font-size: clamp(20px, 3vh, 26px); }
    h2 { font-size: clamp(16px, 2.2vh, 20px); }
    
    .logo-icon, .icon-box {
        width: clamp(36px, 5vh, 48px) !important;
        height: clamp(36px, 5vh, 48px) !important;
        font-size: clamp(16px, 2.2vh, 20px) !important;
    }
}