/* Windows 95 风格样式 */

/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 根变量定义 */
:root {
  --win95-gray: #c0c0c0;
  --win95-dark-gray: #808080;
  --win95-light-gray: #dfdfdf;
  --win95-white: #ffffff;
  --win95-black: #000000;
  --win95-blue: #0000ff;
  --win95-green: #008000;
  --win95-red: #ff0000;
  --win95-yellow: #ffff00;
  --win95-desktop: #008080;
  --win95-selection: #316ac5;
  --win95-button-face: #c0c0c0;
  --win95-button-shadow: #808080;
  --win95-button-dark-shadow: #000000;
  --win95-button-light: #dfdfdf;
  --win95-button-highlight: #ffffff;
  --win95-text-secondary: #404040;
}

/* 全局样式 */
html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
  font-size: 13px;
  background-color: var(--win95-desktop);
  color: var(--win95-black);
  height: 100%;
  overflow-x: auto;
}

body {
  background: linear-gradient(45deg, #008080 0%, #004040 100%);
  min-height: 100vh;
  padding: 20px;
  /* 添加Windows 95桌面纹理效果 */
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255,255,255,0.05) 0%, transparent 50%);
}

/* 添加桌面图标样式 */
.desktop-icon {
  position: fixed;
  top: 30px;
  right: 30px;
  background-color: var(--win95-button-face);
  border: 1px solid var(--win95-button-shadow);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  z-index: 10;
}

.desktop-icon:hover {
  background-color: var(--win95-button-light);
}

/* 容器样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

/* 标题区域样式 */
.header-section {
  margin-bottom: 20px;
  text-align: center;
  padding: 20px 0;
}

.header-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.main-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--win95-white);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  margin: 0;
}

.advanced-btn {
  background-color: var(--win95-button-face);
  border: 1px outset var(--win95-button-face);
}

