@charset "utf-8";

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.shake-animation {
    animation: shake 0.5s ease-in-out;
}

/* 令牌消息样式 */
#token-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    font-size: 14px;
    max-width: 300px;
    animation: slideIn 0.3s ease-out;
}

#token-message.slide-out {
    animation: slideOut 0.3s ease-in forwards;
}

#token-message.info {
    background: #d1ecf1;
    color: #0c5460;
}

#token-message.success {
    background: #d4edda;
    color: #155724;
}

#token-message.error {
    background: #f8d7da;
    color: #721c24;
}

/* 令牌模态框样式 */
#token-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#token-modal .modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#token-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}


#token-modal #close-modal {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

#token-modal #close-modal:hover {
    background: #f0f0f0;
}

#token-modal .modal-desc {
    color: #666;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}

#token-modal #token-input {
    width: 100%;
    padding: 8px;
    font-size: 13px;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    text-align: center;
    font-family: monospace;
}

#token-modal #submit-token {
    width: 100%;
    margin-top: 20px;
    padding: 9px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

#token-modal #token-error {
    margin-top: 15px;
    color: #dc3545;
    text-align: center;
    font-size: 14px;
    display: none;
}