body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 90%;
    width: 100%;
}

.container2 {
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 90%;
    width: 100%;
}
/* 投票頁面 */
.vote-page .container {
    max-width: 100%; /* 讓投票頁面佔滿整個寬度 */
    padding: 40px 10%; /* 增加左右留白 */
    border-radius: 0; /* 移除圓角 */
}

h1, h2 {
    text-align: center;
    color: #004d40;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

h2 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1rem;
    color: #00796b;
}

input[type="text"], select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

input[type="text"]:focus, select:focus {
    outline: none;
    border-color: #009688;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.checkbox-group label {
    font-weight: normal;
    font-size: 1rem;
    margin-bottom: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.checkbox-group label:hover {
    background-color: #e0f2f1;
}

input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
}

button[type="submit"] {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #009688;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

button[type="submit"]:hover {
    background-color: #00796b;
}

button[type="submit"]:active {
    transform: translateY(2px);
}

.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    display: none;
}

.message.success {
    background-color: #e8f5e9;
    color: #388e3c;
    border: 1px solid #a5d6a7;
}

.message.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.results-page {
    padding: 20px;
    background-image: url('resultbg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* Results Page Styles */
.results-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}

#results-container {
    flex: 7; /* 讓長條圖佔據 70% 的可用空間 */
    flex-grow: 1;
}

.bar-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.stall-name {
    width: 150px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-bg {
    flex-grow: 1;
    height: 25px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin-left: 20px;
    position: relative;
    overflow: hidden;
}

.bar {
    height: 100%;
    background-color: #009688;
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}

.qr-section {
    flex: 1; /* 讓 QR Code 佔據 30% 的可用空間 */
    text-align: center;
    flex-shrink: 0;
}

.qr-section p {
    font-size: 1.1rem;
    font-weight: bold;
}

.qr-code {
    width: 70%;
    height: 70%;
    border: 5px solid #009688;
    border-radius: 8px;
    display: block;
    margin: 15px auto 0;
}

.results-link {
    display: block;
    margin-top: 20px;
    text-align: center;
    color: #00796b;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.results-link:hover {
    color: #004d40;
    text-decoration: underline;
}