/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: linear-gradient(rgba(52, 73, 94, 0.85), rgba(44, 62, 80, 0.95)) center/cover fixed;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
}

/* Section-specific backgrounds */
body.section-stardew {
  background: linear-gradient(rgba(92, 148, 87, 0.85), rgba(52, 73, 94, 0.95)), url('../images/stardew-background.jpg') center/cover fixed;
}

body.section-corekeeper {
  background: linear-gradient(rgba(139, 90, 43, 0.85), rgba(52, 73, 94, 0.95)) center/cover fixed;
}

body.section-hytale {
  background: linear-gradient(rgba(52, 152, 219, 0.85), rgba(44, 62, 80, 0.95)) center/cover fixed;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
header {
  background: linear-gradient(rgba(44, 62, 80, 0.95), rgba(44, 62, 80, 0.98)) center/cover;
  color: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(139, 195, 74, 0.3);
}

/* Section-specific header backgrounds */
body.section-stardew header {
  background: linear-gradient(rgba(44, 62, 80, 0.95), rgba(44, 62, 80, 0.98)), url('../images/stardew-header.jpg') center/cover;
  border-color: rgba(139, 195, 74, 0.3);
}

body.section-corekeeper header {
  border-color: rgba(255, 152, 0, 0.3);
}

body.section-hytale header {
  border-color: rgba(52, 152, 219, 0.3);
}

header h1 {
  margin-bottom: 15px;
  font-size: 1.8em;
}

/* ===================================
   Hero Section (Core Keeper style)
   =================================== */

.hero-section {
  width: 100%;
  height: 350px;
  background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
                    url('../images/corekeeper-background.jpg');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  border-bottom: 3px solid #3498db;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  position: relative;
}

.hero-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero-header {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-title {
  color: #ffffff;
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
  color: #ecf0f1;
  font-size: 1.2em;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
}

/* Navigation in Hero Section */
.hero-section nav {
  display: flex;
  gap: 15px;
  align-items: center;
  width: 100%;
  justify-content: center;
  padding: 15px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
}

.hero-section nav a {
  color: #ecf0f1;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
  font-weight: 500;
}

.hero-section nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.hero-section nav a.active {
  background-color: #3498db;
  color: white;
}

/* Wiki Search in Hero */
.wiki-search-container {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  border: 2px solid rgba(236, 240, 241, 0.3);
  border-radius: 6px;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.1);
  transition: border-color 0.2s, background-color 0.2s;
}

.wiki-search-container:focus-within {
  border-color: rgba(52, 152, 219, 0.6);
  background-color: rgba(255, 255, 255, 0.15);
}

.wiki-search-input {
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #ecf0f1;
  font-size: 14px;
  outline: none;
  width: 200px;
  transition: width 0.3s;
}

.wiki-search-input::placeholder {
  color: rgba(236, 240, 241, 0.5);
}

.wiki-search-input:focus {
  width: 250px;
}

.wiki-search-btn {
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #ecf0f1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  border-left: 1px solid rgba(236, 240, 241, 0.2);
}

.wiki-search-btn:hover {
  background-color: rgba(52, 152, 219, 0.3);
}

.wiki-search-btn:active {
  background-color: rgba(52, 152, 219, 0.5);
}

.search-icon {
  font-size: 16px;
  line-height: 1;
}

nav {
  display: flex;
  gap: 15px;
  align-items: center;
  width: 100%;
}

nav a {
  color: #ecf0f1;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

nav a:hover {
  background-color: #34495e;
}

nav a.active {
  background-color: #3498db;
}

/* User Menu Dropdown */
.user-menu {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}

.user-menu-toggle {
  background-color: transparent;
  border: 2px solid rgba(236, 240, 241, 0.3);
  color: #ecf0f1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
}

.user-menu-toggle:hover {
  background-color: rgba(52, 73, 94, 0.5);
  border-color: rgba(236, 240, 241, 0.5);
}

.user-menu-toggle.active {
  background-color: #3498db;
  border-color: #3498db;
}

.user-avatar {
  font-size: 20px;
  line-height: 1;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background-color: #2c3e50;
  border: 1px solid rgba(236, 240, 241, 0.2);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  color: #ecf0f1;
  text-decoration: none;
  padding: 12px 16px;
  transition: background-color 0.2s;
  border-radius: 0;
}

.dropdown-item:first-child {
  border-radius: 6px 6px 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 6px 6px;
}

.dropdown-item:hover {
  background-color: #34495e;
}

/* Main content */
main {
  background-color: rgba(255, 255, 255, 0.97);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  margin-bottom: 20px;
  backdrop-filter: blur(5px);
}

/* Sections */
.connection-section,
.controls-section,
.output-section,
.settings-section,
.error-section {
  margin-bottom: 30px;
}

/* Connection Section */
.connection-section {
  background: linear-gradient(135deg, rgba(139, 195, 74, 0.1) 0%, rgba(76, 175, 80, 0.15) 100%);
  border: 2px solid rgba(139, 195, 74, 0.4);
  border-radius: 8px;
  padding: 25px;
}

.connection-steps ol {
  margin: 15px 0;
  padding-left: 25px;
  line-height: 1.8;
}

.connection-steps ol li {
  margin-bottom: 8px;
}

.server-address-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.server-address {
  background-color: #1e1e1e;
  color: #8bc34a;
  padding: 12px 20px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 16px;
  font-weight: 600;
  flex: 1;
  min-width: 250px;
  border: 2px solid rgba(139, 195, 74, 0.3);
  user-select: all;
}

.btn-copy {
  background-color: #8bc34a;
  color: white;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.btn-copy:hover:not(:disabled) {
  background-color: #7cb342;
}

.btn-copy.copied {
  background-color: #4caf50;
}

.connection-note {
  color: #5c6e7a;
  font-size: 14px;
  font-style: italic;
  margin-top: 10px;
}

.connection-section h2,
.controls-section h2,
.output-section h2,
.settings-section h2,
.error-section h2 {
  margin-bottom: 15px;
  color: #2c3e50;
}

/* ===================================
   PLAY TAB - Collapsible Sections
   =================================== */

.collapsible-section {
  background: linear-gradient(135deg, rgba(139, 195, 74, 0.1) 0%, rgba(76, 175, 80, 0.15) 100%);
  border: 2px solid rgba(139, 195, 74, 0.3);
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.collapsible-section:hover {
  border-color: rgba(139, 195, 74, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Section-specific colors */
body.section-stardew .collapsible-section {
  background: linear-gradient(135deg, rgba(139, 195, 74, 0.1) 0%, rgba(76, 175, 80, 0.15) 100%);
  border-color: rgba(139, 195, 74, 0.3);
}

body.section-corekeeper .collapsible-section {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 193, 7, 0.12) 100%);
  border-color: rgba(255, 152, 0, 0.3);
}

body.section-corekeeper .collapsible-section:hover {
  border-color: rgba(255, 152, 0, 0.5);
}

body.section-hytale .collapsible-section {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(155, 89, 182, 0.12) 100%);
  border-color: rgba(52, 152, 219, 0.3);
}

body.section-hytale .collapsible-section:hover {
  border-color: rgba(52, 152, 219, 0.5);
}

/* Collapsible Header (Button) */
.collapsible-header {
  width: 100%;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
  text-align: left;
  font-family: inherit;
}

.collapsible-header:hover {
  background: rgba(255, 255, 255, 0.12);
}

.collapsible-header:focus {
  outline: 2px solid rgba(52, 152, 219, 0.5);
  outline-offset: -2px;
}

.collapsible-header:active {
  background: rgba(255, 255, 255, 0.18);
}

.collapsible-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.section-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.collapsible-title {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
}

/* Collapsible Arrow (CSS Transform-Based) */
.collapsible-arrow {
  font-size: 16px;
  color: #7f8c8d;
  transition: transform 0.3s ease;
  display: inline-block;
  transform-origin: center;
  flex-shrink: 0;
}

/* Arrow points down when expanded (default arrow is down) */
.collapsible-arrow::before {
  content: '▼';
}

/* Rotate arrow 180deg when collapsed */
.collapsible-section.collapsed .collapsible-arrow {
  transform: rotate(-90deg);
}

/* Collapsible Content (Max-Height Animation) */
.collapsible-content {
  max-height: 3000px;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.collapsible-content.collapsed {
  max-height: 0;
  padding: 0;
  transition: max-height 0.3s ease-in, padding 0.3s ease-in;
}

/* Inner wrapper to maintain padding */
.collapsible-content-inner {
  padding: 25px;
}

/* When collapsed, remove inner padding */
.collapsible-content.collapsed .collapsible-content-inner {
  padding: 0;
}

/* Enhanced Connection Methods Styling */
.connection-methods {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.connection-method {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.connection-method h3 {
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.connection-method ol {
  margin: 15px 0;
  padding-left: 25px;
  line-height: 1.8;
}

.connection-method ol li {
  margin-bottom: 10px;
  color: #34495e;
}

.connection-value-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.connection-value {
  background-color: #1e1e1e;
  color: #8bc34a;
  padding: 14px 20px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 16px;
  font-weight: 600;
  flex: 1;
  min-width: 250px;
  border: 2px solid rgba(139, 195, 74, 0.3);
  user-select: all;
  transition: all 0.2s ease;
}

.connection-value:hover {
  border-color: rgba(139, 195, 74, 0.6);
  box-shadow: 0 2px 8px rgba(139, 195, 74, 0.2);
}

.connection-value.loading {
  color: #f39c12;
  animation: pulse 1.5s ease-in-out infinite;
  position: relative;
}

.connection-value.loading::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(243, 156, 18, 0.3);
  border-top-color: #f39c12;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.connection-value.unavailable {
  color: #e74c3c;
  opacity: 0.7;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

.connection-note {
  background: rgba(52, 152, 219, 0.1);
  border-left: 4px solid #3498db;
  padding: 12px 16px;
  margin-top: 15px;
  border-radius: 4px;
  font-size: 14px;
  color: #2c3e50;
}

.connection-note strong {
  color: #3498db;
}

/* Connection Info Section */
.connection-info {
  background: rgba(52, 152, 219, 0.08);
  border-radius: 8px;
  padding: 20px;
  margin-top: 25px;
  border: 1px solid rgba(52, 152, 219, 0.2);
}

.connection-info h3 {
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-icon {
  font-size: 22px;
  line-height: 1;
}

.connection-info ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.connection-info ul li {
  padding: 10px 0;
  padding-left: 30px;
  position: relative;
  color: #34495e;
  line-height: 1.6;
}

.connection-info ul li::before {
  content: '•';
  position: absolute;
  left: 12px;
  color: #3498db;
  font-weight: bold;
  font-size: 20px;
}

.connection-info strong {
  color: #2c3e50;
  font-weight: 600;
}

/* Map Tools Section (Core Keeper specific) */
.community-map-section.collapsible-section {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(155, 89, 182, 0.12) 100%);
  border-color: rgba(52, 152, 219, 0.3);
}

.community-map-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.map-intro {
  font-size: 15px;
  line-height: 1.7;
  color: #34495e;
  margin: 0;
}

.map-tool-link {
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.btn-large {
  padding: 16px 32px;
  font-size: 17px;
  font-weight: 600;
  gap: 12px;
}

.btn-icon {
  font-size: 20px;
  line-height: 1;
}

.external-icon {
  font-size: 16px;
  line-height: 1;
  margin-left: 4px;
}

.map-instructions,
.map-features {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.map-instructions h3,
.map-features h4 {
  color: #2c3e50;
  margin-bottom: 12px;
  font-size: 16px;
}

.map-instructions ol,
.map-features ul {
  margin: 10px 0;
  padding-left: 25px;
  line-height: 1.8;
}

.map-instructions ol li,
.map-features ul li {
  margin-bottom: 10px;
  color: #34495e;
}

.map-instructions ul {
  list-style: none;
  padding-left: 15px;
}

.map-instructions ul li {
  padding-left: 0;
  margin-bottom: 6px;
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 4px 8px;
  border-radius: 4px;
}

.download-link:hover {
  background: rgba(52, 152, 219, 0.1);
  color: #2980b9;
}

.map-instructions code {
  background: rgba(0, 0, 0, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #c7254e;
  word-break: break-all;
}

/* Hover Effects for Better UX */
.collapsible-header:hover .collapsible-title {
  color: #2980b9;
}

.collapsible-header:hover .collapsible-arrow {
  color: #3498db;
}

/* Focus States for Accessibility */
.collapsible-header:focus-visible {
  outline: 3px solid #3498db;
  outline-offset: 2px;
}

/* Responsive adjustments for collapsible sections */
@media (max-width: 768px) {
  .collapsible-header {
    padding: 14px 18px;
  }

  .section-icon {
    font-size: 24px;
  }

  .collapsible-title {
    font-size: 16px;
  }

  .collapsible-content-inner {
    padding: 18px;
  }

  .connection-method {
    padding: 16px;
  }

  .connection-value-container {
    flex-direction: column;
    align-items: stretch;
  }

  .connection-value {
    min-width: 100%;
  }

  .btn-copy {
    width: 100%;
    justify-content: center;
  }

  .map-tool-link {
    padding: 0;
  }

  .btn-large {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
  }

  .map-instructions code {
    word-break: break-all;
    display: inline-block;
    max-width: 100%;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .collapsible-content,
  .collapsible-arrow,
  .collapsible-section {
    transition: none;
  }
}

/* Button grid */
.button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

/* Control rows */
.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  margin-bottom: 15px;
  background-color: rgba(236, 240, 241, 0.5);
  border-radius: 8px;
  border: 1px solid rgba(189, 195, 199, 0.3);
}

.control-row:last-child {
  margin-bottom: 0;
}

.control-row h2 {
  margin: 0;
  font-size: 1.2em;
  color: #2c3e50;
  min-width: 150px;
}

.button-group {
  display: flex;
  gap: 12px;
}

.button-group .btn {
  min-width: 140px;
}

/* Toggle switches */
.toggle-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-label {
  font-size: 14px;
  color: #7f8c8d;
  font-weight: 500;
  min-width: 70px;
  text-align: center;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
}

.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: #95a5a6;
  transition: 0.4s;
  border-radius: 30px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #2ecc71;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(30px);
}

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* VNC controls */
.vnc-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.vnc-controls .warning-text {
  margin: 0;
  font-size: 13px;
  text-align: right;
}

.vnc-controls .toggle-group {
  margin-top: 5px;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #3498db;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #2980b9;
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #7f8c8d;
}

.btn-success {
  background-color: #2ecc71;
  color: white;
}

.btn-success:hover:not(:disabled) {
  background-color: #27ae60;
}

.btn-warning {
  background-color: #f39c12;
  color: white;
}

.btn-warning:hover:not(:disabled) {
  background-color: #e67e22;
}

.btn-vnc {
  background-color: #9b59b6;
  color: white;
}

.btn-vnc:hover:not(:disabled) {
  background-color: #8e44ad;
}

/* Operation status banner */
.operation-status {
  background-color: #3498db;
  color: white;
  padding: 15px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Output display */
.output-display {
  background-color: #1e1e1e;
  color: #d4d4d4;
  padding: 20px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.4;
  max-height: 600px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Login page */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
  width: 100%;
  max-width: 450px;
  padding: 20px;
}

.login-card {
  background-color: white;
  padding: 50px 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.login-card h1 {
  font-size: 1.8em;
  color: #2c3e50;
  margin-bottom: 10px;
}

.login-subtitle {
  color: #7f8c8d;
  margin-bottom: 30px;
  font-size: 1em;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.login-card input[type="password"] {
  padding: 14px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 16px;
  width: 100%;
  transition: border-color 0.3s;
}

.login-card input[type="password"]:focus {
  outline: none;
  border-color: #667eea;
}

.login-card .btn {
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  width: 100%;
}

.login-card .error {
  margin-top: 5px;
}

/* Settings page password inputs */
.settings-group input[type="password"] {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  width: 100%;
}

/* Settings page */
.settings-group {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #ecf0f1;
}

.settings-group:last-child {
  border-bottom: none;
}

.settings-group h3 {
  margin-bottom: 10px;
  color: #2c3e50;
}

.settings-group p {
  margin-bottom: 10px;
  color: #7f8c8d;
}

.settings-group form {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.settings-group input[type="password"] {
  flex: 1;
}

/* Messages */
.error {
  color: #e74c3c;
  padding: 10px;
  background-color: #fadbd8;
  border-radius: 4px;
  margin-top: 10px;
}

.message {
  padding: 10px;
  border-radius: 4px;
  margin-top: 10px;
}

.message.success {
  background-color: #d4edda;
  color: #155724;
}

.message.error {
  background-color: #f8d7da;
  color: #721c24;
}

.info-text {
  font-size: 14px;
  color: #7f8c8d;
}

.warning-text {
  color: #e67e22;
  font-weight: 500;
  margin-bottom: 15px;
}

/* Error page */
.error-section {
  text-align: center;
  padding: 60px 20px;
}

.error-section h2 {
  font-size: 2em;
  margin-bottom: 15px;
}

.error-section p {
  margin-bottom: 30px;
  color: #7f8c8d;
}

/* Footer */
footer {
  text-align: center;
  color: #ecf0f1;
  padding: 20px;
  font-size: 14px;
  background-color: rgba(44, 62, 80, 0.7);
  border-radius: 8px;
  backdrop-filter: blur(5px);
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  header h1 {
    font-size: 1.4em;
  }

  /* Hero section mobile adjustments */
  .hero-section {
    height: auto;
    min-height: 280px;
  }

  .hero-title {
    font-size: 1.6em;
    margin-bottom: 8px;
  }

  .hero-subtitle {
    font-size: 0.95em;
  }

  /* Make hero nav wrap into two rows */
  .hero-section nav {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 8px;
    justify-content: center;
  }

  /* Navigation links - more comfortable sizing on mobile */
  .hero-section nav a {
    padding: 10px 14px;
    font-size: 14px;
    flex-shrink: 0;
    min-width: 90px;
    text-align: center;
    order: 1;  /* Nav links come first */
  }

  /* Wiki search - second row, takes remaining space when present */
  .wiki-search-container {
    flex: 1 0 auto;
    min-width: 200px;
    max-width: 100%;
    order: 5;  /* Comes after nav links */
  }

  .wiki-search-input {
    width: 100%;
    font-size: 14px;
    padding: 8px 10px;
  }

  .wiki-search-input:focus {
    width: 100%;
  }

  .wiki-search-btn {
    padding: 8px 10px;
  }

  /* User menu - ALWAYS on its own row on mobile (all pages) */
  .hero-section .user-menu {
    flex: 1 0 100%;  /* Take full width = forces new row */
    display: flex;
    justify-content: center;
    margin-left: 0;
    margin-top: 4px;  /* Small gap between rows */
    order: 10;  /* Always comes last */
  }

  nav {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  nav a {
    padding: 8px 12px;
    font-size: 14px;
    flex-shrink: 0;
  }

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

  main {
    padding: 20px;
  }

  .login-card {
    padding: 40px 30px;
  }

  .login-card h1 {
    font-size: 1.5em;
  }

  .control-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
  }

  .control-row h2 {
    font-size: 1.1em;
    min-width: auto;
  }

  .button-group {
    width: 100%;
    flex-direction: column;
  }

  .button-group .btn {
    width: 100%;
  }

  .vnc-controls {
    width: 100%;
    align-items: flex-start;
  }

  .vnc-controls .warning-text {
    text-align: left;
  }

  .toggle-label {
    font-size: 13px;
    min-width: 60px;
  }

  .user-menu-toggle {
    width: 36px;
    height: 36px;
  }

  .user-avatar {
    font-size: 18px;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .hero-section nav {
    gap: 6px;
    padding: 8px 4px;
  }

  .hero-section nav a {
    padding: 8px 12px;
    font-size: 13px;
    min-width: 80px;
  }

  .hero-title {
    font-size: 1.5em;
  }
}

/* Extra small devices (iPhone SE and similar) */
@media (max-width: 375px) {
  .hero-section nav {
    gap: 6px;
    padding: 8px 4px;
  }

  .hero-section nav a {
    padding: 7px 10px;
    font-size: 12px;
    min-width: 70px;
  }

  .hero-title {
    font-size: 1.3em;
  }

  .hero-subtitle {
    font-size: 0.85em;
  }

  .wiki-search-input {
    font-size: 12px;
    padding: 6px 8px;
  }

  nav {
    gap: 5px;
  }

  nav a {
    padding: 6px 8px;
    font-size: 11px;
  }

  .user-menu-toggle {
    width: 32px;
    height: 32px;
  }

  .user-avatar {
    font-size: 14px;
  }
}

/* Server Actions Header */
.server-actions-header {
  display: flex;
  justify-content: center;
  margin: 20px;
  margin-bottom: 12px;
}

.server-actions-menu {
  position: relative;
}

/* Actions Button (Core Keeper style) */
.actions-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background-color: #3498db;
  border: none;
  border-radius: 8px;
  color: white;
  padding: 14px 40px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  min-width: 180px;
}

.actions-button:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.actions-button.active {
  background-color: #2980b9;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.actions-button.active .dropdown-arrow {
  transform: rotate(180deg);
}

.actions-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.actions-label {
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.5px;
}

/* Combo Button (legacy) */
.combo-button {
  display: flex;
  border: none;
  border-radius: 6px;
  overflow: hidden;
  background-color: #3498db;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.combo-button-action {
  background: none;
  border: none;
  color: white;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.combo-button-action:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.combo-button-action:active {
  background-color: rgba(0, 0, 0, 0.2);
}

.combo-button-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.combo-button-toggle {
  background: none;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 10px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.combo-button-toggle:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.combo-button-toggle.active {
  background-color: rgba(0, 0, 0, 0.15);
}

.combo-button-toggle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dropdown-arrow {
  line-height: 1;
}

.server-actions-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background-color: white;
  border: 2px solid rgba(52, 152, 219, 0.3);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
  overflow: hidden;
}

.server-actions-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: #2c3e50;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 14px;
  font-weight: 500;
}

.dropdown-action:hover {
  background-color: rgba(52, 152, 219, 0.1);
}

.dropdown-action:active {
  background-color: rgba(52, 152, 219, 0.2);
}

.dropdown-action .action-icon {
  font-size: 18px;
  line-height: 1;
  width: 20px;
  text-align: center;
}

.dropdown-divider {
  height: 1px;
  background-color: rgba(52, 152, 219, 0.2);
  margin: 4px 0;
}

/* Status Indicators Section */
.status-indicators {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  padding: 15px;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(155, 89, 182, 0.1) 100%);
  border: 2px solid rgba(52, 152, 219, 0.3);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.status-indicator:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.status-indicator:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Status Toggle Button Container */
.status-toggle-container {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
}

/* Status Toggle Button */
.status-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(52, 152, 219, 0.1);
  border: 1px solid rgba(52, 152, 219, 0.3);
  border-radius: 6px;
  color: #2c3e50;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.status-toggle-btn:hover {
  background: rgba(52, 152, 219, 0.2);
  border-color: rgba(52, 152, 219, 0.5);
  transform: translateY(-1px);
}

.status-toggle-btn:active {
  transform: translateY(0);
}

.status-toggle-btn .toggle-arrow {
  font-size: 10px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.status-toggle-btn.expanded .toggle-arrow {
  transform: rotate(180deg);
}

/* Collapsible Status Indicators Container */
.status-indicators-collapsible {
  display: none;
  grid-column: 1 / -1;
  width: 100%;
  gap: 12px;
}

.status-indicators-collapsible.show {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Desktop: 2-column layout for collapsible tiles */
@media (min-width: 769px) {
  .status-indicators-collapsible.show {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

/* Mobile: Single column for collapsible tiles */
@media (max-width: 768px) {
  .status-indicators-collapsible.show {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.status-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.status-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.status-label {
  font-size: 11px;
  color: #7f8c8d;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.status-value {
  font-size: 14px;
  color: #2c3e50;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-value.status-good {
  color: #27ae60;
}

.status-value.status-warning {
  color: #f39c12;
}

.status-value.status-error {
  color: #e74c3c;
}

/* ===================================
   Server Status Section (Collapsible)
   =================================== */

.server-status-section {
  margin: 20px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.15) 0%, rgba(155, 89, 182, 0.15) 100%);
  border: 2px solid rgba(52, 152, 219, 0.2);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.status-toggle-header {
  width: 100%;
  padding: 15px 20px;
  background: rgba(52, 152, 219, 0.1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.2s;
}

.status-toggle-header:hover {
  background: rgba(52, 152, 219, 0.2);
}

.status-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.status-header-icon {
  font-size: 24px;
  line-height: 1;
}

.status-header-title {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
}

.status-header-summary {
  font-size: 14px;
  color: #7f8c8d;
  margin-left: 8px;
}

.status-toggle-arrow {
  font-size: 14px;
  transition: transform 0.3s ease;
  color: #7f8c8d;
}

.server-status-section.expanded .status-toggle-arrow {
  transform: rotate(180deg);
}

.status-details-container {
  max-height: 2000px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.status-details-container.collapsed {
  max-height: 0;
}

.status-detail-section {
  padding: 20px;
  border-top: 1px solid rgba(52, 152, 219, 0.2);
}

.status-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 15px 0;
}

.status-detail-content {
  color: #2c3e50;
}

.status-loading {
  color: #7f8c8d;
  font-style: italic;
}

/* Desktop: 2-column layout for status cards */
@media (min-width: 769px) {
  .status-indicators {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .status-indicator {
    padding: 12px;
  }
}

/* Responsive adjustments for status indicators */
@media (max-width: 768px) {
  .server-actions-header {
    margin-bottom: 10px;
  }

  .combo-button-action {
    padding: 8px 12px;
    font-size: 16px;
  }

  .combo-button-toggle {
    padding: 8px;
    font-size: 9px;
  }

  .dropdown-action {
    padding: 10px 14px;
    font-size: 13px;
  }

  .dropdown-action .action-icon {
    font-size: 16px;
  }

  .status-indicators {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 10px;
    padding: 12px;
  }

  .status-indicator {
    padding: 8px;
  }

  .status-icon {
    font-size: 20px;
  }

  .status-label {
    font-size: 10px;
  }

  .status-value {
    font-size: 13px;
  }
}

/* Status Info Modal */
.status-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  animation: fadeIn 0.2s ease;
}

.status-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.status-modal-content {
  background-color: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: slideUp 0.3s ease;
  text-align: center;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.status-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 28px;
  color: #95a5a6;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  padding: 0;
  line-height: 1;
}

.status-modal-close:hover {
  background-color: #ecf0f1;
  color: #2c3e50;
}

.status-modal-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.status-modal-content h3 {
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 1.5em;
}

.status-modal-content p {
  color: #5c6e7a;
  line-height: 1.6;
  font-size: 15px;
  text-align: left;
}

@media (max-width: 768px) {
  .status-modal-content {
    padding: 25px 20px;
    max-width: 90%;
  }

  .status-modal-icon {
    font-size: 40px;
  }

  .status-modal-content h3 {
    font-size: 1.3em;
  }

  .status-modal-content p {
    font-size: 14px;
  }
}

/* Screenshot Gallery Section */
.screenshot-section {
  background: rgba(255, 255, 255, 0.98);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.screenshot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.screenshot-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #2c3e50;
}

.section-icon {
  font-size: 28px;
  line-height: 1;
}

.btn-capture {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-capture:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-capture:active {
  transform: translateY(0);
}

.btn-capture:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.capture-icon {
  font-size: 20px;
  line-height: 1;
}

.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  min-height: 200px;
}

.screenshot-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  background: #f8f9fa;
}

.screenshot-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.screenshot-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: #ecf0f1;
}

.screenshot-info {
  padding: 10px;
  background: rgba(44, 62, 80, 0.9);
  color: white;
  font-size: 12px;
  text-align: center;
  font-weight: 500;
}

.screenshot-time {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Gallery states */
.gallery-loading,
.gallery-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px;
  color: #7f8c8d;
  font-size: 15px;
}

.gallery-empty {
  flex-direction: column;
  text-align: center;
}

/* Screenshot Lightbox */
.screenshot-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  animation: fadeIn 0.2s ease;
}

.screenshot-lightbox.show {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 40px;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
  padding: 0;
  line-height: 1;
}

.lightbox-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.lightbox-image {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

.lightbox-info {
  margin-top: 20px;
  color: white;
  text-align: center;
  display: flex;
  gap: 20px;
  font-size: 14px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 20px;
}

.lightbox-info span {
  opacity: 0.9;
}

/* Responsive adjustments for screenshots */
@media (max-width: 768px) {
  .screenshot-header {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-capture {
    width: 100%;
    justify-content: center;
  }

  .screenshot-gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
  }

  .screenshot-card img {
    height: 150px;
  }

  .lightbox-image {
    max-width: 95%;
    max-height: 70vh;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    font-size: 32px;
    width: 40px;
    height: 40px;
  }

  .lightbox-info {
    font-size: 12px;
    gap: 15px;
  }
}
}

/* ============================================================
   PROGRESS PAGE STYLES
   ============================================================ */

/* Progress sections */
.progress-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
}

.section-header h2 {
  margin: 0;
  font-size: 24px;
  color: #ecf0f1;
}

.section-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Lock status indicator */
.lock-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.lock-status.available {
  background: rgba(46, 204, 113, 0.2);
  border: 1px solid rgba(46, 204, 113, 0.4);
  color: #2ecc71;
}

.lock-status.locked {
  background: rgba(231, 76, 60, 0.2);
  border: 1px solid rgba(231, 76, 60, 0.4);
  color: #e74c3c;
}

.lock-icon {
  font-size: 16px;
}

/* Notes container */
.notes-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.category-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.category-item:hover {
  border-color: rgba(52, 152, 219, 0.5);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-name {
  margin: 0;
  font-size: 18px;
  color: #ecf0f1;
}

.category-controls {
  display: flex;
  gap: 8px;
}

.category-content {
  padding: 20px;
}

.category-textarea {
  width: 100%;
  min-height: 200px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #ecf0f1;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  transition: all 0.3s ease;
}

.category-textarea:focus {
  outline: none;
  border-color: rgba(52, 152, 219, 0.6);
  background: rgba(0, 0, 0, 0.4);
}

.category-textarea:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* To-do list */
.todo-stats {
  font-size: 14px;
  color: #95a5a6;
}

.add-todo-container {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}

.todo-input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #ecf0f1;
  font-size: 14px;
  transition: all 0.3s ease;
}

.todo-input:focus {
  outline: none;
  border-color: rgba(52, 152, 219, 0.6);
  background: rgba(255, 255, 255, 0.08);
}

.todos-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.todo-section-title {
  font-size: 16px;
  color: #bdc3c7;
  margin: 0 0 15px 0;
  font-weight: 500;
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 50px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  transition: all 0.3s ease;
  cursor: move;
}

.todo-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(52, 152, 219, 0.4);
}

.drag-handle {
  color: #7f8c8d;
  cursor: grab;
  font-size: 16px;
  user-select: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.todo-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #2ecc71;
}

.todo-text {
  flex: 1;
  color: #ecf0f1;
  font-size: 14px;
  line-height: 1.5;
  transition: all 0.3s ease;
}

.todo-text.completed {
  text-decoration: line-through;
  color: #7f8c8d;
  opacity: 0.7;
}

.todo-actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.todo-item:hover .todo-actions {
  opacity: 1;
}

.todo-ghost {
  opacity: 0.4;
  background: rgba(52, 152, 219, 0.3);
}

/* Completed section toggle */
.completed-section-toggle {
  margin: 20px 0;
}

.toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #95a5a6;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ecf0f1;
}

.completed-section {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.completed-section.show {
  max-height: 2000px;
  transition: max-height 0.5s ease-in;
}

/* Backup section */
.backup-section {
  text-align: center;
}

.backup-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.backup-info {
  color: #95a5a6;
  font-size: 14px;
  margin: 0;
}

/* Button styles */
.btn-icon {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-icon-small {
  background: transparent;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
  opacity: 0.8;
}

.btn-icon-small:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

/* Messages */
.loading-message, .empty-message, .error-message {
  padding: 40px 20px;
  text-align: center;
  color: #95a5a6;
  font-size: 14px;
}

.error-message {
  color: #e74c3c;
}

/* Responsive adjustments for progress page */
@media (max-width: 768px) {
  .progress-section {
    padding: 20px;
  }

  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .section-actions {
    justify-content: stretch;
    flex-direction: column;
  }

  .section-actions button {
    width: 100%;
  }

  .add-todo-container {
    flex-direction: column;
  }

  .backup-actions {
    flex-direction: column;
  }

  .backup-actions button {
    width: 100%;
  }

  .todo-actions {
    opacity: 1;
  }
}

/* Mods Management Section */
.mods-section {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.mods-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.mods-section h2 {
  color: white;
  margin: 0;
  font-size: 24px;
}

.mods-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.mod-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
}

.mod-card:hover {
  border-color: rgba(139, 195, 74, 0.5);
  box-shadow: 0 4px 12px rgba(139, 195, 74, 0.2);
}

.mod-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  gap: 10px;
}

.mod-name {
  color: white;
  font-size: 18px;
  margin: 0;
  word-break: break-word;
  flex: 1;
}

.mod-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mod-detail {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  gap: 10px;
}

.mod-label {
  color: #95a5a6;
  font-weight: 500;
}

.mod-value {
  color: white;
  text-align: right;
  word-break: break-word;
}

.btn-danger-small {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-danger-small:hover {
  background: #c0392b;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.btn-danger-small:active {
  transform: translateY(0);
}

.loading-mods, .no-mods {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: #95a5a6;
  font-size: 16px;
}

.no-mods {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

@media (max-width: 768px) {
  .mods-section {
    padding: 20px;
  }

  .mods-section .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .mods-section .section-header button {
    width: 100%;
  }

  .mods-list {
    grid-template-columns: 1fr;
  }

  .mod-header {
    flex-direction: column;
    align-items: stretch;
  }

  .mod-header button {
    width: 100%;
  }
}
