.rounded-box {
    font-family: Montserrat, Arial, sans-serif;
    color: #111;
    font-size: 23px;
    background-color: white;
    background-size: cover;
    background-repeat: no-repeat;
    text-transform: uppercase;
    font-weight: smooth; /* Make text thicker */
    padding: 20px;
    border-radius: 20px; /* Rounded edges */
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.container {
    width: 100%;
    max-width: 850px;
    margin: auto;
    padding: 20px;
    height: 100vh; /* Set container height to 100% viewport height */
}

.card {
    background-color: white;
    border-radius: 20px; /* Rounded edges */
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
    padding: 20px;
    margin-bottom: 20px;
}

#workout-generator {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
}

.form-group {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column; /* Align items vertically */
}

.label {
    font-size: 16px;
    margin-bottom: 8px;
    display: block;
}

select, button {
    width: 100%;
    padding: 15px 20px;
    margin-top: 5px;
    border-radius: 20px; /* Rounded edges */
    border: 1px solid #ccc;
    background-color: #0c0c0c;
    color: #f8f1f1;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold; /* Make text thicker */
}

button:hover {
    background-color: #444;
}

select:focus, button:focus {
    outline: 2px solid #007bff;
}

.timer {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    padding: 10px;
    margin-top: 15px;
    background-color: #e0e0e0;
    border-radius: 10px; /* Rounded edges */
    color: #000;
}

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio (height: 9/16 * width) */
    border-radius: 20px; /* Rounded edges */
    margin-bottom: 20px; /* Add margin to separate from buttons */
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 20px; /* Rounded edges */
}

.generator-content, .buttons-container, .text-below-video {
    position: relative; /* Ensure text and buttons are positioned correctly */
    text-align: center;
    margin-top: 10px; /* Adjust as needed for spacing */
}

.buttons-container .button,
.buttons-container .half-size {
    width: 100%;
    max-width: 350px; /* Adjusted maximum width */
    margin-bottom: 10px;
}

.button {
    display: block;
    border-radius: 0px; /* Adjusted border radius */
}

/* Removed conflicting styles - now using grid layout */

.red {
    color: red;
}

.half-size {
    width: 50%;
    font-size: 16px;
}

.black-button {
    background-color: black;
    color: white;
}

.music-selection select,
#difficulty select {
    background-color: black;
    color: white;
}

.workout-type select,
#difficulty select {
    background-color: black;
    color: white;
}

.small-dropdown, button {
    width: calc(100% - 10px); /* Divide container into three equal parts */
    padding: 15px 20px;
    margin-top: 5px;
    border-radius: 5px;
    border: 0.5px solid #ccc;
    background-color: #0c0c0c;
    color: #f8f1f1;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold; /* Make text thicker */
}

.music-selection {
    margin-right: 10px; /* Add some space between dropdowns */
}

.tts-controls {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tts-controls label {
    font-size: 16px;
    margin-bottom: 8px;
    display: block;
}

.tts-controls input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    transform: scale(1.2);
}

.tts-controls button {
    width: auto;
    padding: 10px 15px;
    font-size: 14px;
}

.voice-selection {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.voice-selection label {
    font-size: 14px;
    margin-bottom: 5px;
    display: block;
}

.voice-selection select {
    width: 100%;
    padding: 10px 15px;
    margin-top: 5px;
    border-radius: 5px;
    border: 0.5px solid #ccc;
    background-color: #0c0c0c;
    color: #f8f1f1;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
}
/* Apply rounded corners to the canvas container */
#chart-container {
    border-radius: 15px;
    overflow: hidden;
}

/* Default state of the canvas might not need a background color */
#round-times-graph {
    display: none; /* Hide canvas by default */
}

@media only screen and (max-width: 600px) {
    .container {
        max-width: 100%; /* Adjusting max-width for mobile devices */
        padding: 20px;
        box-sizing: border-box; /* Include padding in the height */
    }
}

/* Specific adjustments for the complete workout page */
.complete-workout-page .video-container {
    display: none; /* Hide the video container on the complete workout page */
}

.complete-workout-page .text-above-video {
    text-align: center;
    margin-bottom: 20px; /* Ensure text is correctly positioned when video is hidden */
}

#workout-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    padding: 0;
    list-style: none;
    margin: 20px 0;
}

#workout-list li {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 120px;
    justify-content: center;
    border: 2px solid #e0e0e0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#workout-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

#workout-list li img {
    max-width: 60px;
    max-height: 60px;
    margin-bottom: 8px;
    border-radius: 8px;
}

#workout-list li span {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    line-height: 1.3;
    word-wrap: break-word;
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    #workout-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin: 15px 0;
    }
    
    #workout-list li {
        min-height: 80px;
        padding: 8px;
    }
    
    #workout-list li img {
        max-width: 40px;
        max-height: 40px;
        margin-bottom: 4px;
    }
    
    #workout-list li span {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    #workout-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin: 10px 0;
    }
    
    #workout-list li {
        min-height: 70px;
        padding: 6px;
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
    
    #workout-list li img {
        max-width: 35px;
        max-height: 35px;
        margin-right: 0;
        margin-bottom: 4px;
    }
    
    #workout-list li span {
        font-size: 10px;
        flex: none;
    }
}