/* 窗口样式 */
.window {
  background-color: var(--win95-button-face);
  border: 2px outset var(--win95-button-face);
  margin-bottom: 20px;
  /* 添加窗口阴影效果 */
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.window-header {
  background: linear-gradient(90deg, var(--win95-selection) 0%, #1084d0 100%);
  color: var(--win95-white);
  padding: 2px 4px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  /* 添加Windows 95标题栏效果 */
  border-bottom: 1px solid var(--win95-button-shadow);
}

.window-content {
  padding: 10px;
}

/* 按钮样式 */
.btn {
  background-color: var(--win95-button-face);
  border-top: 2px solid var(--win95-button-highlight);
  border-left: 2px solid var(--win95-button-highlight);
  border-right: 2px solid var(--win95-button-shadow);
  border-bottom: 2px solid var(--win95-button-shadow);
  color: var(--win95-black);
  padding: 4px 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
  font-size: 13px;
  cursor: pointer;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  user-select: none;
  /* 增强按钮阴影效果 */
  box-shadow: 
    1px 1px 0px var(--win95-button-dark-shadow),
    2px 2px 3px rgba(0, 0, 0, 0.4);
  /* 添加轻微的边框半径使效果更明显 */
  border-radius: 1px;
}

.btn:hover {
  background-color: var(--win95-button-light);
  /* hover时增强高亮效果 */
  border-top-color: #ffffff;
  border-left-color: #ffffff;
}

.btn:active {
  border-top: 2px solid var(--win95-button-shadow);
  border-left: 2px solid var(--win95-button-shadow);
  border-right: 2px solid var(--win95-button-highlight);
  border-bottom: 2px solid var(--win95-button-highlight);
  box-shadow: 
    inset 1px 1px 1px rgba(0, 0, 0, 0.5),
    inset 2px 2px 3px rgba(0, 0, 0, 0.3);
  /* 按下时轻微偏移产生按下效果 */
  transform: translate(1px, 1px);
}

.btn:disabled {
  color: var(--win95-button-shadow);
  background-color: var(--win95-button-face);
  border-top: 2px solid var(--win95-button-highlight);
  border-left: 2px solid var(--win95-button-highlight);
  border-right: 2px solid var(--win95-button-shadow);
  border-bottom: 2px solid var(--win95-button-shadow);
  cursor: default;
  box-shadow: 1px 1px 0px var(--win95-button-dark-shadow);
  transform: none;
}

.btn-primary {
  background-color: var(--win95-blue);
  color: var(--win95-white);
  border-top: 2px solid #4080ff;
  border-left: 2px solid #4080ff;
  border-right: 2px solid #000080;
  border-bottom: 2px solid #000080;
}

.btn-primary:hover {
  border-top-color: #6099ff;
  border-left-color: #6099ff;
}

.btn-primary:active {
  border-top: 2px solid #000080;
  border-left: 2px solid #000080;
  border-right: 2px solid #4080ff;
  border-bottom: 2px solid #4080ff;
}

.btn-success {
  background-color: var(--win95-green);
  color: var(--win95-white);
  border-top: 2px solid #40c040;
  border-left: 2px solid #40c040;
  border-right: 2px solid #004000;
  border-bottom: 2px solid #004000;
}

.btn-success:hover {
  border-top-color: #60d060;
  border-left-color: #60d060;
}

.btn-success:active {
  border-top: 2px solid #004000;
  border-left: 2px solid #004000;
  border-right: 2px solid #40c040;
  border-bottom: 2px solid #40c040;
}

.btn-danger {
  background-color: var(--win95-red);
  color: var(--win95-white);
  border-top: 2px solid #ff4040;
  border-left: 2px solid #ff4040;
  border-right: 2px solid #800000;
  border-bottom: 2px solid #800000;
}

.btn-danger:hover {
  border-top-color: #ff6060;
  border-left-color: #ff6060;
}

.btn-danger:active {
  border-top: 2px solid #800000;
  border-left: 2px solid #800000;
  border-right: 2px solid #ff4040;
  border-bottom: 2px solid #ff4040;
}

.btn-warning {
  background-color: var(--win95-yellow);
  color: var(--win95-black);
  border-top: 2px solid #ffff80;
  border-left: 2px solid #ffff80;
  border-right: 2px solid #c0c000;
  border-bottom: 2px solid #c0c000;
}

.btn-warning:hover {
  border-top-color: #ffffb0;
  border-left-color: #ffffb0;
}

.btn-warning:active {
  border-top: 2px solid #c0c000;
  border-left: 2px solid #c0c000;
  border-right: 2px solid #ffff80;
  border-bottom: 2px solid #ffff80;
}

.btn-sm {
  padding: 3px 8px;
  font-size: 12px;
  min-height: 24px;
}

.btn-lg {
  padding: 6px 16px;
  font-size: 14px;
  min-height: 32px;
}

.w-full {
  width: 100%;
}

/* 输入框样式 */
.form-control {
  background-color: var(--win95-white);
  border: 1px inset var(--win95-button-face);
  padding: 3px 6px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
  font-size: 13px;
  width: 100%;
  min-height: 24px;
  /* 添加输入框内阴影效果 */
  box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.3);
}

.form-control:focus {
  outline: 1px dotted var(--win95-black);
  outline-offset: -2px;
}

.form-control:disabled {
  background-color: var(--win95-button-face);
  color: var(--win95-button-shadow);
}

/* 文本区域 */
textarea.form-control {
  resize: both;
  min-height: 60px;
}

/* 标签样式 */
.form-label {
  display: block;
  margin-bottom: 2px;
  font-weight: normal;
  font-size: 13px;
}

/* 网格布局 */
.grid {
  display: grid;
  gap: 10px;
}

.grid-cols-1 {
  grid-template-columns: 1fr;
}

.grid-cols-2 {
  grid-template-columns: 1fr 1fr;
}

.lg\:grid-cols-2 {
  grid-template-columns: 1fr 1fr;
}

/* 间距工具类 */
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }

