* {
    margin: 0;
    padding: 0;
    list-style: none;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100vh;
    font-family: 'Microsoft JhengHei', '微軟正黑體', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
}

.wrap {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.inp_box {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
    width: 100%;
    margin-bottom: 20px;
}

.inp_box_name {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.inp_box>span {
    width: 72px;
}

.inp_box>span,
.inp_box>button {
    flex: none;
}

.search_inp {
    padding: 16px 24px;
    border-radius: 50px;
    border: 2px solid #e0e0e0;
    font-size: 24px;
    outline: none;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.search_inp:focus {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.search_inp::placeholder {
    color: #aaa;
}

.search_btn {
    overflow: visible;
    position: relative;
    border: 0;
    padding: 16px 40px;
    cursor: pointer;
    color: #fff;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50px;
    font-size: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.search_btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.search_btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.all_btn {
    margin-top: 10px;
    background: linear-gradient(135deg, #32CD32 0%, #228B22 100%);
    box-shadow: 0 4px 15px rgba(50, 205, 50, 0.4);
}

.all_btn:hover {
    box-shadow: 0 8px 25px rgba(50, 205, 50, 0.6);
}

.all_btn:active {
    box-shadow: 0 4px 15px rgba(50, 205, 50, 0.4);
}


.all-winners {
    margin-top: 15px;
    text-align: left;
}

.winner-item {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    color: #333;
}

.winner-item:last-child {
    border-bottom: none;
}

#show {
    font-size: 20px;
    margin-top: 8px;
    padding: 10px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 16px;
    animation: fadeIn 0.5s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    line-height: 1.3;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#show:empty {
    display: none;
}

.name {
    color: #333;
    margin: 1px 0;
    text-align: center;
}

.name b {
    color: #764ba2;
    font-size: 22px;
}

.name:first-child b {
    font-size: 28px;
    color: #ff0000;
    text-shadow: 2px 2px 4px rgba(255, 0, 0, 0.3);
}

.prize-info {
    color: #333;
    margin: 2px 0;
    text-align: left;
}

.prize-info b {
    color: #764ba2;
    font-size: 22px;
}

.name a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.name a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.not-drawn {
    font-size: 32px;
    font-weight: bold;
    color: #ff6b6b;
    text-align: center;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(255, 107, 107, 0.3);
}

table {
    text-align: center;
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

table th {
    background-color: #667eea;
    color: white;
    padding: 12px;
}

table td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

table td:first-child {
    text-align: left;
}

.total {
    text-align: right;
}

.infoItem {
    padding: 20px 0;
}

.infoItem+.infoItem {
    border-top: 1px solid #aaa;
}

.mask {
    position: fixed;
    top: 0;
    left: 0;
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
}

.loader {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

@media screen and (max-width: 768px) {
    .container {
        padding: 25px;
        margin: 10px;
    }

    .inp_box {
        gap: 12px;
    }

    .inp_box_name {
        font-size: 26px;
    }

    .search_inp {
        font-size: 22px;
        padding: 14px 20px;
        text-align: center;
    }

    .search_btn {
        font-size: 22px;
        padding: 14px 32px;
    }

    #show {
        font-size: 18px;
        padding: 10px;
        margin-top: 8px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 20px;
    }

    .inp_box_name {
        font-size: 24px;
    }

    .search_inp {
        font-size: 20px;
        padding: 12px 18px;
        text-align: center;
    }

    .search_btn {
        font-size: 20px;
        padding: 12px 28px;
    }

    #show {
        font-size: 18px;
        padding: 8px;
        margin-top: 6px;
    }
}