:root {
  --primary: #0a8f7a;
  --primary-light: #0fb9a8;
  --bg: #f4f7fa;
  --card: #ffffff;
  --danger: #e74c3c;
  --success: #2ecc71;
  --text: #2c3e50;
  --muted: #95a5a6;
}

* {
  font-family: 'Inter', system-ui, sans-serif;
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.app-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 14px 40px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-image {
  height: 80px;
  width: auto;
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.header-btn {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.header-btn.danger:hover {
  background: rgba(231, 76, 60, 0.3);
  border-color: rgba(231, 76, 60, 0.5);
}

.logo {
  font-size: 26px;
  font-weight: 700;
}

.subtitle {
  font-size: 13px;
  opacity: 0.9;
}

.app {
  max-width: 1200px;
  margin: auto;
  padding: 16px 16px 40px;
}

.table-header {
  display: flex;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 12px 8px;
  border-radius: 12px 12px 0 0;
  font-weight: 600;
  margin-bottom: 2px;
}

.header-cell {
  padding: 8px;
  text-align: center;
  font-size: 14px;
  flex: 1;
  min-width: 100px;
}

.header-cell.subject-name-cell {
  flex: 2;
  min-width: 150px;
  text-align: left;
  padding-left: 12px;
}

.header-cell.actions-cell {
  flex: 0.8;
  min-width: 80px;
}

.subject-card {
  background: var(--card);
  border-radius: 8px;
  margin-bottom: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  animation: fadeIn 0.3s;
}

.subject-row {
  display: flex;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.subject-cell {
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.subject-name-cell {
  flex: 2;
  min-width: 150px;
  justify-content: flex-start;
  font-weight: 600;
}

.subject-name-display {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  text-align: left;
}

.subject-cell:not(.subject-name-cell):not(.actions-cell):not(.result-cell) {
  flex: 1;
  min-width: 100px;
}

.result-cell {
  flex: 1;
  min-width: 80px;
}

.actions-cell {
  flex: 0.8;
  min-width: 80px;
  gap: 8px;
}

.disabled-cell {
  opacity: 0.4;
  background: #f8f8f8;
}

.settings-btn,
.delete-btn {
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  transition: transform 0.2s;
}

.settings-btn:hover .action-icon,
.delete-btn:hover .action-icon {
  transform: scale(1.15);
}

.settings-panel {
  background: #f8f9fa;
  padding: 16px;
  border-top: 1px solid #e0e0e0;
  margin-top: 8px;
  border-radius: 8px;
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-content label:first-child {
  font-weight: 600;
  font-size: 13px;
}

.close-settings {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.input {
  padding: 8px;
  border-radius: 6px;
  border: 2px solid #ddd;
  font-size: 14px;
  width: 100%;
  text-align: center;
  transition: border-color 0.2s;
}

.input:focus {
  outline: none;
}

.input:disabled {
  background: #f0f0f0;
  cursor: not-allowed;
  border-color: #ddd;
}

.input.valid {
  border-color: var(--success);
}

.input.empty {
  border-color: #f1c40f;
}

.input.invalid {
  border-color: var(--danger);
}

.checkbox-group {
  display: flex;
  gap: 16px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.result {
  font-weight: 700;
  font-size: 16px;
}

.result.good { color: var(--success); }
.result.bad { color: var(--danger); }

.error {
  border: 2px solid var(--danger);
}

.add-subject-btn {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 14px;
  font-size: 16px;
  margin-top: 10px;
  position: relative;
  z-index: 10;
  cursor: pointer;
}

.add-subject-btn:active {
  transform: scale(0.96);
}

.global-card {
  margin-top: 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(10, 143, 122, 0.3);
  transition: transform 0.3s;
}

.global-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(10, 143, 122, 0.4);
}

.global-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.global-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  animation: pulse 2s infinite;
  filter: brightness(0) invert(1);
}

.global-title {
  font-size: 15px;
  font-weight: 600;
  opacity: 0.95;
}

.global-value-wrapper {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.global-label {
  font-size: 11px;
  opacity: 0.85;
  font-weight: 500;
}

.global-value {
  font-size: 38px;
  font-weight: 700;
  animation: scaleIn 0.5s;
}

.global-max {
  font-size: 18px;
  opacity: 0.8;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: white;
  border-radius: 999px;
  transition: width 0.6s ease;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.global-status {
  font-size: 16px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: fadeIn 0.5s;
}

.status-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes scaleIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin: 20px;
  position: relative;
  z-index: 1;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-left {
  pointer-events: none;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.footer-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.footer-separator {
  color: var(--border);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .app-header {
    padding: 16px;
  }

  .header-content {
    flex-direction: column;
    gap: 16px;
  }

  .logo-container {
    width: 100%;
    justify-content: center;
  }

  .logo-image {
    height: 50px;
  }

  .header-text {
    text-align: center;
  }

  .logo {
    font-size: 22px;
  }

  .subtitle {
    font-size: 12px;
  }

  .header-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .header-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .app {
    padding: 12px;
  }

  .table-header {
    display: none;
  }

  .subject-card {
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 12px;
  }

  .subject-row {
    flex-direction: column;
    gap: 10px;
    padding: 0;
  }

  .subject-cell {
    width: 100%;
    min-width: unset;
    flex: unset;
  }

  .subject-name-cell {
    padding: 8px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    margin: -12px -12px 8px -12px;
    justify-content: center;
  }

  .subject-name-display {
    text-align: center;
    color: white;
  }

  .subject-cell:not(.subject-name-cell):not(.actions-cell):not(.result-cell) {
    position: relative;
    padding: 10px;
  }

  .subject-cell:not(.subject-name-cell):not(.actions-cell):not(.result-cell)::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    font-weight: 600;
    font-size: 12px;
    color: var(--muted);
  }

  .input {
    padding: 10px;
    font-size: 16px;
  }

  .result-cell {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
  }

  .result-cell::before {
    content: "Moyenne: ";
    font-weight: 600;
    margin-right: 8px;
  }

  .actions-cell {
    justify-content: center;
    padding: 10px;
  }

  .settings-btn,
  .delete-btn {
    font-size: 22px;
    padding: 8px 12px;
  }

  .add-subject-btn {
    padding: 12px;
    font-size: 15px;
  }

  .global-card {
    padding: 16px;
  }

  .global-value {
    font-size: 32px;
  }

  .undo-notification {
    bottom: 20px;
    right: 20px;
    left: 20px;
    padding: 12px 16px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .app {
    padding: 16px;
  }

  .header-btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  .logo-image {
    height: 55px;
  }

  .subject-cell {
    min-width: 80px;
  }
}
/* Tabs Styles */
.tabs-container {
  display: flex;
  align-items: flex-end;
  margin-bottom: 16px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 3px;
  background: #f5f5f5;
  padding-left: 8px;
}

.tabs-list {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-list::-webkit-scrollbar {
  display: none;
}

.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #d4d4d4;
  border: 1px solid #aaa;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  min-width: 120px;
  max-width: 200px;
  flex: 1;
  position: relative;
  user-select: none;
}

.tab:hover {
  background: #e8e8e8;
}

.tab.active {
  background: white;
  border-color: #e0e0e0;
  border-bottom: 2px solid white;
  margin-bottom: -2px;
  font-weight: 600;
}

.tab.dragging {
  opacity: 0.5;
  background: #4CAF50;
  color: white;
  transform: scale(1.02);
}

.tab.drag-over {
  background: #81C784;
  color: white;
  border-color: #4CAF50;
  box-shadow: inset 0 0 8px rgba(76, 175, 80, 0.5);
}

.tab-name {
  flex: 1;
  font-size: 14px;
  cursor: pointer;
}

.tab-name.editing {
  background: white;
  border: 1px solid var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  outline: none;
}

.tab-close {
  background: none;
  border: none;
  color: #999;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.tab-close:hover {
  background: rgba(231, 76, 60, 0.2);
  color: var(--danger);
}

.tab-add {
  background: transparent;
  color: #666;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0 8px 2px 4px;
}

.tab-add:hover {
  background: rgba(0, 0, 0, 0.1);
}

.tab-add:active {
  background: rgba(0, 0, 0, 0.15);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.2s;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  text-align: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text);
}

.modal-body {
  overflow-y: auto;
  max-height: calc(85vh - 140px);
  flex: 1;
  padding: 20px;
}

.modal-body p {
  margin: 0 0 16px 0;
  font-weight: 600;
  color: var(--text);
}

.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #f8f8f8;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.checkbox-list label:hover {
  background: #f0f0f0;
}

.checkbox-list input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f8f8f8;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.radio-group label:hover {
  background: #f0f0f0;
}

.radio-group input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.modal-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #e0e0e0;
  margin-top: auto;
  flex-shrink: 0;
}

.modal-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-btn.cancel {
  background: #f0f0f0;
  color: var(--text);
}

.modal-btn.cancel:hover {
  background: #e0e0e0;
}

.modal-btn.primary {
  background: var(--primary);
  color: white;
}

.modal-btn.primary:hover {
  background: var(--primary-light);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Toast Notification */
.toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2000;
  animation: slideInRight 0.3s ease-out;
  border-left: 4px solid var(--success);
  min-width: 300px;
}

.toast-notification.error {
  border-left-color: var(--danger);
}

.toast-notification.warning {
  border-left-color: #f39c12;
}

.toast-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.toast-close {
  background: none;
  border: none;
  color: #999;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.toast-close:hover {
  background: #f0f0f0;
  color: #666;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Print Styles */
/* Print Info Section */
.print-info-section {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 12px 0 0 0;
  text-align: center;
}

.print-info-content h3 {
  margin: 0 0 4px 0;
  font-size: 10px;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.print-info-content p {
  margin: 0;
  font-size: 10px;
  color: #999;
  font-weight: 400;
}

@media print {
  @page {
    size: auto;
    margin: 10mm;
  }

  body {
    margin: 0;
    padding: 0;
  }

  .app-header,
  .tabs-container,
  .footer,
  .settings-btn,
  .delete-btn,
  .add-subject-btn,
  .header-actions,
  .modal,
  .actions-cell,
  .header-cell.actions-cell,
  .subject-cell.actions-cell {
    display: none !important;
  }

  /* Force desktop table layout */
  .table-header {
    display: flex !important;
  }

  .subject-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 0 !important;
  }

  .subject-cell {
    width: auto !important;
    min-width: 100px !important;
    flex: 1 !important;
    padding: 4px 8px !important;
  }

  .subject-name-cell {
    flex: 2 !important;
    min-width: 150px !important;
    background: transparent !important;
    color: var(--text) !important;
    border-radius: 0 !important;
    margin: 0 !important;
    justify-content: flex-start !important;
  }

  .subject-name-display {
    color: var(--text) !important;
  }

  .subject-cell::before {
    content: none !important;
    display: none !important;
  }

  .result-cell::before {
    content: none !important;
    display: none !important;
  }

  .result-cell {
    background: transparent !important;
    border-radius: 0 !important;
    padding: 4px 8px !important;
    flex: 1 !important;
    min-width: 80px !important;
  }

  .table-header,
  .subject-row,
  .global-card,
  .subject-card {
    page-break-inside: avoid;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Tab Color Picker */
.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 10px;
}

.color-option {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border: 3px solid transparent;
}

.color-option:hover {
  transform: scale(1.1);
  border-color: rgba(0, 0, 0, 0.2);
}

.color-option.selected {
  border-color: #333;
  transform: scale(1.15);
}

.tab.colored {
  border-top: 3px solid;
}

.tab.colored.active {
  border-top-width: 4px;
}

/* Keyboard Shortcuts Modal */
.shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8f8f8;
  border-radius: 8px;
}

.shortcut-item kbd {
  background: white;
  border: 2px solid #ddd;
  border-radius: 4px;
  padding: 4px 8px;
  font-family: monospace;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 0 #ddd;
  min-width: 30px;
  text-align: center;
}

.shortcut-item span {
  flex: 1;
  color: var(--text);
  font-size: 14px;
}

/* Settings Modal */
.modal-large {
  max-width: 600px;
}

.modal-help {
  max-width: 700px;
  max-height: 85vh;
}

.modal-help .modal-header {
  padding: 20px !important;
  border-bottom: 1px solid #e0e0e0 !important;
  text-align: left !important;
}

.modal-help .modal-header h3 {
  color: var(--text);
  font-size: 20px;
  margin: 0;
}

.modal-help .modal-close {
  color: #999;
  font-size: 28px;
}

.modal-help .modal-close:hover {
  color: var(--danger);
}

.modal-help .modal-body {
  max-height: calc(85vh - 140px);
  overflow-y: auto;
  padding: 20px;
  flex: 1;
  scrollbar-width: auto;
  scrollbar-color: #4CAF50 #e8e8e8;
}

.modal-help .modal-body::-webkit-scrollbar {
  width: 10px;
}

.modal-help .modal-body::-webkit-scrollbar-track {
  background: #e8e8e8;
  border-radius: 5px;
}

.modal-help .modal-body::-webkit-scrollbar-thumb {
  background: #4CAF50;
  border-radius: 5px;
  border: 2px solid #e8e8e8;
}

.modal-help .modal-body::-webkit-scrollbar-thumb:hover {
  background: #45a049;
}

.help-section {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.help-section:last-child {
  border-bottom: none;
}

.help-section h4 {
  color: var(--primary);
  font-size: 16px;
  margin-bottom: 12px;
  font-weight: 600;
}

.help-section p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 12px;
  font-size: 14px;
}

.help-feature {
  display: flex;
  gap: 16px;
  margin: 12px 0;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  transition: background 0.2s;
}

.help-feature:hover {
  background: #f0f2f5;
}

.feature-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.feature-content {
  flex: 1;
}

.feature-content strong {
  color: #333;
  font-size: 14px;
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

.feature-content p {
  margin: 0 0 6px 0;
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.feature-content ul {
  margin: 8px 0;
  padding-left: 20px;
}

.feature-content li {
  margin: 4px 0;
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.feature-content ul {
  margin: 6px 0 0 0;
  padding-left: 16px;
}

.highlight {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 13px;
}

.tip {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 10px 12px;
  margin: 12px 0;
  border-radius: 4px;
  font-size: 14px;
  color: #856404;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.shortcut-help-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 6px;
  text-align: center;
}

.shortcut-help-item kbd {
  background: white;
  border: 1px solid #d0d0d0;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  color: #555;
}

.shortcut-help-item span {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.shortcut-help-item kbd {
  background: white;
  border: 2px solid #ddd;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
}

.shortcut-help-item span {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.tips-list {
  list-style: none;
  padding: 0;
}

.tips-list li {
  padding: 10px 12px;
  margin: 8px 0;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}

.settings-description {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.shortcuts-toggle-container {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.toggle-label-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.toggle-label-group .settings-description {
  margin: 0;
  flex: 1;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 1px var(--primary);
}

#shortcutsConfigSection {
  transition: opacity 0.3s, filter 0.3s;
}

#shortcutsConfigSection.disabled {
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(0.8);
}

.shortcuts-settings {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.shortcut-setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8f8f8;
  border-radius: 8px;
  transition: background 0.2s;
}

.shortcut-setting:hover {
  background: #f0f0f0;
}

.shortcut-label {
  font-weight: 500;
  color: var(--text);
}

.shortcut-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modifier-select {
  background: white;
  border: 2px solid #ddd;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
}

.modifier-select:hover,
.modifier-select:focus {
  border-color: var(--primary);
}

.plus-sign {
  font-weight: 600;
  color: #999;
  font-size: 14px;
}

.key-capture-btn {
  background: white;
  border: 2px solid #ddd;
  border-radius: 6px;
  padding: 8px 20px;
  font-family: monospace;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 60px;
  text-align: center;
  text-transform: uppercase;
}

.key-capture-btn:hover {
  border-color: var(--primary);
  background: #f8f8f8;
}

.key-capture-btn.capturing {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  animation: pulse 1s infinite;
}

.shortcut-capture {
  background: var(--primary);
  color: white;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  margin-top: 16px;
}

.shortcut-capture p {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
}

.shortcut-capture small {
  display: block;
  opacity: 0.9;
  margin-bottom: 16px;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
/* Percentage Settings Styles */
.percentage-settings-container {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
  max-height: 400px;
  overflow-y: auto;
}

.percentage-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.preset-btn {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.preset-btn:hover {
  border-color: var(--primary);
  background: #f0fffe;
  box-shadow: 0 2px 8px rgba(10, 143, 122, 0.1);
}

.preset-btn.active {
  border-color: var(--primary);
  background: #e8f8f5;
  font-weight: 600;
}

.preset-name {
  display: block;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 4px;
  font-weight: 500;
}

.preset-values {
  display: block;
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}

.custom-percentage-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.custom-percentage-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.percentage-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.percentage-input-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.percentage-input-group input {
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
}

.percentage-input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 143, 122, 0.1);
}

/* Percentage Modal Styles */
.percentage-modal-content {
  padding: 8px 0;
}

.percentage-preset-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.modal-preset-btn {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text);
}

.modal-preset-btn:hover {
  border-color: var(--primary);
  background: #f0fffe;
}

.modal-preset-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.or-divider {
  text-align: center;
  margin: 16px 0;
  position: relative;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.or-divider::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  right: 0;
  height: 1px;
  background: #e5e7eb;
  z-index: 0;
}

.or-divider::after {
  content: 'OR';
  position: relative;
  background: white;
  padding: 0 8px;
  z-index: 1;
}

.modal-custom-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.modal-percentage-input {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-percentage-input label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.modal-percentage-input {
  position: relative;
}

.modal-percentage-input input {
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  text-align: center;
}

.modal-percentage-input input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 143, 122, 0.1);
}

.percent-symbol {
  position: absolute;
  right: 12px;
  top: 32px;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}

.percentage-total-display {
  background: #f0fffe;
  border: 2px solid var(--primary);
  border-radius: 6px;
  padding: 12px;
  text-align: center;
  font-weight: 600;
  color: var(--primary);
  margin-top: 12px;
}

.percentage-total-display.invalid {
  border-color: var(--danger);
  background: rgba(231, 76, 60, 0.1);
  color: var(--danger);
}

/* Tab Percentage Badge */
.tab-percentage-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 8px;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-percentage-badge:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text);
}

/* Privacy Policy Styles */
.privacy-content {
  line-height: 1.8;
}

.privacy-content .last-updated {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  font-style: italic;
}

.privacy-content h4 {
  color: var(--primary);
  margin-top: 25px;
  margin-bottom: 12px;
  font-size: 15px;
}

.privacy-content p {
  margin-bottom: 12px;
  color: var(--text);
}

.privacy-content ul {
  margin: 10px 0;
  padding-left: 25px;
}

.privacy-content li {
  margin-bottom: 8px;
  color: var(--text);
}

.privacy-content a {
  color: var(--primary);
  text-decoration: none;
}

.privacy-content a:hover {
  text-decoration: underline;
}

/* Contact Us Styles */
.contact-content {
  line-height: 1.6;
}

.contact-intro {
  background: linear-gradient(135deg, rgba(10, 143, 122, 0.08), rgba(10, 143, 122, 0.03));
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 25px;
  border-left: 3px solid var(--primary);
}

.contact-intro p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.contact-section {
  margin-bottom: 30px;
}

.contact-section h4 {
  color: var(--primary);
  margin-bottom: 15px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.email-box {
  background: var(--background);
  padding: 15px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.email-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.email-link {
  color: var(--primary);
  font-size: 16px;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.email-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.social-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--text);
  flex: 1;
  min-width: 140px;
  justify-content: center;
}

.social-btn svg {
  flex-shrink: 0;
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.github-btn:hover {
  background: #24292e;
  color: white;
  border-color: #24292e;
}

.telegram-btn:hover {
  background: #0088cc;
  color: white;
  border-color: #0088cc;
}

.instagram-btn:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: white;
  border-color: transparent;
}

.donate-section {
  background: linear-gradient(135deg, rgba(255, 94, 94, 0.08), rgba(255, 94, 94, 0.03));
  padding: 20px;
  border-radius: 10px;
  border: 1px solid rgba(255, 94, 94, 0.2);
}

.donate-section h4 {
  color: #ff5e5e;
}

.donate-section p {
  color: var(--text);
  margin-bottom: 15px;
  font-size: 14px;
}

.donate-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.donate-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 180px;
  justify-content: center;
}

.kofi-btn {
  background: #FF5E5B;
  color: white;
  border: none;
}

.kofi-btn:hover {
  background: #e04e4b;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 94, 91, 0.4);
}

.contact-footer-note {
  background: var(--background);
  padding: 15px;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
  margin-top: 25px;
}

.contact-footer-note p {
  margin: 0;
  font-size: 13px;
  color: var(--text);
}

.contact-footer-note strong {
  color: var(--primary);
}

/* Responsive adjustments for contact/privacy */
@media (max-width: 768px) {
  .social-links,
  .donate-buttons {
    flex-direction: column;
  }
  
  .social-btn,
  .donate-btn {
    min-width: 100%;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}
