/**
 * 社務所 - 奉納系統樣式
 */

/* ========================================
   奉納視窗
   ======================================== */

.donate-container {
    position: relative;
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    border: 4px solid #3e2723;
    border-radius: 16px;
    padding: 2rem;
    max-width: 340px;
    width: 90%;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.5);
}

.donate-content {
    text-align: center;
}

.donate-title {
    font-family: 'Yuji Syuku', serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: #3e2723;
    margin-bottom: 0.5rem;
}

.donate-desc {
    font-size: 0.95rem;
    color: #78716c;
    margin-bottom: 1.5rem;
}

/* ========================================
   奉納按鈕
   ======================================== */

.donate-options {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.donate-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #fdfbf7;
    border: 2px solid #d6d3d1;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 85px;
}

.donate-btn:hover {
    background: #fff;
    border-color: #a8a29e;
    transform: translateY(-2px);
}

.donate-btn:active {
    transform: translateY(0);
}

.donate-amount {
    font-family: 'Yuji Syuku', serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: #3e2723;
}

.donate-label {
    font-size: 0.75rem;
    color: #78716c;
    margin-top: 0.25rem;
}

/* 特殊按鈕（100 賽錢 - 觸發 Buff） */
.donate-btn-special {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #d97706;
    position: relative;
    overflow: hidden;
}

.donate-btn-special::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.donate-btn-special:hover {
    background: linear-gradient(135deg, #fde68a, #fbbf24);
    border-color: #b45309;
}

.donate-btn-special .donate-amount {
    color: #92400e;
}

/* 選中狀態 */
.donate-btn.selected {
    border-color: #b45309;
    background: #fef3c7;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.3);
}

/* 特殊按鈕未選中時恢復普通樣式 */
.donate-btn-special:not(.selected) {
    background: #fdfbf7;
    border-color: #d6d3d1;
}

.donate-btn-special:not(.selected)::before {
    display: none;
}

.donate-btn-special:not(.selected) .donate-amount {
    color: #3e2723;
}

/* 特殊按鈕選中時 */
.donate-btn-special.selected {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #92400e;
    box-shadow: 0 0 0 3px rgba(146, 64, 14, 0.4);
}

.donate-btn-special.selected::before {
    display: block;
}

.donate-btn-special.selected .donate-amount {
    color: #92400e;
}

/* 按鈕區塊 */
.donate-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* ========================================
   籤筒發光特效（好運 Buff 啟動時）
   ======================================== */

.omikuji-cylinder.blessed {
    animation: blessed-glow 2s ease-in-out infinite;
}

.omikuji-cylinder.blessed::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 215, 0, 0.3) 0%,
        rgba(255, 193, 7, 0.1) 50%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
    animation: blessed-pulse 1.5s ease-in-out infinite;
}

@keyframes blessed-glow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.8));
    }
}

@keyframes blessed-pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* ========================================
   賽錢箱點擊提示
   ======================================== */

.saisen-box {
    cursor: pointer;
}

.saisen-box:hover .interact-bubble {
    opacity: 1;
}

/* 賽錢箱震動動畫 */
.saisen-box.shake {
    animation: saisen-shake 0.5s ease-in-out;
}

@keyframes saisen-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px) rotate(-2deg); }
    40% { transform: translateX(5px) rotate(2deg); }
    60% { transform: translateX(-3px) rotate(-1deg); }
    80% { transform: translateX(3px) rotate(1deg); }
}

/* ========================================
   道具掉落 Modal
   ======================================== */

.drop-item-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.drop-item-content {
    position: relative;
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    border: 3px solid #3e2723;
    border-radius: 16px;
    padding: 2rem 2.5rem;
    text-align: center;
    animation: drop-bounce 0.3s ease-out;
}

@keyframes drop-bounce {
    0% {
        opacity: 0;
        transform: scale(0.6);
    }
    60% {
        transform: scale(1.08);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.drop-item-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.drop-item-text {
    font-family: 'Yuji Syuku', serif;
    font-size: 1.25rem;
    color: #3e2723;
    margin-bottom: 1.5rem;
}

.drop-item-accept {
    background: #3e2723;
    color: #fff8e1;
    padding: 0.6rem 2rem;
    border: 2px solid #d7ccc8;
    border-radius: 2rem;
    font-family: 'Yuji Syuku', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drop-item-accept:hover {
    background: #5d4037;
    transform: scale(1.05);
}

/* ========================================
   響應式
   ======================================== */

@media (max-width: 480px) {
    .donate-container {
        padding: 1.5rem;
    }
    
    .donate-options {
        gap: 0.5rem;
    }
    
    .donate-btn {
        padding: 0.75rem 1rem;
        min-width: 75px;
    }
    
    .donate-amount {
        font-size: 1.25rem;
    }
}
