body {
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #f4f7f6, #e9ecef);
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.register-container {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
}

.register-card {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    height: 40px;
    margin-bottom: 10px;
}

h2 {
    margin: 0;
    color: #333;
    font-size: 28px;
    font-weight: 600;
}

.date-time {
    position: absolute;
    top: 10px;
    right: 10px;
}

#date2, #clock2 {
    font-size: 14px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-left: 5px;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    text-align: left;
}

.label {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
    color: #555;
    font-weight: 500;
}

.input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

.submit-btn {
    background-color: #4CAF50;
    color: white;
    padding: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #45a049;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.cancel-btn {
    background-color: #f44336;
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.cancel-btn:hover {
    background-color: #da190b;
}

.about-link {
    color: #205bfe;
    text-decoration: none;
    font-size: 14px;
}

.about-link:hover {
    color: #1747c4;
    text-decoration: underline;
}

.footer-text {
    margin-top: 10px;
    font-size: 12px;
    color: #777;
    line-height: 1.5;
    text-align: center;
}

/* 響應式設計 */
@media (max-width: 600px) {
    .register-card { width: 90%; padding: 20px; }
    .logo { height: 30px; }
    h2 { font-size: 24px; }
    .input, .submit-btn, .cancel-btn { font-size: 14px; padding: 10px; }
    .label { font-size: 14px; }
    #date2, #clock2 { font-size: 12px; }
}

/* 暗黑模式 */
body.dark-mode {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
}

body.dark-mode .register-card {
    background: #2d2d2d;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

body.dark-mode h2 { color: #fff; }
body.dark-mode .label { color: #ddd; }
body.dark-mode .input {
    background-color: #444;
    border-color: #666;
    color: #fff;
}
body.dark-mode .input:focus {
    border-color: #5A67D8;
    box-shadow: 0 0 5px rgba(90, 103, 216, 0.3);
}
body.dark-mode .submit-btn { background-color: #5A67D8; }
body.dark-mode .submit-btn:hover { background-color: #4a5bc4; }
body.dark-mode .footer-text { color: #aaa; }
body.dark-mode #date2, body.dark-mode #clock2 {
    background: rgba(255, 255, 255, 0.8);
    color: #121212;
}

.input-group {
    text-align: left;
    margin: 15px 0; /* 增加間距，使布局更美觀 */
}

.label {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
    color: #555;
    font-weight: 500;
}

.input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

/* 暗黑模式下的輸入框樣式 */
body.dark-mode .input {
    background-color: #444;
    border-color: #666;
    color: #fff;
}

body.dark-mode .input:focus {
    border-color: #5A67D8;
    box-shadow: 0 0 5px rgba(90, 103, 216, 0.3);
}

/* 載入動畫容器 */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-content {
    background: white; /* 預設亮色背景 */
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    line-height: 1.5; /* 增加行距 */
    margin: 0; /* 移除預設外邊距 */
}
.loading-content a:hover {
    text-decoration: none; /* 懸停時移除下劃線，保持乾淨 */
}

.password-container {
    position: relative;
    width: 100%;
}

.password-container input {
    width: 100%;
    padding-right: 40px; /* 留空間給眼睛圖示 */
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    font-size: 16px;
}

/* 暗黑模式調整 */
body.dark-mode .password-toggle {
    color: #ccc; /* 暗黑模式下圖示顏色 */
}