/**
 * drpl.co - Main Stylesheet
 * Cross-platform file sharing web application
 */

/* ===== CSS Variables - Light Theme ===== */
:root {
  /* Colors */
  --primary-color: #111111;
  --bg-color: #fff;
  --accent-color: #007bff;
  --border-color: #e0e0e0;
  --text-color: #333333;
  --secondary-text: #666666;
  --peer-icon-color: #5e94ff;
  
  /* UI Elements */
  --dialog-bg: white;
  --toast-bg: #333;
  --toast-color: white;
  --button-bg: #f0f0f0;
  --button-text: #333;
  --received-text-bg: #f9f9f9;
  --preview-bg: #f9f9f9;
  --icon-button-bg: rgba(233, 233, 233, 0.8);
  --icon-button-hover-bg: rgb(184, 184, 184);
  --carousel-nav-bg: #f5f5f5;
  --carousel-nav-hover-bg: #e5e5e5;
  --progress-circle-bg: white;
  
  /* About Panel */
  --about-bg-color: rgba(255, 255, 255, 0.95);
  --about-tagline-color: #555;
  --about-step-color: #444;
  --about-footer-color: #777;
  --close-icon-color: #555;
  
  /* Status Indicators */
  --no-peers-bg: rgba(255, 255, 255, 0.8);
  --display-name-bg: rgba(255, 255, 255, 0.8);
  --header-text-color: #333;
  --file-icon-color: #555;
  --file-size-color: #666;
  
  /* Measurements */
  --icon-size: 24px;
  --peer-size: 110px;
  --radius-small: 8px;
  --radius-medium: 12px;
  --radius-large: 16px;
  --transition-speed: 0.3s;
  
  /* Shadows */
  --shadow-subtle: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 4px 24px rgba(0, 0, 0, 0.08);
  --animation-color: rgba(0, 0, 0, 0.05);
  
  /* Action Button Variables */
  --action-button-bg: #5e94ff;
  --action-button-hover-bg: #4a7ad6;
  --action-button-text: white;
  --action-button-shadow: 0 4px 12px rgba(94, 148, 255, 0.25);
  --action-button-hover-shadow: 0 6px 16px rgba(94, 148, 255, 0.35);
  
  /* Dialog Button Variables */
  --send-button-bg: #5e94ff;
  --send-button-hover-bg: #4a7ad6;
  --send-button-text: white;
  --send-button-shadow: 0 4px 12px rgba(94, 148, 255, 0.15);
  --send-button-hover-shadow: 0 6px 16px rgba(94, 148, 255, 0.25);
  
  --cancel-button-bg: #f0f0f0;
  --cancel-button-hover-bg: #e0e0e0;
  --cancel-button-text: #333;
  --cancel-button-hover-text: #111;
  --cancel-button-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  --cancel-button-hover-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ===== Dark Theme ===== */
[data-theme="dark"] {
  /* Colors */
  --primary-color: #f0f0f0;
  --bg-color: #121212;
  --border-color: #404040;
  --text-color: #f0f0f0;
  --secondary-text: #aaaaaa;
  --peer-icon-color: #4a7ad6;
  
  /* UI Elements */
  --dialog-bg: #1e1e1e;
  --toast-bg: #f0f0f0;
  --toast-color: #121212;
  --button-bg: #333333;
  --button-text: #f0f0f0;
  --received-text-bg: #272727;
  --preview-bg: #272727;
  --icon-button-bg: rgba(37, 37, 37, 0.8);
  --icon-button-hover-bg: rgb(24, 24, 24);
  --carousel-nav-bg: #333333;
  --carousel-nav-hover-bg: #444444;
  --progress-circle-bg: #1e1e1e;
  
  /* About Panel */
  --about-bg-color: rgba(18, 18, 18, 0.95);
  --about-tagline-color: #cccccc;
  --about-step-color: #cccccc;
  --about-footer-color: #999999;
  --close-icon-color: #aaaaaa;
  
  /* Status Indicators */
  --no-peers-bg: rgba(18, 18, 18, 0.8);
  --display-name-bg: rgba(18, 18, 18, 0.8);
  --header-text-color: #f0f0f0;
  --file-icon-color: #aaaaaa;
  --file-size-color: #aaaaaa;
  
  /* Shadows */
  --shadow-subtle: 0 2px 10px rgba(0, 0, 0, 0.2);
  --shadow-medium: 0 4px 24px rgba(0, 0, 0, 0.3);
  --animation-color: rgba(255, 255, 255, 0.05);
  
  /* Action Button Variables for Dark Mode */
  --action-button-bg: #4a7ad6;
  --action-button-hover-bg: #3a67bd;
  --action-button-shadow: 0 4px 12px rgba(74, 122, 214, 0.25);
  --action-button-hover-shadow: 0 6px 16px rgba(74, 122, 214, 0.35);
  
  /* Dialog Button Variables for Dark Mode */
  --send-button-bg: #4a7ad6;
  --send-button-hover-bg: #3a67bd;
  --send-button-shadow: 0 4px 12px rgba(74, 122, 214, 0.15);
  --send-button-hover-shadow: 0 6px 16px rgba(74, 122, 214, 0.25);
  
  --cancel-button-bg: #333333;
  --cancel-button-hover-bg: #444444;
  --cancel-button-text: #f0f0f0;
  --cancel-button-hover-text: #ffffff;
  --cancel-button-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  --cancel-button-hover-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* ===== Base Styles ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color var(--transition-speed), 
              color var(--transition-speed), 
              border-color var(--transition-speed), 
              box-shadow var(--transition-speed);
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--bg-color);
}

