* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: #1a1a2e;
    color: #eee;
    height: 100vh;
    overflow: hidden;
}

/* Login-Seite */
#login-seite {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-box {
    background: #16213e;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.login-box h1 {
    margin-bottom: 20px;
    font-size: 24px;
}

.login-box input {
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #0f3460;
    border-radius: 8px;
    background: #1a1a2e;
    color: #eee;
    width: 250px;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.login-box button {
    padding: 12px 30px;
    font-size: 16px;
    background: #e94560;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.login-box button:hover {
    background: #c73650;
}

.fehler {
    color: #e94560;
    margin-top: 10px;
}

/* Dashboard */
#dashboard {
    display: none;
    height: 100vh;
    flex-direction: column;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: #16213e;
    border-bottom: 1px solid #0f3460;
}

.header h1 {
    font-size: 20px;
}

.header-rechts {
    display: flex;
    align-items: center;
    gap: 15px;
}

.shutdown-btn {
    padding: 6px 14px;
    background: #e94560;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.shutdown-btn:hover {
    background: #c73650;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.status-punkt {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4caf50;
}

.status-punkt.getrennt {
    background: #e94560;
}

/* Agent-Kacheln */
.agent-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.agent-kachel {
    background: #16213e;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 320px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.agent-kachel:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

.agent-kachel h3 {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-kachel .thumbnail {
    width: 100%;
    border-radius: 8px;
    background: #2a3a5e;
    aspect-ratio: 16/9;
    object-fit: contain;
}

.agent-kachel .info {
    margin-top: 8px;
    font-size: 12px;
    color: #888;
}

.keine-agents {
    text-align: center;
    color: #666;
    font-size: 18px;
    margin-top: 100px;
    width: 100%;
}

/* Fernsteuerung */
#fernsteuerung {
    display: none;
    height: 100vh;
    flex-direction: column;
}

.toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 15px;
    background: #16213e;
    border-bottom: 1px solid #0f3460;
}

.toolbar button {
    padding: 6px 12px;
    background: #0f3460;
    color: #eee;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.toolbar button:hover {
    background: #1a4a8a;
}

.toolbar .agent-name {
    font-weight: bold;
    font-size: 16px;
}

.toolbar .spacer {
    flex: 1;
}

.screen-und-explorer {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.screen-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0a0a1a;
    overflow: hidden;
    position: relative;
}

#screen-bild {
    max-width: 100%;
    max-height: 100%;
    cursor: crosshair;
    image-rendering: auto;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: auto;
}

/* Datei-Explorer */
.datei-explorer {
    width: 350px;
    background: #16213e;
    border-left: 1px solid #0f3460;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.datei-explorer.versteckt {
    display: none;
}

.explorer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #0f3460;
}

.schliessen-btn {
    background: none;
    border: none;
    color: #e94560;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
}

.explorer-pfad {
    padding: 8px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid #0f3460;
    font-size: 12px;
}

.explorer-pfad button {
    background: #0f3460;
    color: #eee;
    border: none;
    border-radius: 4px;
    padding: 3px 8px;
    cursor: pointer;
    font-size: 12px;
}

.explorer-pfad button:hover {
    background: #1a4a8a;
}

.explorer-liste {
    flex: 1;
    overflow-y: auto;
    padding: 5px 0;
}

.explorer-eintrag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 15px;
    cursor: pointer;
    font-size: 13px;
}

.explorer-eintrag:hover {
    background: #0f3460;
}

.explorer-eintrag .icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.explorer-eintrag .name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.explorer-eintrag .groesse {
    color: #888;
    font-size: 11px;
    white-space: nowrap;
}

/* Zwischenablage-Popup */
.zwischenablage-popup {
    position: fixed;
    bottom: 70px;
    right: 20px;
    width: 380px;
    background: #16213e;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 500;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.zwischenablage-popup.versteckt {
    display: none;
}

.zwischenablage-popup textarea {
    width: 100%;
    height: 150px;
    padding: 12px 15px;
    background: #1a1a2e;
    color: #eee;
    border: none;
    border-bottom: 1px solid #0f3460;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-size: 14px;
    resize: vertical;
}

.zwischenablage-popup textarea:focus {
    outline: none;
    background: #1e1e36;
}

.zwischenablage-buttons {
    display: flex;
    gap: 8px;
    padding: 10px 15px;
}

.zwischenablage-buttons button {
    flex: 1;
    padding: 8px 12px;
    background: #0f3460;
    color: #eee;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.zwischenablage-buttons button:hover {
    background: #1a4a8a;
}

/* Datei-Upload */
.upload-bereich {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(233, 69, 96, 0.3);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    font-size: 28px;
    font-weight: bold;
    pointer-events: none;
}

.upload-bereich.aktiv {
    display: flex;
}

/* Upload-Fortschritt */
.upload-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #16213e;
    padding: 15px 20px;
    border-radius: 8px;
    display: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
