body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: #000;
    color: #fff;
}

h2 img {
    max-width: 100%;
}

.header-container {
    height: 110px;
}

.dashboard {
    position: relative;
}

.dancing-status {
    padding: 10px;
    margin: 10px 0;
    text-align: center;
    font-weight: bold;
    border-radius: 5px;
}

.dancing {
    background-color: #90EE90;
    color: #006400;
}

.not-dancing {
    background-color: #FFB6C1;
    color: #8B0000;
}

/* Loading Animation Styles */
.loader {
    display: none;
    width: 48px;
    height: 48px;
    border: 5px solid #f3f3f3;
    border-radius: 50%;
    border-top: 5px solid #e1472b;
    animation: spin 1s linear infinite;
    margin: 20px auto;
    position: absolute;
    top: 7px;
    left: 50%;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#connectButton {
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    background-color: #e1472b;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

#connectButton:disabled {
    background-color: #333;
    cursor: not-allowed;
    opacity: 0.7;
}

#connectButton.connecting {
    background-color: #7d7d7d;
}

.progress-container {
    width: 100%;
    background-color: #eee;
    border-radius: 4px;
    overflow: hidden;
    height: 20px;
    position: relative;
    bottom: 21px;
    z-index: 1;
}

.progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease-in-out;
    position: relative;
}

.progress-label {
    position: absolute;
    width: 100%;
    text-align: center;
    color: white;
    font-weight: bold;
    line-height: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.dancing .progress-bar {
    background-color: #2ecc71;  /* Bright green */
}

.not-dancing .progress-bar {
    background-color: #e74c3c;  /* Bright red */
}

.devices-container {
    background: #333;
    padding: 20px 10px 0;
    border-radius: 5px;
}
.devices-container::after {
    content: "";
    display: block;
    clear: both;
}
.device-card {
    width: 400px;
    position: relative;
    float: left;
    margin-right: 15px;
    height: 40px;
}
@media (max-width: 890px) {
    .device-card {
        width: 100%;
        float: none;
        margin-right: 0;
    }
    .header-container h2 {
        max-width: 50%;
    }
}

.device-card.disconnected {
    opacity: 0.7;
}

.device-card.disconnected::before {
    content: "Verbindung verloren - Verbinde neu...";
    position: absolute;
    top: 0;
    left: -5px;
    /* transform: translate(-50%, -50%); */
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 5px;
    border-radius: 5px;
    z-index: 200;
    width: 100%;
    font-size: 14px;
    text-align: center;
}

.device-name {
    color: #333;    
}

.score-value {
    color: #333;
}    

#connectButton {
    background-color: #e1472b;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    position: absolute;
    right: 0;
    top: 0;
}

.progress-metadata {
    display: flex;
    justify-content: space-between;
    margin: 5px 5px 3px;
    color: #333;
    font-size: 14px;
    position: relative;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
}

.header-container h2 {
    margin: 0 0 10px;
}

.community-score {
    background: #333;
    border-radius: 5px;
    padding: 5px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    position: absolute;
    right: 0;
    top: 55px;
}

.community-score-label {
    color: #ccc;
    font-size: 1em;
}

#communityScore {
    color: #FFC107;
    font-size: 1.8em;
    font-weight: bold;
}