a {
  text-decoration: none;
}

a[target="_blank"] {
  rel: "noopener noreferrer";
}

/* ===== Layout ===== */
.center {
  display: flex;
  align-items: center;
  justify-content: center;
}

header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 16px;
  z-index: 10;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-right .icon-button {
  margin-left: 2px;
}

#theme-toggle {
  margin-right: 2px;
}

footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 20px;
  z-index: 1;
}

/* ===== Background Canvas ===== */
#background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* ===== Buttons ===== */
.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-color);
  transition: background-color 0.2s, transform 0.2s, color var(--transition-speed);
  text-decoration: none;
  background-color: var(--icon-button-bg);
  box-shadow: var(--shadow-subtle);
  border: none;
}

.icon-button:hover {
  background-color: var(--icon-button-hover-bg);
  transform: scale(1.05);
}

.button {
  padding: 10px 18px;
  border-radius: var(--radius-small);
  border: none;
  background-color: var(--primary-color);
  color: var(--bg-color);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: var(--shadow-subtle);
}

.button:hover {
  background-color: #c2c2c2;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.button.secondary {
  background-color: var(--button-bg);
  color: var(--button-text);
}

.button.secondary:hover {
  background-color: var(--icon-button-hover-bg);
}

.button i {
  margin-right: 8px;
}

.button:disabled,
.button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Dialog button styling */
.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
  gap: 12px;
}

.dialog-buttons .button:not(.secondary) {
  background-color: var(--send-button-bg) !important;
  color: var(--send-button-text) !important;
  box-shadow: var(--send-button-shadow);
}

.dialog-buttons .button:not(.secondary):hover {
  background-color: var(--send-button-hover-bg) !important;
  box-shadow: var(--send-button-hover-shadow);
  transform: translateY(-2px);
}

.dialog-buttons .button.secondary {
  background-color: var(--cancel-button-bg) !important;
  color: var(--cancel-button-text) !important;
  box-shadow: var(--cancel-button-shadow);
}

.dialog-buttons .button.secondary:hover {
  background-color: var(--cancel-button-hover-bg) !important;
  color: var(--cancel-button-hover-text) !important;
  box-shadow: var(--cancel-button-hover-shadow);
  transform: translateY(-2px);
}

.dialog-buttons .button i {
  color: inherit;
}

/* Action buttons */
.action-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
  gap: 12px;
}

.action-button {
  margin: 10px;
  padding: 16px 20px;
  width: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-small);
  transition: all 0.2s;
  background-color: var(--action-button-bg) !important;
  color: var(--action-button-text) !important;
  box-shadow: var(--action-button-shadow);
}

.action-button:hover {
  transform: translateY(-2px);
  background-color: var(--action-button-hover-bg) !important;
  box-shadow: var(--action-button-hover-shadow);
}

.action-button i {
  margin-right: 12px;
  font-size: 16px;
  color: var(--action-button-text);
}

.carousel-actions {
  flex-wrap: wrap;
  justify-content: center;
}

/* ===== Peers Display ===== */
#peers-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 20px;
  position: relative;
  z-index: 1;
}

#peers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 700px;
}

