.redpacket-card {
    display: flex;
    align-items: center;
    background: #fff5f5;
    border-radius: 12px;
    padding: 12px 15px;
    margin: 12px 0;
    max-width: 420px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #ffe0e0;
}
.redpacket-card:hover {
    box-shadow: 0 4px 12px rgba(255, 100, 100, 0.15);
    transform: translateY(-1px);
}
.redpacket-icon-wrap {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    margin-right: 12px;
    pointer-events: none; 
}
.redpacket-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}
.redpacket-content {
    flex: 1;
    min-width: 0;
}
.redpacket-title-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.redpacket-title {
    font-size: 14px;
    color: #333;
}

.redpacket-progress-text {
    font-size: 18px;
    font-weight: bold;
    color: #ff5252;
    margin: 0 2px;
}

.redpacket-progress-total {
    font-size: 13px;
    color: #999;
}

.redpacket-detail-link {
    font-size: 12px;
    color: #999;
    margin-left: 8px;
    text-decoration: none;
}

.redpacket-detail-link:hover {
    color: #ff5252;
}
.redpacket-progress-bar {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.redpacket-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffb347 0%, #ffcc33 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}
.redpacket-btn {
    flex-shrink: 0;
    margin-left: 12px;
    padding: 6px 16px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.redpacket-btn:hover {
    background: #c0392b;
    transform: scale(1.02);
}
.redpacket-card.grabbed .redpacket-btn {
    background: #bdc3c7;
    color: #fff;
    cursor: default;
}
.redpacket-card.grabbed .redpacket-btn:hover {
    transform: none;
    background: #bdc3c7;
}
.redpacket-card.finished .redpacket-btn {
    background: #95a5a6;
    color: #fff;
    cursor: default;
}
.redpacket-card.finished .redpacket-btn:hover {
    transform: none;
    background: #95a5a6;
}
.redpacket-card.finished:hover {
    transform: none;
    box-shadow: none;
}
.redpacket-card.expired {
    opacity: 0.7;
}
.redpacket-card.expired .redpacket-btn {
    background: #95a5a6;
    color: #fff;
    cursor: default;
}
.redpacket-card.expired .redpacket-btn:hover {
    transform: none;
    background: #95a5a6;
}
.redpacket-card.own .redpacket-btn {
    background: #e74c3c;
}
.redpacket-card.guest .redpacket-btn {
    background: #bdc3c7;
    color: #fff;
    cursor: pointer;
}
.redpacket-card.guest .redpacket-btn:hover {
    background: #95a5a6;
}
.redpacket-my-amount {
    font-size: 12px;
    color: #ff5252;
    margin-top: 4px;
}
.redpacket-best-tag {
    display: inline-block;
    background: #ffd700;
    color: #c9302c;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    margin-left: 5px;
}
.redpacket-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.redpacket-modal.show {
    display: flex;
}
.redpacket-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 360px;
    max-height: 80vh;
    overflow: hidden;
    animation: redpacketSlideIn 0.3s ease;
}
@keyframes redpacketSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
.redpacket-modal-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: #fff;
    padding: 25px 20px;
    text-align: center;
    position: relative;
}
.redpacket-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
    color: #fff;
}
.redpacket-modal-close:hover {
    opacity: 1;
}
.redpacket-modal-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
}
.redpacket-modal-sender {
    font-size: 16px;
    margin-bottom: 5px;
}
.redpacket-modal-message {
    font-size: 14px;
    opacity: 0.9;
}
.redpacket-modal-amount {
    padding: 25px 20px;
    text-align: center;
    background: linear-gradient(180deg, #fff8e1 0%, #fff 100%);
}
.redpacket-modal-amount-value {
    font-size: 42px;
    font-weight: bold;
    color: #ff5252;
}
.redpacket-modal-amount-unit {
    font-size: 18px;
    color: #ff5252;
    margin-left: 5px;
}
.redpacket-modal-best {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: #c9302c;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: bold;
    margin-top: 10px;
}
.redpacket-modal-logs {
    max-height: 280px;
    overflow-y: auto;
    padding: 10px 0;
}
.redpacket-log-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #f5f5f5;
}
.redpacket-log-item:last-child {
    border-bottom: none;
}
.redpacket-log-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
}
.redpacket-log-info {
    flex: 1;
}
.redpacket-log-name {
    font-size: 14px;
    color: #333;
}
.redpacket-log-time {
    font-size: 12px;
    color: #999;
}
.redpacket-log-amount {
    font-size: 16px;
    font-weight: bold;
    color: #ff5252;
}
.redpacket-log-best {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: #c9302c;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    margin-left: 5px;
}
.redpacket-modal-footer {
    padding: 15px;
    background: #f9f9f9;
    text-align: center;
    font-size: 13px;
    color: #666;
    border-top: 1px solid #f0f0f0;
}
.redpacket-form {
    padding: 20px;
}

.redpacket-form-group {
    margin-bottom: 15px;
}
.redpacket-form-label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}
.redpacket-form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.redpacket-form-input:focus {
    border-color: #ff5252;
    outline: none;
}
.redpacket-form-radio {
    display: flex;
    gap: 20px;
}
.redpacket-form-radio label {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.redpacket-form-radio input {
    margin-right: 5px;
}
.redpacket-form-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}
.redpacket-form-submit:hover {
    background: linear-gradient(135deg, #ff7b7b 0%, #ff6262 100%);
}
.redpacket-form-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}
@media (max-width: 480px) {
    .redpacket-card {
        max-width: 100%;
        padding: 10px 12px;
    }
    
    .redpacket-icon-wrap {
        width: 48px;
        height: 48px;
    }
    
    .redpacket-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .redpacket-modal-content {
        width: 95%;
        margin: 10px;
    }
}
.redpacket-tag {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: #fff;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 5px;
    vertical-align: middle;
    font-weight: normal;
}
.icon-redpacket {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 5px;
    vertical-align: middle;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23e74c3c"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 14c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm2.5-5c0 1.38-1.12 2.5-2.5 2.5S9.5 13.38 9.5 12s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}
.icon-redpacket:before {
    content: "🧧";
    font-style: normal;
    font-size: 14px;
}
.redpacket-card.refunded {
    opacity: 0.6;
    background: #f5f5f5;
    border-color: #e0e0e0;
}
.redpacket-card.refunded .redpacket-btn {
    background: #9e9e9e;
    color: #fff;
    cursor: default;
}
.redpacket-card.refunded .redpacket-btn:hover {
    transform: none;
    background: #9e9e9e;
}
.redpacket-card.refunded:hover {
    transform: none;
    box-shadow: none;
}
.redpacket-card.refunded .redpacket-progress-fill {
    background: #bdbdbd;
}
