/* 尾牙姓名查詢 - 配色參考 https://www.staubli.com/global/zh/home.html（深青綠＋白＋深灰） */
:root {
    /* 主色：官網 header 深青綠/Teal */
    --staubli-teal: #2a7e87;
    --staubli-teal-dark: #226269;
    /* 文字與背景：白底、深灰文字 */
    --staubli-gray: #1e1e1e;
    --staubli-gray-light: #5c5c5c;
    --staubli-bg: #f5f5f5;
    --staubli-white: #ffffff;
    --staubli-border: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', 'Inter', -apple-system, sans-serif;
    min-height: 100vh;
    background: var(--staubli-bg);
    color: var(--staubli-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 520px;
}

.card {
    background: var(--staubli-white);
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid var(--staubli-border);
}

.header {
    background: var(--staubli-teal);
    color: white;
    padding: 36px 28px;
    text-align: center;
}

.logo {
    font-size: 48px;
    margin-bottom: 12px;
    line-height: 1;
}

h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.subtitle {
    font-size: 14px;
    opacity: 0.95;
}

.search-box {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#searchInput {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 1px solid var(--staubli-border);
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    background: var(--staubli-white);
}

#searchInput:focus {
    border-color: var(--staubli-teal);
    box-shadow: 0 0 0 3px rgba(42, 126, 135, 0.15);
}

#searchInput::placeholder {
    color: #999;
}

#searchBtn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: var(--staubli-teal);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
}

#searchBtn:hover {
    background: var(--staubli-teal-dark);
    box-shadow: 0 4px 12px rgba(42, 126, 135, 0.3);
    transform: translateY(-1px);
}

#searchBtn:active {
    transform: translateY(0);
}

.result {
    padding: 0 28px 28px;
}

.result.hidden {
    display: none;
}

.result-success, .result-error {
    text-align: center;
    padding: 24px;
    border-radius: 6px;
    animation: fadeIn 0.3s ease;
}

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

.result-success {
    background: #f8f8f8;
    border: 1px solid var(--staubli-border);
}

.result-error {
    background: #fff8f0;
    border: 1px solid #e8d0b0;
}

.result-success.hidden, .result-error.hidden,
.result-single.hidden, .result-list.hidden {
    display: none;
}

.result-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

/* 單一結果 */
.result-single .result-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--staubli-gray);
    margin-bottom: 16px;
}

.result-seat {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.result-seat .label {
    font-size: 13px;
    color: var(--staubli-gray-light);
}

.table-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--staubli-teal);
}

/* 多人同名：列表 */
.result-list {
    text-align: left;
}

.result-list-title {
    font-size: 14px;
    color: var(--staubli-gray-light);
    margin-bottom: 14px;
}

.result-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--staubli-white);
    border: 1px solid var(--staubli-border);
    border-radius: 6px;
    margin-bottom: 10px;
}

.result-list-item:last-child {
    margin-bottom: 0;
}

.result-list-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--staubli-gray);
}

.result-list-table {
    font-size: 16px;
    font-weight: 600;
    color: var(--staubli-teal);
}

.error-message {
    font-size: 15px;
    color: #8a6d3b;
}

.footer {
    padding: 18px 28px;
    text-align: center;
    border-top: 1px solid var(--staubli-border);
    color: var(--staubli-gray-light);
    font-size: 13px;
}

@media (max-width: 400px) {
    .header {
        padding: 28px 20px;
    }
    h1 {
        font-size: 20px;
    }
    .search-box {
        padding: 20px;
    }
    .table-number {
        font-size: 28px;
    }
    .result-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}
