body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
}

.header {
    background-color: #8b0000e6; /* Hauptfarbe */
    color: white;
    padding: 10px 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header img {
    height: 50px;
    margin-right: 20px;
}

.menu {
    display: flex;
    justify-content: center;
    background-color: rgba(139, 0, 0, 0.9); /* Hauptfarbe */
    flex-wrap: wrap;
}

.menu a {
    padding: 14px 20px;
    display: block;
    color: white;
    text-align: center;
    text-decoration: none;
    flex: 1 1 auto;
}

.menu a:hover {
    background-color: rgba(139, 0, 0, 0.7); /* Etwas hellere Hauptfarbe */
}

/* Dropdown Menü */
.dropdown {
    position: relative;
    display: inline-block;
    flex: 1 1 auto;
}

.dropdown .dropbtn {
    padding: 14px 20px;
    display: block;
    color: white;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.dropdown:hover .dropbtn {
    background-color: rgba(139, 0, 0, 0.7);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(139, 0, 0, 0.95);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: rgba(139, 0, 0, 0.7);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.content {
    padding: 20px;
}

.admin-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 900px;
    width: 100%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin: 20px auto; /* Zentriert die Box horizontal */
}

.admin-box h1 {
    color: rgba(139, 0, 0, 0.9); /* Hauptfarbe */
}

.admin-box form input[type="text"],
.admin-box form input[type="file"],
.admin-box form input[type="number"],
.admin-box form input[type="time"],
.admin-box form input[type="datetime-local"],
.admin-box form select {
    width: 20%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.admin-box form input[type="submit"] {
    width: 100%;
    padding: 10px;
    background-color: rgba(139, 0, 0, 0.9); /* Hauptfarbe */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.admin-box form input[type="submit"]:hover {
    background-color: rgba(139, 0, 0, 0.7); /* Etwas hellere Hauptfarbe */
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #ccc;
}

th, td {
    padding: 8px 5px;
    text-align: left;
    font-size: 12px; /* Kleinere Schriftgröße */
}

th {
    background-color: rgba(139, 0, 0, 0.9); /* Hauptfarbe */
    color: white;
}

img, video {
    max-width: 60px; /* Kleinere Vorschau */
    height: auto;
}

th, td {
    min-width: 60px; /* Kleinere Mindestbreite */
}

td:nth-child(3), /* Screen */
td:nth-child(4), /* Reihenfolge */
td:nth-child(9)  /* Dauer */ {
    min-width: 50px;
    text-align: center;
}

.screen-links {
    margin-top: 20px;
    padding: 10px;
    background-color: rgba(139, 0, 0, 0.1); /* Sehr helle Hauptfarbe */
    border-radius: 5px;
}

.screen-links a {
    margin: 5px 0;
    padding: 5px 0;
    word-break: break-all;
    display: block;
    color: #8b0000e6; /* Hauptfarbe */
    text-decoration: none;
}

.screen-links a:hover {
    text-decoration: underline;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.grid-item {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
    font-size: 12px;
    cursor: pointer;
    position: relative;
}

.available-modules {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.available-module {
    width: 80px;
    height: 40px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    cursor: pointer;
    text-align: center;
    line-height: 40px;
    font-size: 12px;
}

.module-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
}

.module-controls button {
    font-size: 10px;
    padding: 2px 5px;
}

.settings-button {
    position: absolute;
    top: 30px;
    right: 5px;
    font-size: 10px;
    padding: 2px 5px;
}

.move-left, .move-right {
    position: absolute;
    top: 20%;
    transform: translateY(-50%);
    font-size: 10px;
    padding: 2px 5px;
}

.move-left {
    left: 5px;
}

.move-right {
    right: 5px;
}
h1, h2 {
    font-size: 24px;
}
p {
    font-size: 16px;
}
.fb-login-button {
    display: inline-block;
    padding: 10px 20px;
    margin: 10px 0;
    background-color: #4267B2;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
}
.popup-button {
    background-color: #8b0000e6;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.token-display {
    word-wrap: break-word;
    word-break: break-all;
    background-color: #f9f9f9;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    white-space: pre-wrap;
}
.login-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 250px; /* Schmaler als .admin-box */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin: 100px auto; /* Zentriert die Box horizontal und fügt vertikalen Abstand hinzu */
    text-align: center; /* Zentriert den Text */
}

.login-box h1 {
    color: rgba(139, 0, 0, 0.9); /* Hauptfarbe */
}

.login-box form input[type="text"],
.login-box form input[type="password"] {
    width: 90%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.login-box form input[type="submit"],
.login-box a.popup-button {
    width: 100%;
    padding: 10px;
    background-color: rgba(139, 0, 0, 0.9); /* Hauptfarbe */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
}

.login-box form input[type="submit"]:hover,
.login-box a.popup-button:hover {
    background-color: rgba(139, 0, 0, 0.7); /* Etwas hellere Hauptfarbe */
}

.error-message {
    color: red;
    margin-bottom: 10px;
}
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
    padding-top: 60px;
}
.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 5px;
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.video-container {
    margin-top: 20px;
    text-align: center;
}
.update-log {
    margin-top: 20px;
}
.update-log ul {
    list-style-type: none;
    padding: 0;
}
.update-log li {
    background: #f9f9f9;
    margin: 5px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}
.form-row {
    display: flex;
    align-items: center;
    gap: 10px; /* Abstand zwischen den Elementen */
}
.form-row label {
    margin-right: 10px;
}
.form-row input[type="text"] {
    flex: 1;
}
.toggle-container {
    border: 0px solid #ccc;
    padding: 10px;
    width: 900px;
    margin: 20px auto;
    border-radius: 5px;
}
.toggle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: #8b0000e6;
    color: white;
    padding: 10px;
    border-radius: 5px;
}
.toggle-content {
    display: none;
    padding: 10px;
    background: #f9f9f9;
    border-top: 1px solid #ccc;
}
.arrow {
    transition: transform 0.3s ease;
}

/* Custom Screen Admin Styles */
:root {
    --timeline-height: 120px;
    --timeline-background: #f5f5f5;
    --timeline-border: #ddd;
    --active-tab: #4CAF50;
    --hover-color: #e9e9e9;
}



.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
}

/* Tabs for Custom Screens */
.screens-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.screen-tab {
    padding: 10px 20px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    margin-right: 5px;
    margin-bottom: 5px;
    border-radius: 5px 5px 0 0;
    background: #f1f1f1;
    transition: all 0.2s;
}

.screen-tab:hover {
    background: var(--hover-color);
}

.screen-tab.active {
    background: white;
    border-color: #ddd;
    border-bottom-color: white;
    color: var(--active-tab);
    font-weight: bold;
}

.screen-content {
    display: none;
}

.screen-content.active {
    display: block;
}

/* Layout Selector */
.layout-selector {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f8f8;
    border-radius: 5px;
    display: flex;
    align-items: center;
}

.layout-selector label {
    margin-right: 15px;
    font-weight: bold;
}

.layout-option {
    cursor: pointer;
    padding: 5px 10px;
    border: 1px solid #ddd;
    margin-right: 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.layout-option:hover {
    background: var(--hover-color);
}

.layout-option.selected {
    background: var(--active-tab);
    color: white;
    border-color: var(--active-tab);
}

/* Timeline Container */
.timeline-container {
    margin-bottom: 30px;
}

.timeline {
    height: var(--timeline-height);
    background: var(--timeline-background);
    border: 1px solid var(--timeline-border);
    position: relative;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 0;
    max-width: 100%;
}

.timeline-label {
    font-weight: bold;
    margin-bottom: 5px;
}

/* Timeline scale */
.timeline-scale {
    height: 20px;
    background: white;
    border-top: 1px solid #ddd;
    display: flex;
    position: relative;
    overflow-x: auto;
    max-width: 100%;
}

.time-marker {
    position: absolute;
    font-size: 10px;
    color: #666;
    top: 2px;
}

/* Module on timeline */
.timeline-module {
    position: absolute;
    height: 80px;
    top: 10px;
    border-radius: 4px;
    padding: 5px;
    cursor: pointer;
    color: white;
    z-index: 2;
    overflow: hidden;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.timeline-module:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.timeline-module .module-title {
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 4px;
}

.timeline-module .module-duration {
    font-size: 10px;
    opacity: 0.8;
}

.timeline-module .handle {
    position: absolute;
    width: 10px;
    height: 100%;
    top: 0;
    background: rgba(255,255,255,0.3);
    cursor: col-resize;
}

.timeline-module .handle-left {
    left: 0;
}

.timeline-module .handle-right {
    right: 0;
}

.timeline-module .module-controls {
    position: absolute;
    top: 5px;
    right: 5px;
}

.timeline-module .module-controls button {
    background: rgba(0,0,0,0.3);
    border: none;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    cursor: pointer;
    margin-left: 3px;
}

.timeline-module .module-controls button:hover {
    background: rgba(0,0,0,0.5);
}

/* Module Toolbox */
.modules-toolbox {
    border: 1px solid #ddd;
    padding: 15px;
    background: white;
    border-radius: 5px;
    margin-bottom: 20px;
}

.module-item {
    display: inline-block;
    width: 100px;
    height: 60px;
    margin: 5px;
    border-radius: 4px;
    color: white;
    text-align: center;
    padding: 10px 5px;
    cursor: grab;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.module-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.module-item i {
    font-size: 20px;
    margin-bottom: 5px;
}

/* Module Editor */
.module-editor {
    border: 1px solid #ddd;
    padding: 15px;
    margin-top: 20px;
    border-radius: 5px;
    background: white;
    display: none;
}

.module-editor.active {
    display: block;
}

.editor-title {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input[type="number"],
.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Action buttons */
.action-buttons {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--active-tab);
    color: white;
}

.btn-primary:hover {
    background: #45a049;
}

.btn-secondary {
    background: #f1f1f1;
    color: #333;
}

.btn-secondary:hover {
    background: #ddd;
}

/* Screen Links */
.screen-links {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.screen-link-btn {
    display: inline-block;
    margin: 5px 10px 5px 0;
    padding: 10px 15px;
    background: #4a76a8;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.screen-link-btn:hover {
    background: #3d6293;
    transform: translateY(-2px);
}

/* Split screen layout - Now stacked vertically */
.split-timelines {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.split-timeline {
    width: 100%;
}