.peer {
  width: var(--peer-size);
  height: var(--peer-size);
  margin: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.peer:hover {
  transform: translateY(-5px);
}

.peer:hover .peer-icon {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.peer-icon {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-medium);
  background-color: var(--peer-icon-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.peer-icon i {
  font-size: 24px;
}

.peer-name {
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
}

.peer-device {
  text-align: center;
  font-size: 12px;
  opacity: 0.7;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  color: var(--secondary-text);
}

.peer.connected .peer-icon {
  box-shadow: 0 0 0 3px var(--accent-color);
}

/* Progress Circle */
.progress-circle {
  position: absolute;
  top: 10px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: conic-gradient(var(--peer-icon-color) var(--progress, 0%), transparent 0%);
  transform: rotate(-90deg);
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.progress-circle::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border-radius: 50%;
  background: var(--progress-circle-bg);
}

.progress-circle::after {
  content: attr(data-progress) '%';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: var(--text-color);
  transform: rotate(90deg);
}

.peer[transfer] .progress-circle {
  opacity: 1;
}

/* ===== No Peers Message ===== */
#no-peers {
  display: none;
  text-align: center;
  max-width: 1000px;
  padding: 30px;
  background-color: var(--no-peers-bg);
  border-radius: var(--radius-medium);
}

#no-peers h2 {
  font-size: 20px;
  font-weight: 400;
  color: var(--text-color);
  line-height: 1.5;
  margin-bottom: 10px;
}

#no-peers p {
  font-size: 16px;
  color: var(--secondary-text);
  line-height: 1.4;
}

#peers:empty + #no-peers {
  display: block;
}

/* ===== Display Name ===== */
#display-name {
  font-size: 16px;
  font-weight: 500;
  background-color: var(--display-name-bg);
  padding: 10px 16px;
  border-radius: var(--radius-small);
  box-shadow: var(--shadow-subtle);
  color: var(--text-color);
  margin-bottom: 20px;
}

#display-name span {
  background-color: var(--peer-icon-color);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  margin-left: 4px;
  font-weight: 500;
}

/* ===== Dialog Structure ===== */
.dialog {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
}

.dialog.active {
  display: block;
}

.dialog-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 20px;
  backdrop-filter: blur(4px);
}

.dialog-content {
  background-color: var(--dialog-bg);
  border-radius: var(--radius-medium);
  padding: 24px;
  max-width: 480px;
  width: 94%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-medium);
  animation: dialog-appear 0.3s ease-out;
  touch-action: pan-y;
  position: relative;
}

.dialog h3 {
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 500;
  color: var(--header-text-color);
  line-height: 1.5;
}

/* ===== Text Input ===== */
.textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-small);
  padding: 16px;
  margin: 16px 0;
  outline: none;
  resize: none;
  overflow: auto;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: var(--bg-color);
  color: var(--text-color);
}

.textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.textarea[placeholder]:empty:before {
  content: attr(placeholder);
  color: var(--secondary-text);
}

/* ===== Message Dialog ===== */
.message-container {
  margin-bottom: 16px;
}

.received-text {
  width: 100%;
  min-height: 60px;
  max-height: 200px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-small);
  padding: 16px;
  margin: 10px 0;
  overflow: auto;
  word-break: break-word;
  line-height: 1.5;
  background-color: var(--received-text-bg);
  color: var(--text-color);
}

.reply-container {
  margin-top: 15px;
}

#reply-input {
  min-height: 80px;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
}

/* ===== File Carousel ===== */
.file-carousel {
  margin: 20px 0;
  position: relative;
}

.file-info {
  text-align: center;
  max-width: 90%;
  margin: 0 auto 16px auto;
  transition: all 0.3s ease;
}

.file-name {
  font-weight: 500;
  margin-bottom: 6px;
  word-break: break-all;
  font-size: 16px;
  color: var(--text-color);
}

.file-size {
  font-size: 14px;
  color: var(--file-size-color);
}

/* Carousel Container */
.carousel-item-container {
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease;
  user-select: none;
  pointer-events: auto;
  touch-action: pan-y;
}

.carousel-item-container.fade-out {
  opacity: 0;
}

.carousel-item-container.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

.carousel-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 1;
  transition: all 0.3s ease;
  pointer-events: none;
}

.carousel-item a, 
.carousel-item img,
.carousel-item .preview,
.carousel-item .file-info {
  pointer-events: auto;
}

/* Carousel Navigation */
.carousel-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  position: relative;
  z-index: 25;
  pointer-events: auto;
}

.carousel-nav-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: var(--carousel-nav-bg);
  border: none;
  color: var(--text-color);
  transition: background-color 0.2s, transform 0.2s, opacity 0.2s;
  position: relative;
  z-index: 30;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 0 10px;
  user-select: none;
}

.carousel-nav-button:hover:not(.disabled) {
  background-color: var(--carousel-nav-hover-bg);
  transform: scale(1.1);
}

.carousel-nav-button:active {
  transform: scale(0.95);
}

