* {
    margin: 0;
    padding: 0;
    border-radius: 0;
    outline: 0;
    box-sizing: border-box;
}
body {
    margin: 0 auto;
    padding: 0;
    max-width: 600px;
    font-size: 16px;
    font-family: Arial, Helvetica, sans-serif;
    color: #101010;
    transition: 300ms all ease;
}
a {
    text-decoration: none;
}

hr {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid #eee;
}
header a {
    margin-top: 1em;
    display: flex;
    align-items: center;
}
header a:after {
    margin-left: 5px;
    content: "";
    width: 100%;
    height: 5px;
    display: inline-block;
    background: linear-gradient(45deg, #7ac000 80%,transparent);
}

h1 {
    margin-top: .5em;
    margin-bottom: 1em;
    text-align: center;
}
h4 {
    /* margin-bottom: 1em; */
    padding-bottom: 1em;
    border-bottom: 1px solid #eee;
}
h4 {
    display: flex;
    justify-content: space-between;
}
h4 div {
    display: flex;
}
h4 div p {
    margin-left: 1em;
    font-size: small;
}
h4 i {
    margin-left: 0.5em;
    padding: 2px 6px;
    font-style: normal;
    font-weight: normal;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form {
    text-align: center;
}
.form-check {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.8em;
}
.double-check {
    padding: 12px 14px;
    margin-top: 0.5em;
    background: #fbfbfb;
    border-radius: 14px;
    color: #e00606;
    display: none;
}
.double-check b {
    display: block;
    margin-top: 0.5em;
}

section.list {
    display: flex;
    flex-direction: column;
}

.list ul {
    padding-top: .5em;
    padding-bottom: 1em;
    height: 40vh;
    overflow: scroll;
    overflow-x: auto;
    list-style: none;
    mask-image: linear-gradient( to bottom, transparent, #000 4%, #000 95%, transparent)
}
.list ul li {
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f1f1;
}
.list ul li:last-child {
    margin-bottom: 1em;
}
.list li b {
    display: flex;
    color: #cd0000;
    align-items: center;
}
.list li b i {
    margin-left: .5em;
    padding: 4px 8px;
    background: #ffeec0;
    color: #964b00;
    font-size: 12px;
    font-style: normal;
    border-radius: 4px;
}
.list li b {
    margin-right: 1em;
}
.list li span.highlights {
    color: #e00606;
}
.list li .unWon {
    color: #888;
}

input[type="text"], input[type="password"], select {
    padding: 10px 14px;
    height: 40px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    background: #fff !important;
    font-family: Arial, Helvetica, sans-serif;
    transition: .3s all ease;
    color: #101010;
}
select {
    width: 50%;
}
input[type="text"] {
    width: 100%;
}
input[type="text"]:focus, input[type="password"]:focus, select:focus {
    border-color: #101010;
}

footer {
    text-align: right;
    font-size: smaller;
    color: #888;
}
footer a {
    color: #888;
}
input[type="submit"] {
    padding: 10px 14px;
    min-height: 40px;
    color: #fff;
    background: #101010;
    border: 1px solid #101010;
    border-radius: 4px;
    font-family: Arial, Helvetica, sans-serif;
    cursor: pointer;
}
.adm {
    text-align: center;
}
form.adm-form div {
    margin-bottom: 1em;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}
.msg-box {
    margin-bottom: 1em;
    padding: 12px 14px;
    background: #fbfbfb;
    border: 1px solid #eee;
    border-radius: 4px;
    text-align: center;
}
.msg-box.ok {
    background: #e7f4ff;
    border: 1px solid #add9ff;
}
.msg-box.error{
    background: #ffe7e7;
    border: 1px solid #ffadad;
}

/* 自動更新區塊樣式 */
.auto-update-section {
    margin-bottom: 2em;
    padding: 1.5em;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.auto-update-section h3 {
    margin-bottom: 0.5em;
    color: #495057;
}

.auto-update-section p {
    margin-bottom: 1em;
    color: #6c757d;
    font-size: 0.9em;
}

.auto-update-btn {
    background: #28a745 !important;
    border-color: #28a745 !important;
    font-weight: bold;
    transition: all 0.3s ease;
}

.auto-update-btn:hover {
    background: #218838 !important;
    border-color: #1e7e34 !important;
}

.manual-add-section h3 {
    margin-bottom: 1em;
    color: #495057;
}

/* 自動更新狀態提示樣式 */
.update-status {
    margin: 1em 0;
    padding: 12px 16px;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9em;
    animation: fadeIn 0.3s ease-in;
}

.update-status.info {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    color: #1565c0;
}

.update-status.success {
    background: #e8f5e8;
    border: 1px solid #81c784;
    color: #2e7d32;
}

.update-status.warning {
    background: #fff3e0;
    border: 1px solid #ffb74d;
    color: #ef6c00;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media screen and (max-width: 700px) {
    body {
        padding: 0 20px;
    }
}