/* 悬浮组件样式 */

/* 肿瘤科工具悬浮组件 */
#oncology-tools-widget {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

#oncology-tools-widget .oncology-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    border: none;
    border-radius: 12px 0 0 12px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

#oncology-tools-widget .oncology-toggle:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}

#oncology-tools-widget .oncology-toggle span {
    font-size: 20px;
}

#oncology-tools-widget .oncology-panel {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(20px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    width: 320px;
    max-height: 600px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#oncology-tools-widget .oncology-panel.show {
    opacity: 1;
    pointer-events: all;
    transform: translateY(-50%) translateX(0);
}

#oncology-tools-widget .oncology-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#oncology-tools-widget .oncology-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

#oncology-tools-widget .oncology-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: all 0.2s;
}

#oncology-tools-widget .oncology-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

#oncology-tools-widget .oncology-tools {
    padding: 12px;
    max-height: 540px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#oncology-tools-widget .oncology-tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
    margin-bottom: 8px;
}

#oncology-tools-widget .oncology-tool-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateX(-4px);
}

#oncology-tools-widget .tool-icon {
    font-size: 28px;
    flex-shrink: 0;
}

#oncology-tools-widget .tool-name {
    font-weight: 600;
    font-size: 14px;
}

/* 番茄钟悬浮组件 */
#pomodoro-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
}

#pomodoro-widget .pomodoro-toggle {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(245, 87, 108, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}

#pomodoro-widget .pomodoro-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(245, 87, 108, 0.6);
}

#pomodoro-widget .pomodoro-toggle span {
    font-size: 28px;
}

#pomodoro-widget .pomodoro-panel {
    position: absolute;
    right: 0;
    bottom: 80px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    width: 300px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#pomodoro-widget .pomodoro-panel.show {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

#pomodoro-widget .pomodoro-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
}

#pomodoro-widget .pomodoro-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

#pomodoro-widget .pomodoro-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: all 0.2s;
}

#pomodoro-widget .pomodoro-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

#pomodoro-widget .pomodoro-content {
    padding: 24px 20px;
}

#pomodoro-widget .pomodoro-display {
    margin-bottom: 20px;
}

#pomodoro-widget .time-display {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    color: #f5576c;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

#pomodoro-widget .status-display {
    text-align: center;
    color: #666;
    font-size: 14px;
}

#pomodoro-widget .pomodoro-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

#pomodoro-widget .pomodoro-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    transition: all 0.2s;
}

#pomodoro-widget .pomodoro-btn:hover {
    border-color: #f5576c;
    color: #f5576c;
    transform: translateY(-2px);
}

#pomodoro-widget .start-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
}

#pomodoro-widget .start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

#pomodoro-widget .start-btn.running {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
}

#pomodoro-widget .pomodoro-settings {
    border-top: 1px solid #e0e0e0;
    padding-top: 16px;
    margin-bottom: 16px;
}

#pomodoro-widget .setting-item {
    margin-bottom: 12px;
}

#pomodoro-widget .setting-item:last-child {
    margin-bottom: 0;
}

#pomodoro-widget .setting-item label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

#pomodoro-widget .setting-item input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

#pomodoro-widget .pomodoro-stats {
    display: flex;
    gap: 12px;
    border-top: 1px solid #e0e0e0;
    padding-top: 16px;
}

#pomodoro-widget .stat-item {
    flex: 1;
    text-align: center;
}

#pomodoro-widget .stat-label {
    display: block;
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
}

#pomodoro-widget .stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #f5576c;
}

/* 番茄钟通知 */
.pomodoro-notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(245, 87, 108, 0.4);
    font-size: 16px;
    font-weight: 600;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
}

.pomodoro-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 专注模式背景变暗 */
body.pomodoro-focus::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    pointer-events: none;
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    #oncology-tools-widget {
        right: 10px;
    }
    
    #oncology-tools-widget .oncology-panel {
        width: calc(100vw - 100px);
        max-width: 300px;
    }
    
    #pomodoro-widget {
        right: 10px;
        bottom: 10px;
    }
    
    #pomodoro-widget .pomodoro-toggle {
        width: 50px;
        height: 50px;
        padding: 12px;
    }
    
    #pomodoro-widget .pomodoro-toggle span {
        font-size: 24px;
    }
    
    #pomodoro-widget .pomodoro-panel {
        width: calc(100vw - 40px);
        max-width: 280px;
    }
}