.carousel-nav-button:focus {
  outline: none;
}

.carousel-nav-button.disabled,
.carousel-nav-button:disabled {
  opacity: 0.4;
  cursor: not-allowed !important;
  pointer-events: all !important;
  transform: none;
  background-color: var(--carousel-nav-bg) !important;
  color: var(--text-color) !important;
  border: none !important;
  box-shadow: none !important;
}

.carousel-counter {
  padding: 5px 14px;
  background-color: var(--carousel-nav-bg);
  border-radius: 16px;
  font-weight: 500;
  min-width: 70px;
  text-align: center;
  transition: all 0.3s ease;
}

/* File Preview */
.preview {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background-color: var(--preview-bg);
  border-radius: var(--radius-small);
  margin: 16px 0;
  transition: all 0.3s ease;
}

.carousel-image {
  max-width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: var(--shadow-subtle);
  transition: transform 0.3s ease;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

.carousel-image:hover {
  transform: scale(1.02);
}

/* File Type Display */
.file-type-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.file-extension {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  color: var(--file-icon-color);
  margin-top: 8px;
  padding: 4px 12px;
  background-color: var(--button-bg);
  border-radius: var(--radius-small);
  box-shadow: var(--shadow-subtle);
  text-transform: uppercase;
}

.file-icon {
  margin: 20px 0 30px;
  color: var(--file-icon-color);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.file-icon i {
  margin-bottom: 8px;
}

/* ===== Transfer Progress Dialog ===== */
.transfer-progress-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  text-align: center;
}

.spinner-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 6px solid var(--border-color);
  border-top-color: var(--peer-icon-color);
  animation: spinner-rotation 1.5s linear infinite;
}

.progress-percentage {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-color);
}

.transfer-details {
  margin-top: 16px;
  width: 100%;
}

.file-counter {
  font-size: 16px;
  color: var(--secondary-text);
  margin-bottom: 8px;
}

.transfer-filename {
  font-size: 14px;
  color: var(--text-color);
  font-weight: 500;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
  margin: 0 auto;
}

.transfer-speed {
  font-size: 14px;
  color: var(--secondary-text);
  text-align: center;
  margin-top: 16px;
}

#close-transfer {
  margin-top: 10px;
  min-width: 100px;
  transition: all 0.2s ease;
}

#close-transfer:hover {
  background-color: var(--cancel-button-hover-bg);
  transform: translateY(-2px);
}

/* ===== Toast Notification ===== */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 50;
}

.toast {
  background-color: var(--toast-bg);
  color: var(--toast-color);
  padding: 14px 24px;
  border-radius: var(--radius-small);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: auto;
  max-width: 90%;
  font-weight: 500;
}

.toast.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== About Page ===== */
.about {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  color: var(--text-color);
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about:target {
  visibility: visible;
}

.about-content {
  position: relative;
  z-index: 210;
  flex-direction: column;
  text-align: center;
  height: 100%;
  width: 100%;
  max-width: 100%;
  padding: 0;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.4s, transform 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about:target .about-content {
  opacity: 1;
  transform: scale(1);
}

.about-container {
  max-width: 700px;
  width: 90%;
  background-color: var(--dialog-bg);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-medium);
  padding: 40px;
  margin: 30px 0;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

.about-header {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 220;
}

.about-header .close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: var(--icon-button-hover-bg);
  transition: background-color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-header .close:hover {
  background-color: var(--carousel-nav-hover-bg);
  transform: scale(1.05);
}

.about-header .close i {
  font-size: 16px;
  color: var(--close-icon-color);
}

.about-logo-section {
  margin-bottom: 30px;
  padding-right: 20px;
}

.about-logo {
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
}

.about-logo img {
  width: 80px;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.about h1 {
  font-size: 32px;
  font-weight: 600;
  margin: 10px 0;
  color: var(--text-color);
}

.about-tagline {
  margin-top: 15px;
}

.about-tagline p {
  font-size: 18px;
  color: var(--about-tagline-color);
  max-width: 450px;
  margin: 0 auto;
  line-height: 1.5;
}

.about-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 30px auto;
  width: 80%;
}

.about-details {
  max-width: 100%;
  text-align: left;
  margin-bottom: 30px;
}

.about-details h2 {
  margin-bottom: 14px;
}

.about-details h3 {
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 20px 0;
  text-align: center;
  color: var(--header-text-color);
}

.about-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.step-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background-color: var(--button-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--button-text);
  margin-top: 2px;
}

.step-icon i {
  font-size: 16px;
}

.about-step p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--about-step-color);
}