.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }

.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }

.px-4 { padding-left: 16px; padding-right: 16px; }

/* 分隔线 */
hr {
  border: 0;
  border-top: 1px solid var(--win95-button-shadow);
  border-bottom: 1px solid var(--win95-button-highlight);
  margin: 8px 0;
}

/* 文本颜色 */
.text-blue-600 { color: var(--win95-blue); }
.text-green-600 { color: var(--win95-green); }
.text-red-600 { color: var(--win95-red); }
.text-gray-600 { color: var(--win95-text-secondary); }
.text-white { color: var(--win95-white); }

/* 字体样式 */
.font-bold { font-weight: bold; }
.font-medium { font-weight: bold; }
.font-semibold { font-weight: bold; }

.text-sm { font-size: 12px; }
.text-lg { font-size: 15px; }
.text-xl { font-size: 17px; }
.text-2xl { font-size: 20px; }
.text-3xl { font-size: 24px; }

/* 边框 */
.border-b {
  border-bottom: 1px solid var(--win95-button-shadow);
}

.pb-2 {
  padding-bottom: 8px;
}

/* 工具栏样式 */
.toolbar {
  background-color: var(--win95-button-face);
  border: 1px outset var(--win95-button-face);
  padding: 2px;
  display: flex;
  gap: 2px;
  align-items: center;
}

/* 状态栏样式 */
.status-bar {
  background-color: var(--win95-button-face);
  border: 1px inset var(--win95-button-face);
  padding: 2px 4px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 日志容器 */
.log-container {
  background-color: var(--win95-white);
  border: 1px inset var(--win95-button-face);
  padding: 4px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  height: 200px;
  overflow-y: auto;
  /* 添加日志容器内阴影 */
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.log-entry {
  margin: 2px 0;
  padding: 1px 0;
}

.log-entry.text-success { color: var(--win95-green); }
.log-entry.text-danger { color: var(--win95-red); }
.log-entry.text-warning { color: #ff8000; }
  .log-entry.text-info { color: var(--win95-blue); }

/* 单选框组样式 - Windows 95风格 */
.radio-group {
  display: flex;
  flex-direction: row;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.radio-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 1px 3px;
  font-size: 12px;
  white-space: nowrap;
}

.radio-item:hover .radio-label {
  color: var(--win95-selection);
}

/* Windows 95风格的单选框 */
.radio-item input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background-color: var(--win95-white);
  cursor: pointer;
  position: relative;
  margin: 0;
  vertical-align: middle;
  
  /* 经典的凹陷效果 */
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-bottom: 1px solid var(--win95-white);
  border-right: 1px solid var(--win95-white);
  box-shadow: inset 1px 1px 1px #c0c0c0;
}

.radio-item input[type="radio"]:checked::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #000;
  display: block;
}

.radio-item input[type="radio"]:focus {
  outline: 1px dotted var(--win95-text);
  outline-offset: 2px;
}

.radio-label {
  font-size: 13px;
  color: var(--win95-text);
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
  white-space: nowrap;
  user-select: none;
}

/* 对话框/模态框样式 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1000;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-dialog {
  background-color: var(--win95-button-face);
  border: 2px outset var(--win95-button-face);
  min-width: 300px;
  max-width: 500px;
  /* 添加模态框阴影 */
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
}

