* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f0f0f0;
    text-align: center;
}

header {
    background-image: url('背景.jpg');
    background-size: cover;
    background-position: center;
    padding: 60px 0;
    color: #333;
    height: 150px;
}

header h1 {
    font-size: 50px;
    color: #1a0a40;
    font-weight: 800;
}

nav {
    background-color: #4b6769;
    padding: 10px;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

nav ul li a.active {
    color: rgb(255, 237, 147);
}

main {
    padding: 20px;
}

.draw-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.draw-section {
    text-align: left;
    width: 500px;
}


.draw-section h3 {
    width: 200px;
    font-size: 28px;
    color: #4a4a4a;
    margin-bottom: 0; /* 將底部邊距設置為0，防止影響行高 */
}

.draw-section textarea {
    width: 500px;
    height: 330px;
    border: 2px solid #b5b5b5;
    border-radius: 8px;
    padding: 10px;
    background-color: #f9f9f9;
    resize: none;
    font-size: 18px;
}

.draw-section p {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

.import-button {
    background-color: #8bc34a;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    transition: background-color 0.3s;
    margin-top:10px ;
    
}

.import-button:hover {
    background-color: #7ba93d;
}


.import-button[title]::after {
    content: attr(title);
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    top: -35px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.1s;
}

.import-button:hover[title]::after {
    opacity: 1;
}

.action-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.clear-button, .start-button {
    background-color: #c44b26;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.start-button {
    background-color: #57ae5a;
}

.clear-button:hover {
    background-color: #6a270e;
}

.start-button:hover {
    background-color: #1a541d;
}

.name-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 2px;
}

.video-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* 半透明背景 */
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.video-popup video {
    width: 80%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

 /* 影片容器的基本樣式 */
#videoContainer {
    text-align: center;
    margin-top: 20px;
}

#popupVideo {
    width: 80%; /* 設定影片大小 */
    max-width: 1500px;
    height: auto;
}

.hidden {
    display: none;
}

.modal2 {
    display: none; /* 預設隱藏 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

/* 視窗內容 */
.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    font-size: 22px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.modal h2 {
    font-size: 30px;
    color: #333;
    margin-bottom: 10px;
}


.modal p {
    font-size: 18px;
    margin: 10px 0;
}

#closeModalBtn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    margin-top: 20px;
}

#closeModalBtn:hover {
    background-color: #45a049;
}

#winnerList {
    max-height: 300px;
    overflow-y: auto;
    text-align: left;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    border-radius: 5px;
}

#downloadCsv {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    margin-top: 20px;
}

#downloadCsv:hover {
    background-color: #45a049;
}

/* 獎項與中獎名單外框 */
.winner-item {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fdfdfd;
}

/* 獎項名稱樣式 */
.prize {
    font-size: 20px;
    color: #333;
    font-weight: bold;
    margin-bottom: 10px;
}

/* 中獎者清單樣式 */
.winner-names {
    padding-left: 20px;
    list-style: disc;
}

.winner-names li {
    font-size: 18px;
    color: #555;
    line-height: 1.5;
}

/* 滾動樣式改進 */
#winnerList {
    max-height: 300px;
    overflow-y: auto;
    background-color: #f9f9f9;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}