/* AV录制器UI样式表 */
/* 现代化深色主题 */

/* 全局样式 */
* {
    font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    font-size: 9pt;
}

/* 主窗口 */
QMainWindow {
    background-color: #2b2b2b;
    color: #ffffff;
}

/* 中央部件 */
QWidget {
    background-color: #2b2b2b;
    color: #ffffff;
    border: none;
}

/* 菜单栏 */
QMenuBar {
    background-color: #333333;
    color: #ffffff;
    border-bottom: 1px solid #555555;
    padding: 2px;
}

QMenuBar::item {
    background-color: transparent;
    padding: 4px 8px;
    border-radius: 3px;
}

QMenuBar::item:selected {
    background-color: #0a84ff;
}

QMenuBar::item:pressed {
    background-color: #0066cc;
}

/* 菜单 */
QMenu {
    background-color: #333333;
    color: #ffffff;
    border: 1px solid #555555;
    border-radius: 4px;
    padding: 4px;
}

QMenu::item {
    background-color: transparent;
    padding: 6px 20px;
    border-radius: 3px;
}

QMenu::item:selected {
    background-color: #0a84ff;
}

QMenu::separator {
    height: 1px;
    background-color: #555555;
    margin: 4px 0px;
}

/* 工具栏 */
QToolBar {
    background-color: #333333;
    border: 1px solid #555555;
    border-radius: 4px;
    spacing: 2px;
    padding: 2px;
}

QToolBar::handle {
    background-color: #555555;
    width: 8px;
    margin: 4px;
    border-radius: 2px;
}

QToolBar::separator {
    background-color: #555555;
    width: 1px;
    margin: 4px 2px;
}

/* 工具按钮 */
QToolButton {
    background-color: #444444;
    border: 1px solid #666666;
    border-radius: 4px;
    color: #ffffff;
    padding: 6px;
    margin: 1px;
}

QToolButton:hover {
    background-color: #555555;
    border-color: #777777;
}

QToolButton:pressed {
    background-color: #333333;
    border-color: #555555;
}

QToolButton:checked {
    background-color: #0a84ff;
    border-color: #0066cc;
}

QToolButton:disabled {
    background-color: #2b2b2b;
    border-color: #444444;
    color: #666666;
}

/* 按钮 */
QPushButton {
    background-color: #444444;
    border: 1px solid #666666;
    border-radius: 4px;
    color: #ffffff;
    padding: 6px 12px;
    min-width: 60px;
}

QPushButton:hover {
    background-color: #555555;
    border-color: #777777;
}

QPushButton:pressed {
    background-color: #333333;
    border-color: #555555;
}

QPushButton:checked {
    background-color: #0a84ff;
    border-color: #0066cc;
}

QPushButton:disabled {
    background-color: #2b2b2b;
    border-color: #444444;
    color: #666666;
}

/* 主要按钮 */
QPushButton.primary {
    background-color: #0a84ff;
    border-color: #0066cc;
}

QPushButton.primary:hover {
    background-color: #0066cc;
    border-color: #004499;
}

QPushButton.primary:pressed {
    background-color: #004499;
    border-color: #003366;
}

/* 危险按钮 */
QPushButton.danger {
    background-color: #ff3b30;
    border-color: #cc2e24;
}

QPushButton.danger:hover {
    background-color: #cc2e24;
    border-color: #99221b;
}

QPushButton.danger:pressed {
    background-color: #99221b;
    border-color: #661612;
}

/* 成功按钮 */
QPushButton.success {
    background-color: #34c759;
    border-color: #2a9f47;
}

QPushButton.success:hover {
    background-color: #2a9f47;
    border-color: #1f7735;
}

QPushButton.success:pressed {
    background-color: #1f7735;
    border-color: #154f23;
}

/* 标签 */
QLabel {
    color: #ffffff;
    background-color: transparent;
}

QLabel.title {
    font-size: 12pt;
    font-weight: bold;
    color: #ffffff;
}

QLabel.subtitle {
    font-size: 10pt;
    color: #cccccc;
}

QLabel.caption {
    font-size: 8pt;
    color: #999999;
}

/* 输入框 */
QLineEdit {
    background-color: #444444;
    border: 1px solid #666666;
    border-radius: 4px;
    color: #ffffff;
    padding: 6px;
    selection-background-color: #0a84ff;
}

QLineEdit:focus {
    border-color: #0a84ff;
}

QLineEdit:disabled {
    background-color: #2b2b2b;
    border-color: #444444;
    color: #666666;
}

/* 文本编辑器 */
QTextEdit, QPlainTextEdit {
    background-color: #444444;
    border: 1px solid #666666;
    border-radius: 4px;
    color: #ffffff;
    selection-background-color: #0a84ff;
}

QTextEdit:focus, QPlainTextEdit:focus {
    border-color: #0a84ff;
}

/* 组合框 */
QComboBox {
    background-color: #444444;
    border: 1px solid #666666;
    border-radius: 4px;
    color: #ffffff;
    padding: 6px;
    min-width: 100px;
}

QComboBox:hover {
    border-color: #777777;
}

QComboBox:focus {
    border-color: #0a84ff;
}

QComboBox::drop-down {
    border: none;
    width: 20px;
}

QComboBox::down-arrow {
    image: url(:/icons/arrow_down.png);
    width: 12px;
    height: 12px;
}

QComboBox QAbstractItemView {
    background-color: #333333;
    border: 1px solid #555555;
    border-radius: 4px;
    color: #ffffff;
    selection-background-color: #0a84ff;
}

/* 滑块 */
QSlider::groove:horizontal {
    background-color: #444444;
    height: 6px;
    border-radius: 3px;
}

QSlider::handle:horizontal {
    background-color: #0a84ff;
    border: 1px solid #0066cc;
    width: 16px;
    height: 16px;
    border-radius: 8px;
    margin: -5px 0;
}