.modal-header {
  background: linear-gradient(90deg, var(--win95-selection) 0%, #1084d0 100%);
  color: var(--win95-white);
  padding: 2px 4px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.modal-body {
  padding: 10px;
}

.modal-footer {
  padding: 8px 10px;
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.btn-close {
  background-color: var(--win95-button-face);
  border: 1px outset var(--win95-button-face);
  width: 18px;
  height: 16px;
  font-size: 12px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.btn-close::before {
  content: '×';
}

.btn-close:hover {
  background-color: var(--win95-button-light);
}

.btn-close:active {
  border: 1px inset var(--win95-button-face);
}

/* 隐藏/显示工具类 */
.hidden {
  display: none !important;
}

.invisible {
  visibility: hidden;
}

/* 位置工具类 */
.position-relative {
  position: relative;
}

.position-absolute {
  position: absolute;
}

/* 建议列表样式 */
.branch-suggestions {
  background-color: var(--win95-white);
  border: 1px solid var(--win95-button-shadow);
  max-height: 150px;
  overflow-y: auto;
  z-index: 100;
  top: 100%;
  left: 0;
  right: 0;
  /* 添加建议列表阴影 */
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.suggestion-item {
  padding: 3px 6px;
  cursor: pointer;
  font-size: 13px;
}

.suggestion-item:hover {
  background-color: var(--win95-selection);
  color: var(--win95-white);
}

/* 连接状态指示器 */
.connection-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--win95-white);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.connection-status .text-white {
  color: var(--win95-white) !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid var(--win95-white);
  margin-right: 4px;
}

.status-dot.online {
  background-color: var(--win95-green);
  animation: blink 1s infinite;
  box-shadow: 0 0 4px var(--win95-green), inset 0 1px 2px rgba(255,255,255,0.3);
}

.status-dot.offline {
  background-color: var(--win95-red);
  box-shadow: 0 0 2px var(--win95-red), inset 0 1px 2px rgba(255,255,255,0.3);
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.5; }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .lg\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  body {
    padding: 10px;
  }
  
  .window-content {
    padding: 8px;
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 18px;
  height: 18px;
  background-color: var(--win95-button-face);
}

::-webkit-scrollbar-track {
  background-color: var(--win95-button-face);
  border: 1px inset var(--win95-button-face);
}

::-webkit-scrollbar-thumb {
  background-color: var(--win95-button-face);
  border: 1px outset var(--win95-button-face);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--win95-button-light);
}

::-webkit-scrollbar-thumb:active {
  border: 1px inset var(--win95-button-face);
}

::-webkit-scrollbar-corner {
  background-color: var(--win95-button-face);
}

/* 滚动条箭头按钮 */
::-webkit-scrollbar-button {
  background-color: var(--win95-button-face);
  border: 1px outset var(--win95-button-face);
  height: 18px;
  width: 18px;
}

::-webkit-scrollbar-button:hover {
  background-color: var(--win95-button-light);
}

::-webkit-scrollbar-button:active {
  border: 1px inset var(--win95-button-face);
}

/* 特殊元素样式 */
.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-2 {
  gap: 8px;
}

.gap-4 {
  gap: 16px;
}

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

/* 高级按钮图标 */
.btn-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
}

/* 表单组样式 */
.form-group {
  margin-bottom: 8px;
}

.form-group label {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
}

/* 特殊效果：添加Windows 95风格的文本阴影 */
.window-header span {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  font-weight: bold;
}

/* 经典Windows 95风格的按钮组 */
.btn-group {
  display: flex;
  border: 1px solid var(--win95-button-shadow);
}

.btn-group .btn {
  border-radius: 0;
  border-right: 1px solid var(--win95-button-shadow);
}

.btn-group .btn:last-child {
  border-right: none;
}

/* 经典Windows 95通知样式 */
.win95-notification {
  background-color: var(--win95-yellow);
  border: 1px solid var(--win95-black);
  padding: 8px;
  font-size: 11px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* 添加经典的Windows 95启动画面风格 */
.startup-logo {
  text-align: center;
  padding: 20px;
  font-size: 18px;
  font-weight: bold;
  color: var(--win95-black);
  text-shadow: 1px 1px 0px var(--win95-white);
}

/* 增强小说明文字的可读性 */
.help-text, .description-text {
  color: var(--win95-text-secondary);
  font-size: 12px;
}

/* 响应式标题调整 */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 10px;
  }
  
  .main-title {
    font-size: 20px;
  }
} 