/* 新增样式 - 设置按钮和布局优化 */

/* 可滑动盖子 - 重新设计 */
.draggable-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(220, 38, 38, 0.85), rgba(185, 28, 28, 0.95));
    border-radius: 50%;
    border: 4px solid rgba(220, 38, 38, 0.9);
    backdrop-filter: blur(15px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.6),
        inset 0 0 40px rgba(255, 255, 255, 0.2),
        inset 0 -10px 30px rgba(0, 0, 0, 0.3);
    cursor: grab;
    z-index: 50;
    top: 0;
    left: 0;
    transition: box-shadow 0.3s ease, top 0.1s ease;
    user-select: none;
    touch-action: none;
}

.draggable-cover.dragging {
    cursor: grabbing;
    box-shadow: 
        0 20px 50px rgba(220, 38, 38, 0.7),
        inset 0 0 50px rgba(255, 255, 255, 0.3);
}

.cover-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.cover-handle::before {
    content: '💎';
    font-size: 32px;
    margin-bottom: 5px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.cover-handle::after {
    content: '滑动';
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 骰盅区域需要相对定位 */
.dice-stage {
    position: relative !important;
}

.cup-wrapper {
    position: relative !important;
    overflow: visible !important;
}

/* 图片点击效果 */
.ad-image {
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.ad-image:hover {
    transform: scale(1.05) !important;
    opacity: 0.9 !important;
}

/* 图片放大模态框 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.3);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
}

.modal-close:hover {
    color: #f59e0b;
    transform: rotate(90deg);
}

.modal-caption {
    color: #cbd5e1;
    font-size: 14px;
    margin-top: 20px;
    text-align: center;
}

/* 重写控制面板 */
.control-panel {
    width: 90% !important;
    max-width: 480px !important;
    background: rgba(30, 41, 59, 0.85) !important;
    border: 1px solid rgba(203, 213, 225, 0.15) !important;
    border-radius: 24px !important;
    padding: 20px !important;
    backdrop-filter: blur(30px) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
    display: flex !important;
    gap: 15px !important;
}

/* 设置按钮 */
.settings-button {
    flex: 1;
    padding: 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(37, 99, 235, 0.8));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.settings-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* 设置面板 */
.settings-panel {
    width: 90%;
    max-width: 480px;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(203, 213, 225, 0.15);
    border-radius: 24px;
    padding: 25px;
    backdrop-filter: blur(30px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin-top: -20px;
}

/* 缩小自定义文字框 */
.custom-text-area {
    width: 90% !important;
    max-width: 480px !important;
    min-height: 50px !important;
    padding: 15px 25px !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}

.custom-text-area p {
    margin: 5px 0 !important;
    font-size: 14px !important;
}

/* 广告位强制显示 */
.ads-container {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.ad-box {
    display: flex !important;
    visibility: visible !important;
}

/* 手机端优化 */
@media (max-width: 768px) {
    .ads-container {
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 15px !important;
    }
    
    .ad-box {
        min-width: 100% !important;
        max-width: 100% !important;
        height: 150px !important;
    }
    
    .ad-image {
        max-height: 90px !important;
    }
    
    .control-panel {
        flex-direction: column !important;
        padding: 20px !important;
    }
    
    .roll-button, .settings-button {
        width: 100% !important;
    }
    
    .custom-text-area {
        padding: 12px 20px !important;
        font-size: 13px !important;
        min-height: 40px !important;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 80px 10px 30px !important;
        gap: 20px !important;
    }
    
    .ad-box {
        height: 130px !important;
        padding: 12px !important;
    }
    
    .ad-image {
        max-height: 80px !important;
    }
    
    .ad-text {
        font-size: 12px !important;
    }
    
    .custom-text-area {
        font-size: 12px !important;
    }
}
