body {
    margin: 0;
    display: flex;
    flex-direction: column; /* 垂直方向に要素を並べる */
    align-items: center; /* 水平方向の中央揃え */
    min-height: 100vh;
    background-color: #f0f0f0;
    font-family: Arial, sans-serif;
}

.container {
    position: relative;
    width: 100%;
    max-width: 600px; /* スマートフォンでの表示を考慮 */
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#videoElement {
    width: 100%;
    height: auto;
    display: block;
    flex-grow: 1; /* 残りのスペースを埋める */
}

#videoElement {
    width: 100%;
    height: auto;
    display: block;
}

.overlay {
    position: absolute;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 半透明の背景 */
    color: white;
    padding: 5px 10px;
    box-sizing: border-box;
    font-size: 1.2em;
    text-align: left;
    z-index: 10; /* 動画の上に表示 */
}

.top-overlay {
    top: 0;
}

.bottom-overlay {
    bottom: 0;
}

.controls {
    display: flex;
    justify-content: center;
    padding: 10px;
    gap: 10px;
}

button {
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    color: white;
}

#startButton {
    background-color: #28a745; /* 緑色 */
}

#startButton:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

#stopButton {
    background-color: #dc3545; /* 赤色 */
}

#stopButton:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

#downloadLink {
    display: block;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    background-color: #007bff; /* 青色 */
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

#downloadLink:hover {
    background-color: #0056b3;
}