.about-footer {
  text-align: center;
  font-size: 14px;
  color: var(--about-footer-color);
  margin-top: 20px;
}

.about-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--about-bg-color);
  opacity: 0;
  transition: opacity 0.4s;
  backdrop-filter: blur(4px);
}

.about:target .about-background {
  opacity: 1;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dialog-appear {
  from { 
    opacity: 0.5;
    transform: scale(0.95);
  }
  to { 
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes spinner-rotation {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

.dialog.active .dialog-content {
  animation: dialogAppear 0.3s ease forwards;
}

@keyframes dialogAppear {
  from { 
    opacity: 0.5;
    transform: scale(0.95);
  }
  to { 
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== Mobile Specific ===== */
@media (max-width: 768px) {
  /* Carousel navigation improvements */
  .carousel-navigation {
    margin-bottom: 20px;
  }
  
  .carousel-nav-button {
    width: 50px;
    height: 50px;
  }
  
  .carousel-nav-button i {
    font-size: 18px;
  }
  
  /* Add swipe hint text for mobile */
  .file-carousel::before {
    content: 'Swipe to navigate';
    display: block;
    text-align: center;
    font-size: 12px;
    color: var(--secondary-text);
    margin-bottom: 10px;
    opacity: 0.8;
  }
}

/* ===== Responsive Styles ===== */
@media (min-width: 600px) {
  .action-buttons {
    flex-direction: row;
    justify-content: center;
    gap: 16px;
  }
  
  .carousel-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 600px) {
  .about-container {
    padding: 30px 20px;
    width: 94%;
    max-height: 92vh;
  }
  
  .about-step {
    flex-direction: row;
    gap: 12px;
  }
  
  .about h1 {
    font-size: 28px;
  }
  
  .about-tagline p {
    font-size: 16px;
  }
  
  .step-icon {
    width: 32px;
    height: 32px;
  }

  .dialog-content {
    padding: 20px;
  }

  .button {
    padding: 10px 16px;
  }
  
  .carousel-image {
    max-height: 200px;
  }
}

@media (max-width: 380px) {
  .about-container {
    padding: 24px 16px;
  }
  
  .about-step {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }
  
  .about-steps {
    gap: 20px;
  }

  .dialog-buttons {
    flex-direction: column;
    gap: 8px;
  }

  .dialog-buttons .button {
    width: 100%;
  }
  
  .carousel-navigation {
    margin-bottom: 10px;
  }
  
  .carousel-nav-button {
    width: 32px;
    height: 32px;
  }
  
  .carousel-counter {
    font-size: 14px;
  }
}

/* PWA Splash Screen */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #121212;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
  opacity: 1;
}

.splash-screen[style*="display: none"] {
  display: none !important;
}

.splash-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.splash-logo {
  width: 120px;
  height: 120px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===== Refresh Button Styles ===== */
#refresh-connection, #manual-refresh {
  position: relative;
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

#refresh-connection:hover, #manual-refresh:hover {
  transform: scale(1.05) rotate(0deg);
  animation-play-state: paused;
}

#refresh-connection:active, #manual-refresh:active {
  transform: scale(0.95);
}

#refresh-connection .fa-sync {
  transition: transform 0.3s ease;
}

#refresh-connection:hover .fa-sync {
  transform: rotate(180deg);
}

/* Add a slight pulse effect when connections are being refreshed */
.refreshing-connection #refresh-connection {
  animation: pulse-refresh 1.5s ease infinite;
}

.refreshing-connection #refresh-connection .fa-sync {
  animation: spin-refresh 1.5s linear infinite;
}

/* Animation for the refresh icon */
@keyframes spin-refresh {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse-refresh {
  0% { box-shadow: 0 0 0 0 rgba(var(--peer-icon-color-rgb, 94, 148, 255), 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(var(--peer-icon-color-rgb, 94, 148, 255), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--peer-icon-color-rgb, 94, 148, 255), 0); }
}

/* Tooltip for mobile devices */
@media (max-width: 768px) {
  #refresh-connection::after, #manual-refresh::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--toast-bg);
    color: var(--toast-color);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
    z-index: 100;
  }

  #refresh-connection:active::after, #manual-refresh:active::after {
    opacity: 1;
    visibility: visible;
    bottom: -35px;
  }
}

/* Add RGB color variables for animation effects - for both light and dark themes */
:root {
  --peer-icon-color-rgb: 94, 148, 255;
}

[data-theme="dark"] {
  --peer-icon-color-rgb: 74, 122, 214;
}

/* Button order and spacing */
.header-right {
  gap: 10px;
}

#manual-refresh {
  margin-right: 2px;
}