QSlider::handle:horizontal:hover {
    background-color: #0066cc;
}

QSlider::handle:horizontal:pressed {
    background-color: #004499;
}

QSlider::sub-page:horizontal {
    background-color: #0a84ff;
    border-radius: 3px;
}

/* 进度条 */
QProgressBar {
    background-color: #444444;
    border: 1px solid #666666;
    border-radius: 4px;
    text-align: center;
    color: #ffffff;
    height: 20px;
}

QProgressBar::chunk {
    background-color: #0a84ff;
    border-radius: 3px;
}

/* 复选框 */
QCheckBox {
    color: #ffffff;
    spacing: 8px;
}

QCheckBox::indicator {
    width: 16px;
    height: 16px;
    border: 1px solid #666666;
    border-radius: 3px;
    background-color: #444444;
}

QCheckBox::indicator:hover {
    border-color: #777777;
}

QCheckBox::indicator:checked {
    background-color: #0a84ff;
    border-color: #0066cc;
    image: url(:/icons/check.png);
}

/* 单选按钮 */
QRadioButton {
    color: #ffffff;
    spacing: 8px;
}

QRadioButton::indicator {
    width: 16px;
    height: 16px;
    border: 1px solid #666666;
    border-radius: 8px;
    background-color: #444444;
}

QRadioButton::indicator:hover {
    border-color: #777777;
}

QRadioButton::indicator:checked {
    background-color: #0a84ff;
    border-color: #0066cc;
}

QRadioButton::indicator:checked::after {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background-color: #ffffff;
    margin: 4px;
}

/* 分组框 */
QGroupBox {
    color: #ffffff;
    border: 1px solid #666666;
    border-radius: 4px;
    margin-top: 10px;
    padding-top: 10px;
}

QGroupBox::title {
    subcontrol-origin: margin;
    subcontrol-position: top left;
    padding: 0 8px;
    background-color: #2b2b2b;
    color: #ffffff;
    font-weight: bold;
}

/* 选项卡 */
QTabWidget::pane {
    border: 1px solid #666666;
    border-radius: 4px;
    background-color: #2b2b2b;
}

QTabBar::tab {
    background-color: #444444;
    border: 1px solid #666666;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    color: #ffffff;
    padding: 8px 16px;
    margin-right: 2px;
}

QTabBar::tab:hover {
    background-color: #555555;
}

QTabBar::tab:selected {
    background-color: #0a84ff;
    border-color: #0066cc;
}

/* 滚动条 */
QScrollBar:vertical {
    background-color: #333333;
    width: 12px;
    border-radius: 6px;
}

QScrollBar::handle:vertical {
    background-color: #666666;
    border-radius: 6px;
    min-height: 20px;
}

QScrollBar::handle:vertical:hover {
    background-color: #777777;
}

QScrollBar::add-line:vertical,
QScrollBar::sub-line:vertical {
    border: none;
    background: none;
}

QScrollBar:horizontal {
    background-color: #333333;
    height: 12px;
    border-radius: 6px;
}

QScrollBar::handle:horizontal {
    background-color: #666666;
    border-radius: 6px;
    min-width: 20px;
}

QScrollBar::handle:horizontal:hover {
    background-color: #777777;
}

QScrollBar::add-line:horizontal,
QScrollBar::sub-line:horizontal {
    border: none;
    background: none;
}

/* 状态栏 */
QStatusBar {
    background-color: #333333;
    color: #ffffff;
    border-top: 1px solid #555555;
    padding: 2px;
}

QStatusBar::item {
    border: none;
}

/* 分割器 */
QSplitter::handle {
    background-color: #555555;
}

QSplitter::handle:horizontal {
    width: 4px;
}

QSplitter::handle:vertical {
    height: 4px;
}

QSplitter::handle:hover {
    background-color: #777777;
}

/* 对话框 */
QDialog {
    background-color: #2b2b2b;
    color: #ffffff;
}

/* 消息框 */
QMessageBox {
    background-color: #2b2b2b;
    color: #ffffff;
}

QMessageBox QLabel {
    color: #ffffff;
}

/* 文件对话框 */
QFileDialog {
    background-color: #2b2b2b;
    color: #ffffff;
}

/* 工具提示 */
QToolTip {
    background-color: #333333;
    color: #ffffff;
    border: 1px solid #555555;
    border-radius: 4px;
    padding: 4px;
}

/* 录制器特定样式 */
.RecorderMainWidget {
    background-color: #2b2b2b;
}

.RecorderVideoWidget {
    background-color: #000000;
    border: 1px solid #666666;
    border-radius: 4px;
}

.RecorderAudioWidget {
    background-color: #333333;
    border: 1px solid #666666;
    border-radius: 4px;
    padding: 8px;
}

.AudioLevelWidget {
    background-color: #444444;
    border: 1px solid #666666;
    border-radius: 2px;
}

.RecorderSettingsDialog {
    background-color: #2b2b2b;
}

/* 录制状态指示器 */
.recording-indicator {
    background-color: #ff3b30;
    border-radius: 6px;
    width: 12px;
    height: 12px;
}

.paused-indicator {
    background-color: #ff9500;
    border-radius: 6px;
    width: 12px;
    height: 12px;
}

.stopped-indicator {
    background-color: #666666;
    border-radius: 6px;
    width: 12px;
    height: 12px;
}

/* 音频电平条 */
.audio-level-bar {
    background-color: #444444;
    border: 1px solid #666666;
    border-radius: 2px;
}

.audio-level-fill {
    background-color: #34c759;
    border-radius: 1px;
}

.audio-level-peak {
    background-color: #ff9500;
}

.audio-level-overload {
    background-color: #ff3b30;
}
