/* 实验详情页面专用样式 */

/* 提示框样式 */
.experiment-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.experiment-alert.show {
    opacity: 1;
    transform: translateX(0);
}

.alert-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-radius: 8px;
}

.alert-content i {
    font-size: 18px;
    margin-right: 12px;
    flex-shrink: 0;
}

.alert-content span {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.alert-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-close:hover {
    color: #666;
}

/* 不同类型的提示框颜色 */
.alert-success {
    border-left: 4px solid #52c41a;
}

.alert-success .alert-content i {
    color: #52c41a;
}

.alert-error {
    border-left: 4px solid #ff4d4f;
}

.alert-error .alert-content i {
    color: #ff4d4f;
}

.alert-warning {
    border-left: 4px solid #faad14;
}

.alert-warning .alert-content i {
    color: #faad14;
}

.alert-info {
    border-left: 4px solid #1890ff;
}

.alert-info .alert-content i {
    color: #1890ff;
}

/* 开始实验按钮加载状态 */
.start-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.start-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* 收藏和分享按钮样式重写 */
.detail-action-row .featured-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.9);
    color: #4A90E2;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    min-width: 100px;
}

.detail-action-row .featured-btn:hover {
    background: #4A90E2;
    color: white;
    border-color: #4A90E2;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.3);
}

.detail-action-row .featured-btn i {
    font-size: 16px;
}

/* 收藏按钮特殊样式 */
.detail-action-row .featured-btn:nth-of-type(2) {
    background: rgba(255, 193, 7, 0.1);
    color: #ff9800;
    border-color: rgba(255, 152, 0, 0.3);
}

.detail-action-row .featured-btn:nth-of-type(2):hover {
    background: #ff9800;
    color: white;
    border-color: #ff9800;
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.3);
}

/* 分享按钮特殊样式 */
.detail-action-row .featured-btn:nth-of-type(3) {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border-color: rgba(76, 175, 80, 0.3);
}

.detail-action-row .featured-btn:nth-of-type(3):hover {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

/* 实验状态按钮样式 */
.start-btn.status-in-progress {
    background: linear-gradient(135deg, #52c41a, #73d13d);
    color: white;
    cursor: default;
}

.start-btn.status-in-progress:hover {
    background: linear-gradient(135deg, #52c41a, #73d13d);
    transform: none;
}

.start-btn.status-paused {
    background: linear-gradient(135deg, #faad14, #ffc53d);
    color: white;
    cursor: pointer;
}

.start-btn.status-paused:hover {
    background: linear-gradient(135deg, #d48806, #faad14);
}

.start-btn.status-completed {
    background: linear-gradient(135deg, #1890ff, #40a9ff);
    color: white;
    cursor: pointer;
}

.start-btn.status-completed:hover {
    background: linear-gradient(135deg, #096dd9, #1890ff);
}

/* 实验控制按钮组 */
.experiment-controls {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.control-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.pause-btn {
    background: linear-gradient(135deg, #faad14, #ffc53d);
    color: white;
}

.pause-btn:hover {
    background: linear-gradient(135deg, #d48806, #faad14);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(250, 173, 20, 0.3);
}

.resume-btn {
    background: linear-gradient(135deg, #52c41a, #73d13d);
    color: white;
}

.resume-btn:hover {
    background: linear-gradient(135deg, #389e0d, #52c41a);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(82, 196, 26, 0.3);
}

.finish-btn {
    background: linear-gradient(135deg, #ff4d4f, #ff7875);
    color: white;
}

.finish-btn:hover {
    background: linear-gradient(135deg, #cf1322, #ff4d4f);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 77, 79, 0.3);
}

/* 实验状态信息增强 */
.experiment-status-info {
    margin-top: 15px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    border-left: 4px solid #1890ff;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.status-duration {
    font-size: 13px;
    color: #52c41a;
    text-align: center;
    font-weight: 500;
    margin-top: 4px;
}

/* 进度条样式 */
.progress-bar-container {
    margin-top: 12px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #52c41a, #73d13d);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 12px;
    color: #666;
    text-align: center;
    font-weight: 500;
}

/* 时间显示优化 */
.status-time {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin: 2px 0;
}

.status-time:first-of-type {
    margin-top: 6px;
}

.status-message {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.status-message i {
    margin-right: 8px;
    color: #1890ff;
}

/* 操作按钮组调整 */
.detail-action-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.detail-action-row > .start-btn {
    order: 1;
    margin-bottom: 5px;
}

/* 收藏和分享按钮组 */
.button-group {
    display: flex;
    gap: 12px;
    order: 2;
}

.detail-action-row > .experiment-status-info {
    order: 3;
    width: 100%;
    max-width: 300px;
}

/* 让收藏和分享按钮在button-group中显示 */
.detail-action-row .featured-btn {
    margin: 0;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .experiment-alert {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
    
    .experiment-status-info {
        margin-top: 10px;
        padding: 10px 12px;
    }
    
    .status-message {
        font-size: 13px;
    }
    
    .status-time {
        font-size: 11px;
    }
    
    .detail-action-row .featured-btn {
        padding: 10px 20px;
        font-size: 13px;
        min-width: 90px;
    }
    
    .button-group {
        gap: 8px;
    }
    
    .detail-action-row {
        gap: 12px;
    }
}

/* 深色主题适配 */
@media (prefers-color-scheme: dark) {
    .experiment-alert {
        background: #2a2a2a;
        color: #e0e0e0;
    }
    
    .alert-close {
        color: #999;
    }
    
    .alert-close:hover {
        color: #ccc;
    }
    
    .experiment-status-info {
        background: rgba(42, 42, 42, 0.95);
        border-left-color: #40a9ff;
    }
    
    .status-message {
        color: #e0e0e0;
    }
    
    .status-message i {
        color: #40a9ff;
    }
    
    .status-time {
        color: #999;
    }
    
    .detail-action-row .featured-btn {
        background: rgba(42, 42, 42, 0.9);
        border-color: rgba(255, 255, 255, 0.2);
    }
} 