body {
            font-family: sans-serif;
            line-height: 1.6;
            margin: 20px;
            background-color: #f4f4f4;
        }

        .container {
            max-width: 800px;
            margin: auto;
            background: #fff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }

        h1 {
            text-align: center;
            color: #333;
        }

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

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

        .input-group input[type="text"],
        .input-group input[type="number"],
        .input-group select {
            width: 100%;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 4px;
            box-sizing: border-box; /* Prevents padding from expanding element */
        }

        .input-group input[type="number"] {
            -moz-appearance: textfield; /* Firefox */
        }
        .input-group input[type="number"]::-webkit-outer-spin-button,
        .input-group input[type="number"]::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }


        button {
            display: inline-block;
            background-color: #5cb85c;
            color: white;
            padding: 10px 15px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
            margin-right: 10px;
            transition: 0.3s ease;
        }

        button:hover {
            background-color: #4cae4c;
        }

        button#playLoopBtn {
            background-color: #337ab7;
        }
        button#playLoopBtn:hover {
             background-color: #286090;
        }
        button:disabled {
             background-color: #cccccc;
             cursor: not-allowed;
        }


        #player-container {
            margin-top: 20px;
            margin-bottom: 20px;
            position: relative;
            padding-bottom: 56.25%; /* 16:9 aspect ratio */
            height: 0;
            overflow: hidden;
            background-color: #000; /* Black background while loading */
            border-radius: 4px;
        }

        #player-container iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }

        #error-message {
            color: #d9534f;
            background-color: #f2dede;
            border: 1px solid #ebccd1;
            padding: 10px;
            border-radius: 4px;
            margin-top: 15px;
            display: none; /* Hidden by default */
        }

        .controls-row {
            display: flex;
            gap: 15px; /* Space between items */
            align-items: flex-end; /* Align items at the bottom */
            flex-wrap: wrap; /* Allow wrapping on smaller screens */
        }

        .controls-row .input-group {
            flex: 1; /* Allow inputs/selects to grow */
            min-width: 100px; /* Minimum width for time inputs/select */
        }

        /* Specific styling for the custom loop count input group */
        .controls-row .input-group.loop-count-group {
             flex: 0 1 150px; /* Don't grow much, basis of 150px */
             min-width: 120px;
        }


        .controls-row button {
           margin-top: 28px; /* Adjust as needed to align button vertically */
        }

        @media (max-width: 700px) { /* Adjusted breakpoint slightly */
             .controls-row {
                 flex-direction: column;
                 align-items: stretch; /* Stretch items full width */
                 gap: 10px;
             }
              .controls-row button {
                   margin-top: 10px; /* Reset margin */
                   width: 100%;
              }
             .controls-row .input-group {
                 min-width: unset; /* Remove min-width */
             }
              .controls-row .input-group.loop-count-group {
                 flex-basis: auto; /* Reset flex-basis */
             }
        }