/* 摇签桶容器 */
.shake-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.barrel-container {
    position: relative;
    transition: transform 0.1s ease-out;
}

.barrel {
    width: 150px;
    height: 200px;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    border-radius: 15px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.barrel:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.barrel:before {
    content: '';
    position: absolute;
    top: 0;
    left: 15px;
    right: 15px;
    height: 15px;
    background: linear-gradient(90deg, #CD853F, #D2691E);
    border-radius: 8px 8px 0 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.barrel:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px;
    right: 15px;
    height: 15px;
    background: linear-gradient(90deg, #CD853F, #D2691E);
    border-radius: 0 0 8px 8px;
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.barrel-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFD700;
    font-weight: bold;
    text-align: center;
    width: 100%;
    font-size: 16px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    z-index: 2;
}

.sticks {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 50px;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
}

.stick {
    width: 6px;
    background: linear-gradient(180deg, #DEB887, #8B4513);
    border-radius: 3px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.stick:nth-child(1) { height: 45px; }
.stick:nth-child(2) { height: 50px; }
.stick:nth-child(3) { height: 42px; }
.stick:nth-child(4) { height: 48px; }
.stick:nth-child(5) { height: 44px; }

/* 摇动动画 */
.shaking {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    10% { transform: translateX(-10px) rotate(-2deg); }
    20% { transform: translateX(10px) rotate(2deg); }
    30% { transform: translateX(-8px) rotate(-1deg); }
    40% { transform: translateX(8px) rotate(1deg); }
    50% { transform: translateX(-6px) rotate(-1deg); }
    60% { transform: translateX(6px) rotate(1deg); }
    70% { transform: translateX(-4px) rotate(-0.5deg); }
    80% { transform: translateX(4px) rotate(0.5deg); }
    90% { transform: translateX(-2px) rotate(-0.2deg); }
}

.sticks-shaking .stick {
    animation: sticksShake 0.5s ease-in-out;
}

@keyframes sticksShake {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(2deg); }
    50% { transform: translateY(-3px) rotate(-1deg); }
    75% { transform: translateY(-7px) rotate(1deg); }
}

/* 进度条样式 */
.shake-progress {
    margin-top: 20px;
    width: 200px;
    margin-left: auto;
    margin-right: auto;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* 状态文字动画 */
.shake-status {
    transition: all 0.3s ease;
}

.shake-status.completed {
    color: #10b981;
}

/* 签号弹窗样式 */
.lot-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lot-modal.show {
    opacity: 1;
    visibility: visible;
}

.lot-content {
    background: linear-gradient(135deg, #fff, #f8fafc);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    max-width: 90%;
    width: 350px;
}

.lot-modal.show .lot-content {
    transform: scale(1);
}

.lot-number {
    font-size: 48px;
    font-weight: bold;
    color: #dc2626;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.lot-title {
    font-size: 24px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 10px;
}

.lot-description {
    color: #6b7280;
    margin-bottom: 30px;
    line-height: 1.6;
}

.lot-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.qr-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.qr-code {
    width: 100%;
    height: 100%;
    background-image: url('https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=https://example.com/bugua');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.scan-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e63946;
    box-shadow: 0 0 8px #e63946;
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}