body {
    margin: 0;
    background-color: white;
    font-family: Arial, sans-serif;
}

.container {
    width: 700px;
    margin: 80px auto;
    text-align: center;
}

h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    margin-bottom: 40px;
}

.card {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

#count,
#number {
    font-size: 34px;
    font-weight: bold;
}

button {
    background-color: black;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 15px 30px;
    font-size: 18px;
    cursor: pointer;
    margin-bottom: 30px;
}

button:hover {
    background-color: #333
}

#recentList {
    list-style: none;
    padding: 0;
    margin: 0;
}

#recentList li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 18px;
}

#recentList li:last-child {
    border-bottom: none;
}

.latest-card {
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}

#statusText {
    color: #666;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.formula-box {
    min-height: 24px;
    margin: 18px 0;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    color: #555;
}

.progress-container {
    width: 80%;
    height: 10px;
    margin: 15px auto 8px;
    overflow: hidden;
    border: 1px solid #ccc;
    border-radius: 20px;
    background-color: #f2f2f2;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(
        90deg,
        #000,
        #777,
        #000
    );
    transition: width 0.1s linear;
}

#progressText {
    color: #777;
    font-family: "Courier New", monospace;
    font-size: 13px;
}

.latest-card.processing {
    animation: cardPulse 0.8s infinite alternate;
}

.latest-card.processing::before {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 80%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 0, 0, 0.06),
        transparent
    );
    animation: scanner 1.2s infinite linear;
}

#number.processing-number {
    font-family: "Courier New", monospace;
    letter-spacing: 5px;
    animation: numberGlitch 0.12s infinite;
}

.latest-card.complete {
    animation: completeFlash 0.6s ease;
}

button:disabled {
    background-color: #777;
    cursor: not-allowed;
}

@keyframes cardPulse {
    from {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    }

    to {
        transform: scale(1.015);
        box-shadow: 0 0 35px rgba(0, 0, 0, 0.25);
    }
}

@keyframes scanner {
    from {
        left: -150%;
    }

    to {
        left: 150%;
    }
}

@keyframes numberGlitch {
    0% {
        transform: translateX(-2px);
        opacity: 0.7;
    }

    50% {
        transform: translateX(2px);
        opacity: 1;
    }

    100% {
        transform: translateX(0);
        opacity: 0.8;
    }
}

@keyframes completeFlash {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.04);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.35);
    }

    100% {
        transform: scale(1);
    }
}

.latest-card {
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}

.system-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}

.system-box {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    background-color: #fafafa;
}

.system-box span {
    display: block;
    color: #777;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.system-box strong {
    display: block;
    margin-top: 6px;
    font-family: "Courier New", monospace;
    font-size: 20px;
}

.formula-box {
    min-height: 28px;
    margin: 18px 0;
    font-family: "Courier New", monospace;
    font-size: 15px;
    color: #444;
}

.progress-container {
    width: 85%;
    height: 12px;
    margin: 15px auto 8px;
    overflow: hidden;
    border: 1px solid #ccc;
    border-radius: 20px;
    background-color: #f2f2f2;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(
        90deg,
        #000,
        #888,
        #000
    );
    background-size: 200% 100%;
    animation: progressMove 1s linear infinite;
    transition: width 0.2s linear;
}

#progressText {
    color: #777;
    font-family: "Courier New", monospace;
    font-size: 13px;
}

.log-box {
    width: 90%;
    height: 150px;
    margin: 20px auto;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #111;
    padding: 12px;
    box-sizing: border-box;
    text-align: left;
}

.log-box p {
    margin: 0 0 5px;
    color: #b7ffb7;
    font-family: "Courier New", monospace;
    font-size: 12px;
}

.latest-card.processing {
    animation: cardPulse 0.7s infinite alternate;
}

.latest-card.processing::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 0, 0, 0.08),
        transparent
    );
    animation: scanner 1.4s infinite linear;
}

#number.processing-number {
    font-family: "Courier New", monospace;
    letter-spacing: 5px;
    animation: numberGlitch 0.12s infinite;
}

.latest-card.complete {
    animation: completeFlash 0.8s ease;
}

button:disabled {
    background-color: #777;
    cursor: not-allowed;
}

@keyframes cardPulse {
    from {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    }

    to {
        transform: scale(1.01);
        box-shadow: 0 0 35px rgba(0, 0, 0, 0.25);
    }
}

@keyframes scanner {
    from {
        left: -120%;
    }

    to {
        left: 140%;
    }
}

@keyframes numberGlitch {
    0% {
        transform: translateX(-2px);
        opacity: 0.7;
    }

    50% {
        transform: translateX(2px);
        opacity: 1;
    }

    100% {
        transform: translateX(0);
        opacity: 0.8;
    }
}

@keyframes completeFlash {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.04);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.35);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes progressMove {
    from {
        background-position: 0% 0%;
    }

    to {
        background-position: 200% 0%;
    }
}

#recentList li {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    align-items: center;
    gap: 15px;
    padding: 14px 10px;
    border-bottom: 1px solid #eee;
}

#recentList li span {
    color: #777;
    font-family: "Courier New", monospace;
}

#recentList li strong {
    font-family: "Courier New", monospace;
    font-size: 17px;
}

#recentList li small {
    color: #888;
    font-size: 12px;
}

.number-link {
    color: black;
    font-family: 'Courier New', monospace;
    font-size: 17px;
    font-weight: bold;
    text-decoration: none;
}

.number-link:hover {
    text-decoration: underline;
}

.archive-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 35px 0 20px;
    padding: 18px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.archive-summary span {
    color: #777;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.archive-summary strong {
    font-family: 'Courier New', monospace;
    font-size: 24px;
}

.archive-list {
    border-top: 1px solid #ddd;
}

.archive-item {
    display: grid;
    grid-template-columns: 80px 1fr 190px;
    align-items: center;
    gap: 20px;
    padding: 20px 12px;
    border-bottom: 1px solid #ddd;
    color: black;
    text-decoration: none;
    transition: 0.2s;
}

.archive-item:hover {
    padding-left: 20px;
    background-color: #f7f7f7;
}

.archive-item-id {
    color: #777;
    font-family: "Courier New", monospace;
}

.archive-item-number {
    font-family: "Courier New", monospace;
    font-size: 19px;
}

.archive-item-date {
    color: #888;
    font-size: 13px;
    text-align: right;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin: 35px 0 60px;
}

.pagination button {
    margin: 0;
    padding: 10px 18px;
    font-size: 14px;
}

.pagination button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#pageText {
    color: #666;
    font-family: "Courier New", monospace;
    font-size: 14px;
}

@media (max-width: 700px) {
    .archive-item {
        grid-template-columns: 55px 1fr;
        gap: 10px;
    }

    .archive-item-date {
        grid-column: 2;
        text-align: left;
    }
}

.archive-link {
    color: #666;
    font-size: 14px;
    text-decoration: none;
}

.archive-link:hover {
    color: black;
    text-decoration: underline;
}

.footer {
    margin-top: 80px;
    padding: 60px 20px;
    border-top: 1px solid #ddd;
    text-align: center;
}

.footer-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 18px;
}

.footer p {
    color: #666;
    line-height: 1.8;
}

.footer-small {
    margin-top: 35px;
    font-size: 13px;
    color: #999;
    font-style: italic;
}