* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Skip Link for Accessibility */
.skip-link:focus {
  position: fixed !important;
  left: 20px !important;
  top: 20px !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  background: #333;
  color: #fff;
  padding: 12px 24px;
  z-index: 10000;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: #ffffff;
}

#bgCanvas {
  display: block;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
}

.overlay {
  position: fixed;
  top: 90%;
  left: 5%;
  /* transform: translate(-50%, -50%); */
  /* text-align: center; */
  color: rgba(115, 109, 109, 0.95);
  font-size: 18px;
  pointer-events: none;
}

.cache-info {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(115, 109, 109, 0.7);
  font-family: 'Courier New', monospace;
}

/* Tools Section Styles */
.tools-section {
  position: relative;
  padding: 50px 5% 50px 5%;
  width: 100%;
  margin: 0;
  z-index: 10;
  min-height: 100vh;
}

.section-header {
  text-align: left;
  margin-bottom: 30px;
}

.section-header h2 {
  font-size: 28px;
  color: #333;
  margin-bottom: 10px;
}

.section-header p {
  font-size: 16px;
  color: #666;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
  margin-bottom: 20px;
  padding: 10px 0;
}

.breadcrumb-nav ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.breadcrumb-nav li {
  display: flex;
  align-items: center;
}

.breadcrumb-nav li:not(:last-child)::after {
  content: '›';
  margin-left: 8px;
  color: #999;
  font-size: 16px;
}

.breadcrumb-nav a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb-nav a:hover {
  color: #004499;
  text-decoration: underline;
}

.breadcrumb-nav span {
  color: #666;
}

/* Social Sharing Buttons */
.social-sharing {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
}

.sharing-text {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.social-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.social-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.social-btn.facebook {
  background: #1877f2;
}

.social-btn.facebook:hover {
  background: #166fe5;
}

.social-btn.twitter {
  background: #1da1f2;
}

.social-btn.twitter:hover {
  background: #0d8bd9;
}

.social-btn.linkedin {
  background: #0a66c2;
}

.social-btn.linkedin:hover {
  background: #0958a8;
}

.social-btn.copy-link {
  background: #6c757d;
}

.social-btn.copy-link:hover {
  background: #5a6268;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 200px));
  gap: 20px;
  padding-bottom: 120px;
}

.tools-section-header {
  grid-column: 1 / -1;
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin-top: 10px;
  margin-bottom: 5px;
  padding-bottom: 8px;
  border-bottom: 2px solid #555555;
  width: 100%;
}

.tools-section-header-wrapper {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.mini-forest {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  flex-shrink: 0;
  border-radius: 6px;
}

.tool-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(250, 250, 250, 0.9));
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.07),
    0 1px 3px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 200px;
  height: 200px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.tool-card:hover::before {
  left: 100%;
}

.tool-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 12px 24px rgba(0, 0, 0, 0.12),
    0 6px 12px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  background: linear-gradient(145deg, rgba(255, 255, 255, 1), rgba(248, 248, 248, 0.95));
  border-color: rgba(0, 0, 0, 0.08);
}

.tool-icon {
  font-size: 48px;
  margin-bottom: 12px;
  text-align: center;
  color: #555555;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.tool-card:hover .tool-icon {
  transform: scale(1.2) rotate(-5deg);
  color: #333333;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.tool-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  text-align: center;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.tool-card:hover .tool-title {
  color: #222;
}

.tool-description {
  font-size: 12px;
  color: #777;
  line-height: 1.5;
  text-align: center;
  transition: color 0.3s ease;
}

.tool-card:hover .tool-description {
  color: #555;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #555555;
  background: white;
  color: #555555;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-mode-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Language Toggle Button */
.language-toggle {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 1000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #555555;
  background: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.language-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

body.dark-mode .language-toggle {
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.3);
  color: #e0e0e0;
}

body.dark-mode .language-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  color: #ffffff;
}

/* Dark Mode Styles */
body.dark-mode {
  background: #1a1a1a;
}

body.dark-mode .tools-section {
  background: transparent;
}

body.dark-mode .section-header h2 {
  color: #e0e0e0;
}

body.dark-mode .section-header p {
  color: #b0b0b0;
}

body.dark-mode .cache-info {
  color: rgba(200, 200, 200, 0.6);
}

body.dark-mode .tool-card {
  background: linear-gradient(145deg, rgba(45, 45, 45, 0.95), rgba(35, 35, 35, 0.9));
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.dark-mode .tool-card::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
}

body.dark-mode .tool-card:hover {
  background: linear-gradient(145deg, rgba(55, 55, 55, 0.98), rgba(45, 45, 45, 0.95));
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 12px 24px rgba(0, 0, 0, 0.4),
    0 6px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.dark-mode .tool-title {
  color: #e0e0e0;
}

body.dark-mode .tool-card:hover .tool-title {
  color: #ffffff;
}

body.dark-mode .tool-icon {
  color: #b0b0b0;
}

body.dark-mode .tool-card:hover .tool-icon {
  color: #ffffff;
  filter: drop-shadow(0 4px 8px rgba(255, 255, 255, 0.2));
}

body.dark-mode .tool-description {
  color: #b0b0b0;
}

body.dark-mode .tool-card:hover .tool-description {
  color: #d0d0d0;
}

body.dark-mode .tools-section-header {
  color: #e0e0e0;
  border-bottom-color: #777;
}

body.dark-mode .overlay {
  color: rgba(180, 180, 180, 0.95);
}

body.dark-mode .modal-content {
  background-color: #2a2a2a;
  color: #e0e0e0;
}

body.dark-mode .modal-content h2 {
  color: #e0e0e0;
}

body.dark-mode .modal-control-btn {
  color: #999;
}

body.dark-mode .modal-control-btn:hover {
  color: #fff;
}

body.dark-mode .close:hover,
body.dark-mode .close:focus {
  color: #fff;
}

body.dark-mode .qr-input-group label,
body.dark-mode .timezone-input-group label {
  color: #e0e0e0;
}

body.dark-mode .qr-input-group input,
body.dark-mode .timezone-input-group input,
body.dark-mode .timezone-input-group select {
  background-color: #3a3a3a;
  border-color: #555;
  color: #e0e0e0;
}

body.dark-mode .timezone-input-group select option {
  background-color: #2d2d2d;
  color: #e0e0e0;
}

body.dark-mode .qr-input-group input:focus,
body.dark-mode .timezone-input-group input:focus,
body.dark-mode .timezone-input-group select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

body.dark-mode .modal-content button {
  background-color: #555555;
}

body.dark-mode .modal-content button:hover {
  background-color: #666666;
}

body.dark-mode .tab-btn {
  background: #3a3a3a;
  border-color: #555;
  color: #e0e0e0;
}

body.dark-mode .tab-btn.active {
  background: #777;
  border-color: #777;
}

body.dark-mode .tab-btn:hover:not(.active) {
  background: #444;
  border-color: #777;
}

body.dark-mode .upload-area {
  background: #2a2a2a;
  border-color: #555;
}

body.dark-mode .upload-area:hover {
  border-color: #777;
  background: #333;
}

body.dark-mode .upload-area i {
  color: #777;
}

body.dark-mode .upload-area p {
  color: #b0b0b0;
}

body.dark-mode .result-content {
  background: #3a3a3a;
}

body.dark-mode .result-content p {
  color: #e0e0e0;
}

body.dark-mode .action-btn {
  background: #555555;
}

body.dark-mode .action-btn:hover {
  background: #666666;
}

body.dark-mode .timezone-result {
  background-color: #3a3a3a;
}

body.dark-mode #convertedTime {
  color: #e0e0e0;
}

body.dark-mode .world-clock-item {
  background: #2a2a2a;
  border-color: #444;
}

body.dark-mode .world-clock-item:hover {
  background: #333;
  border-color: #777;
}

body.dark-mode .country-name {
  color: #e0e0e0;
}

body.dark-mode .city-name {
  color: #999;
}

body.dark-mode .country-time {
  color: #777;
}

body.dark-mode .country-date {
  color: #999;
}

body.dark-mode .video-container {
  background: #1a1a1a;
}

/* Password Generator Dark Mode */
body.dark-mode .password-input-group label {
  color: #e0e0e0;
}

body.dark-mode .password-input-group input {
  background-color: #3a3a3a;
  border-color: #555;
  color: #e0e0e0;
}

body.dark-mode .checkbox-label {
  color: #e0e0e0;
}

body.dark-mode .template-option {
  background: #064e3b;
  border-color: #065f46;
}

body.dark-mode .template-option .checkbox-label {
  color: #a7f3d0;
}

body.dark-mode .password-display input {
  background: #3a3a3a;
  border-color: #555;
  color: #e0e0e0;
}

body.dark-mode .copy-btn {
  background: #555555;
}

body.dark-mode .copy-btn:hover {
  background: #666666;
}

/* Lorem Ipsum Generator Dark Mode */
body.dark-mode .lorem-input-group label {
  color: #e0e0e0;
}

body.dark-mode .lorem-input-group input,
body.dark-mode .lorem-input-group select {
  background-color: #3a3a3a;
  border-color: #555;
  color: #e0e0e0;
}

body.dark-mode .lorem-result textarea {
  background-color: #3a3a3a;
  border-color: #555;
  color: #e0e0e0;
}

/* Alarm Clock Dark Mode */
body.dark-mode .alarm-setter {
  background: #2a2a2a;
}

body.dark-mode .alarm-setter h3 {
  color: #e0e0e0;
}

body.dark-mode .preset-btn {
  background: #3a3a3a;
  border-color: #555;
  color: #e0e0e0;
}

body.dark-mode .preset-btn:hover {
  background: #555555;
  border-color: #777;
}

body.dark-mode .time-adjuster {
  background: #2a2a2a;
  border-color: #555;
}

body.dark-mode .adjust-group label {
  color: #b0b0b0;
}

body.dark-mode .adjust-btn {
  background: #3a3a3a;
  border-color: #777;
  color: #e0e0e0;
}

body.dark-mode .adjust-btn:hover {
  background: #555555;
  border-color: #999;
}

body.dark-mode .adjust-btn:active {
  background: #666666;
}

body.dark-mode #adjustHourDisplay,
body.dark-mode #adjustMinuteDisplay {
  color: #e0e0e0;
}

body.dark-mode .adjust-separator {
  color: #999;
}

body.dark-mode .alarm-input-group label {
  color: #e0e0e0;
}

body.dark-mode .alarm-input-group input {
  background-color: #3a3a3a;
  border-color: #555;
  color: #e0e0e0;
}

body.dark-mode .alarms-list h3 {
  color: #e0e0e0;
}

body.dark-mode .alarm-item {
  background: #2a2a2a;
}

body.dark-mode .alarm-time {
  color: #e0e0e0;
}

body.dark-mode .alarm-label {
  color: #b0b0b0;
}

body.dark-mode .no-alarms {
  color: #777;
}

/* Mobile Responsive for Dark Mode Toggle */
@media (max-width: 768px) {
  .dark-mode-toggle {
    bottom: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }

  .language-toggle {
    bottom: 70px;
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .dark-mode-toggle {
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .language-toggle {
    bottom: 60px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 11px;
  }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .modal-maximize-btn {
    display: none;
  }

  .modal-header-controls {
    grid-template-columns: 36px;
  }

  .tools-section {
  }

  .section-header {
    margin-bottom: 20px;
  }

  .section-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
  }

  .section-header p {
    font-size: 15px;
    color: #555;
  }

  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .tool-card {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 140px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    border-radius: 10px;
  }

  .tool-icon {
    font-size: 32px;
    margin-bottom: 0;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
  }

  .tool-card:hover .tool-icon {
    transform: scale(1.1);
  }

  .tool-title {
    font-size: 14px;
    margin-bottom: 5px;
    text-align: center;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
  }

  .tool-description {
    display: none;
  }

  .overlay {
    font-size: 12px;
    top: 95%;
    left: 15px;
  }
}

@media (max-width: 480px) {
  .tools-section {
  }

  .section-header h2 {
    font-size: 22px;
  }

  .section-header p {
    font-size: 14px;
  }

  .tool-card {
    padding: 14px;
    gap: 8px;
    min-height: 120px;
  }

  .tool-icon {
    font-size: 28px;
  }

  .tool-title {
    font-size: 14px;
    margin-bottom: 4px;
  }

  .tool-description {
    display: none;
  }
}

/* Unit Converter Modal Responsive Styles */
@media (max-width: 768px) {
  #unitConverterModal .modal-content {
    margin: 2% auto;
    padding: 20px;
    width: 95%;
    max-width: 100%;
  }

  .converter-categories {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 20px;
    width: 100%;
  }

  .category-btn {
    padding: 10px 12px;
    font-size: 13px;
    width: 100%;
  }

  .conversion-row {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
    width: 100%;
  }

  .conversion-swap {
    justify-content: center;
    padding: 5px 0;
    order: 2;
    width: 100%;
  }

  .conversion-input-group {
    order: 1;
    width: 100%;
  }

  .conversion-input-group:last-of-type {
    order: 3;
    width: 100%;
  }

  .swap-btn {
    width: 40px;
    height: 40px;
  }

  .conversion-input-group input,
  .conversion-input-group select {
    padding: 12px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
  }

  .converter-interface {
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
  }

  .conversion-result {
    width: 100%;
    box-sizing: border-box;
  }

  #unitConverterModal .modal-header h2 {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  #unitConverterModal .modal-content {
    margin: 1% auto;
    padding: 15px;
    width: 98%;
    max-width: 100%;
    border-radius: 8px;
  }

  .converter-categories {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 15px;
    width: 100%;
  }

  .category-btn {
    padding: 12px;
    font-size: 14px;
    width: 100%;
  }

  .conversion-row {
    gap: 12px;
    width: 100%;
  }

  .conversion-input-group {
    width: 100%;
  }

  .conversion-input-group label {
    font-size: 13px;
    margin-bottom: 4px;
  }

  .conversion-input-group input,
  .conversion-input-group select {
    padding: 11px;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
  }

  .swap-btn {
    width: 36px;
    height: 36px;
  }

  .converter-interface {
    padding: 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .conversion-result {
    padding: 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .formula-text {
    font-size: 13px;
    line-height: 1.4;
  }

  #unitConverterModal .modal-header h2 {
    font-size: 18px;
  }

  #unitConverterModal .modal-body {
    padding-top: 10px;
    width: 100%;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.modal-content {
  background-color: #fefefe;
  margin: 0;
  padding: 30px;
  border-radius: 0;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  box-shadow: none;
  position: relative;
  overflow-y: auto;
}

.modal-content h2{
  margin-bottom: 15px;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: 15px;
  top: 10px;
}

.modal-header-controls {
  position: absolute;
  right: 0px;
  top: 10px;
  display: grid;
  grid-template-columns: 36px 36px;
  gap: 10px;
}

.modal-header-controls .modal-control-btn {
  padding: 0px;
}

.modal-control-btn {
  background: none;
  border: none;
  color: #aaa;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  margin: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  line-height: 1;
}

.modal-control-btn:hover {
  color: #000;
  transform: scale(1.1);
}

.modal-control-btn:active {
  transform: scale(0.95);
}

.modal-content h2 {
  margin-top: 0;
  color: #333;
  font-size: 26px;
  padding-right: 80px;
}

/* Maximized Modal State */
.modal-content.modal-maximized {
  margin: 0;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  border-radius: 0;
  overflow-y: auto;
}

/* QR Code Generator Styles */
.qr-input-group {
  margin: 20px 0;
}

.qr-input-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #333;
  font-size: 16px;
}

.qr-input-group input {
  width: 100%;
  padding: 14px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.qr-input-group input:focus {
  border-color: #555555;
  outline: none;
  box-shadow: 0 0 0 3px rgba(85, 85, 85, 0.1);
}

.modal-content button {
  background-color: #555555;
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  width: 100%;
  margin-top: 15px;
  transition: all 0.3s ease;
}

.modal-content button:hover {
  background-color: #333333;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(85, 85, 85, 0.3);
}

.modal-content button:active {
  transform: translateY(0);
}

.qr-result {
  margin-top: 20px;
  text-align: center;
}

#qrCodeContainer {
  margin: 20px auto;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#downloadBtn {
  background-color: #555555 !important;
  margin-top: 15px;
}

#downloadBtn:hover {
  background-color: #333333 !important;
  box-shadow: 0 4px 12px rgba(85, 85, 85, 0.3);
}

/* QR Code Reader Styles */
.qr-reader-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 12px;
  border: 2px solid #ddd;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.tab-btn i {
  margin-right: 5px;
}

.tab-btn.active {
  background: #555555;
  color: white;
  border-color: #555555;
}

.tab-btn:hover:not(.active) {
  background: #f5f5f5;
  border-color: #555555;
}

.qr-reader-section {
  display: none;
}

.qr-reader-section.active {
  display: block;
}

.video-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto 15px;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
}

#qrVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.upload-area {
  border: 3px dashed #ddd;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fafafa;
}

.upload-area:hover {
  border-color: #555555;
  background: #f0f0f0;
}

.upload-area i {
  font-size: 48px;
  color: #555555;
  margin-bottom: 10px;
}

.upload-area p {
  color: #666;
  font-size: 14px;
  margin: 0;
}

#startCameraBtn,
#stopCameraBtn {
  width: 100%;
  margin-top: 10px;
}

.result-content {
  background: #f5f5f5;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  word-break: break-all;
}

.result-content p {
  margin: 0;
  font-size: 14px;
  color: #333;
}

.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.action-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: #555555;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-btn:hover {
  background: #333333;
  transform: translateY(-2px);
}

.action-btn i {
  margin-right: 5px;
}

/* Timezone Converter Styles */
.timezone-input-group {
  margin: 15px 0;
}

.timezone-input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
}

.timezone-input-group input,
.timezone-input-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
}

.timezone-input-group input:focus,
.timezone-input-group select:focus {
  border-color: #555555;
  outline: none;
}

.timezone-result {
  margin-top: 20px;
  padding: 15px;
  background-color: #f5f5f5;
  border-radius: 6px;
  text-align: center;
}

#convertedTime {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

/* World Clock Styles */
.world-clock-compact {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  overflow-y: auto;
}

.world-clock-item {
  background: #f9f9f9;
  padding: 14px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  border: 1px solid #e0e0e0;
}

.world-clock-item:hover {
  background: #f0f0f0;
  border-color: #555555;
  /* transform: translateX(3px); */
}

.country-flag {
  width: 36px;
  height: 27px;
  flex-shrink: 0;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.country-info {
  flex: 1;
  min-width: 0;
}

.country-name {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin-bottom: 2px;
}

.city-name {
  font-size: 13px;
  font-weight: 500;
  color: #666;
  margin-bottom: 4px;
}

.country-time {
  font-size: 17px;
  color: #555555;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.country-date {
  font-size: 12px;
  color: #666;
  margin-top: 3px;
  font-weight: 500;
}

.timezone-input-group {
  margin: 15px 0;
}

.timezone-input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
}

.timezone-input-group input,
.timezone-input-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
}

.timezone-input-group input:focus,
.timezone-input-group select:focus {
  border-color: #555555;
  outline: none;
}

.timezone-result {
  margin-top: 20px;
  padding: 15px;
  background-color: #f5f5f5;
  border-radius: 6px;
  text-align: center;
}

#convertedTime {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

/* Password Generator Styles */
.password-options {
  margin: 20px 0;
}

.password-input-group {
  margin: 15px 0;
}

.password-input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
}

.password-input-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
}

.password-checkbox-group {
  margin: 20px 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #555;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.template-option {
  margin: 15px 0;
  padding: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
}

.template-option .checkbox-label {
  color: #065f46;
  font-weight: 500;
}

.password-result {
  margin-top: 20px;
}

.password-display {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.password-display input {
  flex: 1;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  font-family: 'Courier New', monospace;
  background: #f5f5f5;
}

.copy-btn {
  padding: 12px 16px;
  border: none;
  border-radius: 6px;
  background: #555555;
  color: white;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

.copy-btn:hover {
  background: #333333;
  transform: translateY(-2px);
}

.password-strength {
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}

.strength-weak {
  background: #ffcccc;
  color: #cc0000;
}

.strength-fair {
  background: #ffe6cc;
  color: #cc6600;
}

.strength-good {
  background: #ffffcc;
  color: #999900;
}

.strength-strong {
  background: #ccffcc;
  color: #006600;
}

/* Lorem Ipsum Generator Styles */
.lorem-options {
  margin: 20px 0;
}

.lorem-input-group {
  margin: 15px 0;
}

.lorem-input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
}

.lorem-input-group input,
.lorem-input-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
}

.lorem-checkbox-group {
  margin: 15px 0;
}

.lorem-result {
  margin-top: 20px;
}

.lorem-result textarea {
  width: 100%;
  min-height: 200px;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin-bottom: 15px;
}

.lorem-result .copy-btn {
  width: 100%;
}

/* Alarm Clock Styles */
.current-time-display {
  text-align: center;
  padding: 30px 0;
  background: linear-gradient(135deg, #555555 0%, #333333 100%);
  border-radius: 12px;
  margin-bottom: 25px;
}

#currentTime {
  font-size: 48px;
  font-weight: 700;
  color: white;
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
}

#currentDate {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 8px;
}

.alarm-setter {
  background: #f5f5f5;
  border-radius: 8px;
}

.alarm-setter h3 {
  margin-bottom: 15px;
  color: #555;
  font-size: 18px;
}

.alarm-presets {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.preset-btn {
  padding: 10px 8px;
  border: 2px solid #ddd;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.preset-btn i {
  font-size: 12px;
}

.preset-btn:hover {
  background: #555555;
  color: white;
  border-color: #555555;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(85, 85, 85, 0.2);
}

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

/* Time Adjuster Styles */
.time-adjuster {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  border: 2px solid #ddd;
}

.adjust-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.adjust-group label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.adjust-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.adjust-btn {
  width: 40px;
  height: 40px;
  border: 2px solid #555555;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  color: #555555;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.adjust-btn:hover {
  background: #555555;
  color: white;
  transform: scale(1.05);
}

.adjust-btn:active {
  transform: scale(0.95);
  background: #333333;
}

#adjustHourDisplay,
#adjustMinuteDisplay {
  font-size: 28px;
  font-weight: 700;
  color: #333;
  min-width: 50px;
  text-align: center;
  font-family: 'Courier New', monospace;
}

.adjust-separator {
  font-size: 32px;
  font-weight: 700;
  color: #555555;
  margin-top: 20px;
  font-family: 'Courier New', monospace;
}

.alarm-input-group {
  margin: 15px 0;
}

.alarm-input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
}

.alarm-input-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
}

.alarm-repeat-options {
  margin: 15px 0;
}

.alarms-list {
  margin-top: 25px;
}

.alarms-list h3 {
  margin-bottom: 15px;
  color: #555;
  font-size: 18px;
}

.alarms-container {
  max-height: 300px;
  overflow-y: auto;
}

.alarm-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  background: #f5f5f5;
  border-radius: 8px;
  margin-bottom: 10px;
  border-left: 4px solid #555555;
}

.alarm-item.active {
  border-left-color: #4CAF50;
}

.alarm-item.disabled {
  opacity: 0.5;
}

.alarm-info {
  flex: 1;
}

.alarm-time {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  font-family: 'Courier New', monospace;
}

.alarm-label {
  font-size: 14px;
  color: #666;
  margin-top: 4px;
}

.alarm-repeat {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.alarm-actions {
  display: flex;
  gap: 8px;
}

.alarm-toggle-btn,
.alarm-delete-btn {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.alarm-toggle-btn {
  background: #555555;
  color: white;
}

.alarm-toggle-btn:hover {
  background: #333333;
}

.alarm-toggle-btn.disabled {
  background: #999;
}

.alarm-delete-btn {
  background: #ff4444;
  color: white;
}

.alarm-delete-btn:hover {
  background: #cc0000;
}

.no-alarms {
  text-align: center;
  color: #999;
  padding: 30px;
  font-style: italic;
}

/* Two Column Layout for Alarm Clock */
.alarm-two-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 1024px) {
  .alarm-two-column {
    flex-direction: row;
    align-items: flex-start;
  }

  .alarm-setter {
    flex: 2;
    min-width: 0;
  }

  .alarms-list {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    margin-top: 0;
  }

  .alarms-container {
    max-height: 500px;
  }
}

.alarm-ringing {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.alarm-ringing-content {
  text-align: center;
  color: white;
}

.alarm-ringing-content h2 {
  font-size: 36px;
  margin-bottom: 20px;
}

.alarm-ringing-content p {
  font-size: 24px;
  margin-bottom: 30px;
}

.dismiss-alarm-btn {
  padding: 15px 40px;
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dismiss-alarm-btn:hover {
  background: #cc0000;
  transform: scale(1.05);
}

/* GPS Tracker Styles */
.gps-tracker-controls {
  margin-bottom: 20px;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.gps-status {
  text-align: center;
  padding: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  margin-bottom: 15px;
  color: white;
}

.gps-status-text {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
}

.gps-accuracy {
  font-size: 14px;
  opacity: 0.9;
}

.gps-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.stat-item {
  background: #f5f5f5;
  padding: 12px;
  border-radius: 6px;
  text-align: center;
}

.stat-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
  text-transform: uppercase;
  font-weight: 600;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  font-family: 'Courier New', monospace;
}

.gps-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 15px;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.gps-buttons button {
  padding: 12px !important;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto !important;
  margin-top: 0 !important;
  pointer-events: auto !important;
  position: relative;
  z-index: 10;
}

.gps-buttons button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#startTrackingBtn {
  background: #4CAF50 !important;
  color: white !important;
}

#startTrackingBtn:hover:not(:disabled) {
  background: #45a049 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

#stopTrackingBtn {
  background: #ff4444 !important;
  color: white !important;
}

#stopTrackingBtn:hover:not(:disabled) {
  background: #cc0000 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
}

#clearTrackBtn,
#exportTrackBtn,
#importTrackBtn {
  background: #555555 !important;
  color: white !important;
}

#clearTrackBtn:hover:not(:disabled),
#exportTrackBtn:hover:not(:disabled),
#importTrackBtn:hover:not(:disabled) {
  background: #333333 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(85, 85, 85, 0.3);
}

/* GPX Metadata Styles */
.gpx-metadata {
  margin-bottom: 20px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid #555555;
}

.gpx-metadata-columns {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 20px;
}

.gpx-info-column h3 {
  color: #555555;
  margin-bottom: 12px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.metadata-details {
  display: grid;
  gap: 10px;
}

.metadata-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: white;
  border-radius: 4px;
  font-size: 14px;
}

.metadata-label {
  font-weight: 600;
  color: #666;
  min-width: 120px;
}

.metadata-item span:last-child {
  color: #333;
  text-align: right;
  flex: 1;
  word-break: break-word;
}

/* Elevation Graph Styles */
.elevation-profile-section h4 {
  color: #555555;
  margin-bottom: 15px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.elevation-graph-container {
  position: relative;
  width: 100%;
  margin-bottom: 15px;
}

#elevationCanvas {
  width: 100%;
  height: 250px;
  background: white;
  border-radius: 4px;
  cursor: crosshair;
}

.elevation-tooltip {
  position: fixed;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.elevation-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.elevation-stat-item {
  background: white;
  padding: 12px;
  border-radius: 4px;
  text-align: center;
}

.elevation-stat-label {
  font-size: 11px;
  color: #666;
  margin-bottom: 5px;
  text-transform: uppercase;
  font-weight: 600;
}

.elevation-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #555555;
  font-family: 'Courier New', monospace;
}

/* Responsive GPX Metadata */
@media (max-width: 768px) {
  .gpx-metadata-columns {
    grid-template-columns: 1fr;
  }
}

/* Preloaded Tracks Styles */
.preloaded-tracks {
  margin-bottom: 20px;
}

.preloaded-tracks h3 {
  color: #555555;
  margin-bottom: 10px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.track-disclaimer {
  font-size: 12px;
  color: #888;
  margin-bottom: 15px;
  line-height: 1.5;
}

.track-disclaimer a {
  color: #555555;
  text-decoration: underline;
  transition: color 0.3s;
}

.track-disclaimer a:hover {
  color: #333;
}

.track-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

#trackSearchInput {
  flex: 1;
  padding: 10px 15px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s;
}

#trackSearchInput:focus {
  outline: none;
  border-color: #555555;
}

#trackSeriesFilter {
  padding: 10px 15px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  min-width: 140px;
}

#trackSeriesFilter:focus {
  outline: none;
  border-color: #555555;
}

.preloaded-track-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 15px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 5px;
}

.preloaded-track-list::-webkit-scrollbar {
  width: 8px;
}

.preloaded-track-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.preloaded-track-list::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.preloaded-track-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.preloaded-track-item {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 180px;
}

.preloaded-track-item:hover {
  border-color: #555555;
  /* transform: translateY(-2px); */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.track-item-title {
  flex: 1;
}

.track-series-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.a-series {
  background: #e3f2fd;
  color: #1976d2;
}

.b-series {
  background: #f3e5f5;
  color: #7b1fa2;
}

.c-series {
  background: #e8f5e9;
  color: #388e3c;
}

.d-series {
  background: #fff3e0;
  color: #f57c00;
}

.track-item-title h4 {
  margin: 0;
  font-size: 16px;
  color: #333;
  font-weight: 600;
}

.track-difficulty {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  margin-left: 10px;
}

.track-difficulty.easy {
  background: #c8e6c9;
  color: #2e7d32;
}

.track-difficulty.moderate {
  background: #fff9c4;
  color: #f57f17;
}

.track-difficulty.hard {
  background: #ffcdd2;
  color: #c62828;
}

.track-description {
  margin: 6px 0;
  color: #666;
  font-size: 12px;
  line-height: 1.4;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.track-item-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e0e0e0;
}

.track-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #666;
}

.track-stat i {
  color: #555555;
  font-size: 14px;
}

.loading-tracks,
.no-history {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-style: italic;
}

.map-container {
  position: relative;
  width: 100%;
  height: 400px;
  background: #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 15px;
}

/* Ensure MapLibre canvas fills container */
#gpsMap .maplibregl-canvas {
  width: 100% !important;
  height: 100% !important;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.6), 0 0 20px rgba(102, 126, 234, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.8), 0 0 30px rgba(102, 126, 234, 0.6);
    transform: scale(1.1);
  }
  100% {
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.6), 0 0 20px rgba(102, 126, 234, 0.4);
    transform: scale(1);
  }
}

#gpsMap {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 8px;
}

/* MapLibre GL JS Controls Styling */
.maplibregl-ctrl-group {
  background: white !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  margin: 10px !important;
}

.maplibregl-ctrl-group button {
  width: 30px !important;
  height: 30px !important;
  background-color: white !important;
  border: none !important;
  cursor: pointer !important;
}

.maplibregl-ctrl-group button:hover {
  background-color: #f0f0f0 !important;
}

.maplibregl-ctrl-group button:focus {
  outline: none !important;
}

.maplibregl-ctrl-zoom-in,
.maplibregl-ctrl-zoom-out,
.maplibregl-ctrl-compass {
  display: block !important;
}

.maplibregl-ctrl-scale {
  background-color: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-radius: 2px !important;
  font-size: 10px !important;
  padding: 2px 4px !important;
  margin: 10px !important;
}

.map-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;
  z-index: 5;
  pointer-events: none;
}

.map-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #667eea;
  z-index: 6;
  background: rgba(255, 255, 255, 0.9);
}

.map-loading i {
  font-size: 48px;
  margin-bottom: 10px;
}

.map-loading p {
  font-size: 16px;
  font-weight: 500;
}

.map-placeholder i {
  font-size: 64px;
  margin-bottom: 15px;
  opacity: 0.3;
}

.map-placeholder p {
  font-size: 16px;
  margin: 0;
}

.track-info {
  background: #f5f5f5;
  padding: 15px;
  border-radius: 8px;
}

.track-info h3 {
  margin-bottom: 12px;
  color: #333;
  font-size: 16px;
}

.location-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.location-item {
  display: flex;
  justify-content: space-between;
  padding: 8px;
  background: white;
  border-radius: 4px;
}

.location-label {
  font-weight: 600;
  color: #666;
  font-size: 13px;
}

.location-item span:last-child {
  color: #333;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

body.dark-mode .gps-status {
  background: linear-gradient(135deg, #5a6fd6 0%, #6b4a91 100%);
}

body.dark-mode .stat-item {
  background: #2a2a2a;
}

body.dark-mode .stat-label {
  color: #b0b0b0;
}

body.dark-mode .stat-value {
  color: #e0e0e0;
}

body.dark-mode .map-container {
  background: #1a1a1a;
}

body.dark-mode .gpx-metadata {
  background: #2a2a2a;
  border-left-color: #777;
}

body.dark-mode .gpx-info-column h3 {
  color: #e0e0e0;
}

body.dark-mode .metadata-item {
  background: #333;
}

body.dark-mode .metadata-label {
  color: #999;
}

body.dark-mode .metadata-item span:last-child {
  color: #e0e0e0;
}

body.dark-mode .elevation-profile-section h4 {
  color: #e0e0e0;
}

body.dark-mode #elevationCanvas {
  background: #333;
}

body.dark-mode .elevation-stat-item {
  background: #333;
}

body.dark-mode .elevation-stat-label {
  color: #999;
}

body.dark-mode .elevation-stat-value {
  color: #e0e0e0;
}

/* Dark Mode - Preloaded Tracks */
body.dark-mode .preloaded-tracks h3 {
  color: #e0e0e0;
}

body.dark-mode .track-disclaimer {
  color: #999;
}

body.dark-mode .track-disclaimer a {
  color: #aaa;
}

body.dark-mode .track-disclaimer a:hover {
  color: #ccc;
}

body.dark-mode #trackSearchInput,
body.dark-mode #trackSeriesFilter {
  background: #333;
  border-color: #444;
  color: #e0e0e0;
}

body.dark-mode #trackSearchInput:focus,
body.dark-mode #trackSeriesFilter:focus {
  border-color: #777;
}

body.dark-mode .preloaded-track-item {
  background: #2a2a2a;
  border-color: #444;
}

body.dark-mode .preloaded-track-item:hover {
  border-color: #777;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .track-item-title h4 {
  color: #e0e0e0;
}

body.dark-mode .track-description {
  color: #999;
}

body.dark-mode .track-item-stats {
  border-top-color: #444;
}

body.dark-mode .track-stat {
  color: #999;
}

body.dark-mode .track-stat i {
  color: #bbb;
}

body.dark-mode .preloaded-track-list::-webkit-scrollbar-track {
  background: #1a1a1a;
}

body.dark-mode .preloaded-track-list::-webkit-scrollbar-thumb {
  background: #555;
}

body.dark-mode .preloaded-track-list::-webkit-scrollbar-thumb:hover {
  background: #777;
}

body.dark-mode .maplibregl-ctrl-group {
  background: #2a2a2a !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .maplibregl-ctrl-group button {
  background-color: #2a2a2a !important;
}

body.dark-mode .maplibregl-ctrl-group button:hover {
  background-color: #3a3a3a !important;
}

body.dark-mode .maplibregl-ctrl-scale {
  background-color: rgba(42, 42, 42, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e0e0e0 !important;
}

body.dark-mode .map-loading {
  background: rgba(26, 26, 26, 0.9);
  color: #667eea;
}

body.dark-mode .track-info {
  background: #2a2a2a;
}

body.dark-mode .track-info h3 {
  color: #e0e0e0;
}

body.dark-mode .location-item {
  background: #3a3a3a;
}

body.dark-mode .location-label {
  color: #999;
}

body.dark-mode .location-item span:last-child {
  color: #e0e0e0;
}

body.dark-mode #gpsMap {
  filter: invert(90%) hue-rotate(180deg);
}

/* Tracking History Styles */
.tracking-history {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #e0e0e0;
}

.tracking-history h3 {
  margin-bottom: 15px;
  color: #333;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tracking-history h3 i {
  color: #667eea;
}

.history-list {
  max-height: 400px;
  overflow-y: auto;
}

.history-item {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  border-left: 4px solid #667eea;
  transition: all 0.3s ease;
}

.history-item:hover {
  background: #f0f0f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.history-date {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.history-actions {
  display: flex;
  gap: 8px;
}

.history-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.history-view-btn {
  background: #667eea;
  color: white;
}

.history-view-btn:hover {
  background: #5568d3;
  transform: translateY(-2px);
}

.history-delete-btn {
  background: #ff4444;
  color: white;
}

.history-delete-btn:hover {
  background: #cc0000;
  transform: translateY(-2px);
}

.history-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.history-stat {
  text-align: center;
  padding: 8px;
  background: white;
  border-radius: 4px;
}

.history-stat-label {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}

.history-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  font-family: 'Courier New', monospace;
}

.no-history {
  text-align: center;
  color: #999;
  padding: 30px;
  font-style: italic;
}

body.dark-mode .tracking-history {
  border-top-color: #444;
}

body.dark-mode .tracking-history h3 {
  color: #e0e0e0;
}

body.dark-mode .history-item {
  background: #2a2a2a;
}

body.dark-mode .history-item:hover {
  background: #333;
}

body.dark-mode .history-date {
  color: #e0e0e0;
}

body.dark-mode .history-stat {
  background: #3a3a3a;
}

body.dark-mode .history-stat-label {
  color: #999;
}

body.dark-mode .history-stat-value {
  color: #e0e0e0;
}

body.dark-mode .no-history {
  color: #777;
}

/* Mobile Responsive for Modals */
@media (max-width: 768px) {
  .modal-content {
    margin: 0;
    padding: 20px;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    border-radius: 0;
    overflow-y: auto;
  }

  .close {
    font-size: 32px;
    right: 15px;
    top: 15px;
    z-index: 10;
  }

  .modal-header-controls {
    right: 15px;
    top: 5px;
    grid-template-columns: 40px;
    gap: 8px;
  }

  .modal-control-btn {
    font-size: 24px;
    width: 40px;
    height: 40px;
  }

  .modal-content h2 {
    font-size: 24px;
    padding-right: 40px;
  }

  .qr-input-group input,
  .timezone-input-group input,
  .timezone-input-group select {
    font-size: 16px;
    padding: 12px;
  }

  .modal-content button {
    font-size: 16px;
  }

  .world-clock-compact {
    grid-template-columns: repeat(2, 1fr);
    max-height: none;
    overflow-y: visible;
  }

  .alarm-presets {
    grid-template-columns: repeat(3, 1fr);
  }

  .preset-btn {
    font-size: 12px;
    padding: 8px 6px;
  }

  .time-adjuster {
    gap: 10px;
    padding: 12px;
  }

  .adjust-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  #adjustHourDisplay,
  #adjustMinuteDisplay {
    font-size: 24px;
    min-width: 40px;
  }

  .adjust-separator {
    font-size: 28px;
    margin-top: 18px;
  }
}

/* World Time Buddy Styles */
.modal-wide {
  max-width: 100%;
  width: 1500px;
}

.wtb-controls {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.wtb-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}

.wtb-control-group label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.wtb-control-group input,
.wtb-control-group select {
  padding: 10px 12px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-size: 14px;
  background: white;
  color: #333;
  transition: all 0.3s ease;
  cursor: pointer;
}

.wtb-control-group select option {
  padding: 8px;
  background: white;
  color: #333;
}

.wtb-control-group input:focus,
.wtb-control-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.wtb-add-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.wtb-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.wtb-locations {
  margin-bottom: 20px;
}

.wtb-timeline {
  overflow-x: auto;
  margin-top: 20px;
}

.wtb-timeline-grid {
  display: grid;
  min-width: 1200px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.wtb-header-row {
  display: grid;
  grid-template-columns: 40px 150px repeat(24, 1fr);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
}

.wtb-remove-header {
  padding: 12px 8px;
  text-align: center;
  font-size: 11px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.wtb-header-cell {
  padding: 12px 8px;
  text-align: center;
  font-size: 11px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.wtb-header-cell:last-child {
  border-right: none;
}

.wtb-location-header {
  text-align: left;
  padding-left: 15px;
  font-size: 13px;
}

.wtb-row {
  display: grid;
  grid-template-columns: 40px 150px repeat(24, 1fr);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.wtb-remove-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.02);
}

.wtb-remove-cell .wtb-remove-inline-btn {
  background: #f44336;
  color: white;
  border: none;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: bold;
  padding: 0px 0px;
}

.wtb-remove-inline-btn:hover {
  background: #d32f2f;
  transform: scale(1.1);
}

.wtb-row:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

.wtb-location-cell {
  padding: 10px 15px;
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(102, 126, 234, 0.05);
}

.wtb-cell {
  padding: 10px 3px;
  text-align: center;
  font-size: 10px;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  line-height: 1.3;
}

.wtb-cell:hover {
  background: rgba(102, 126, 234, 0.2);
  transform: scale(1.05);
}

.wtb-column-highlighted {
  background: rgba(102, 126, 234, 0.35) !important;
  box-shadow: inset 0 0 10px rgba(102, 126, 234, 0.5);
  z-index: 2;
}

.wtb-date-indicator {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  margin-left: 2px;
  padding: 1px 3px;
  border-radius: 3px;
  vertical-align: super;
}

.wtb-date-next {
  background: #ff9800;
  color: white;
}

.wtb-date-prev {
  background: #f44336;
  color: white;
}

.wtb-business {
  background: rgba(76, 175, 80, 0.15);
  color: #2e7d32;
  font-weight: 600;
}

.wtb-business:hover {
  background: rgba(76, 175, 80, 0.3);
}

/* Dark mode support for World Time Buddy */
.dark-mode .wtb-control-group input,
.dark-mode .wtb-control-group select {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.dark-mode .wtb-control-group select option {
  background: #2d2d2d;
  color: var(--text-primary);
}

.dark-mode .wtb-control-group input:focus,
.dark-mode .wtb-control-group select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.dark-mode .wtb-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.dark-mode .wtb-location-cell {
  background: rgba(102, 126, 234, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .wtb-cell {
  border-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .wtb-business {
  background: rgba(76, 175, 80, 0.2);
  color: #81c784;
}

.dark-mode .wtb-column-highlighted {
  background: rgba(102, 126, 234, 0.4) !important;
  box-shadow: inset 0 0 10px rgba(102, 126, 234, 0.6);
}

.dark-mode .wtb-date-next {
  background: #ff9800;
  color: white;
}

.dark-mode .wtb-date-prev {
  background: #f44336;
  color: white;
}

/* Routine & Task Reminder Styles */
.add-task-section,
.task-list-section,
.upcoming-section {
  margin-bottom: 30px;
}

.add-task-section h3,
.task-list-section h3,
.upcoming-section h3 {
  color: #555555;
  margin-bottom: 15px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-form {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.task-form .form-group {
  margin-bottom: 15px;
}

.task-form label {
  display: block;
  margin-bottom: 5px;
  color: #333;
  font-weight: 600;
  font-size: 14px;
}

.task-form input[type="text"],
.task-form input[type="time"],
.task-form input[type="date"],
.task-form select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.task-form input:focus,
.task-form select:focus {
  outline: none;
  border-color: #555555;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.days-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.days-selector label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: normal;
  cursor: pointer;
  padding: 5px 10px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: all 0.2s;
}

.days-selector label:hover {
  background: #f0f0f0;
}

.days-selector input[type="checkbox"]:checked + span,
.days-selector label:has(input:checked) {
  background: #555555;
  color: white;
  border-color: #555555;
}

.btn-primary {
  background: #555555;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.btn-primary:hover {
  background: #444444;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.task-list {
  max-height: 400px;
  overflow-y: auto;
}

.task-item {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
}

.task-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateX(5px);
}

.task-item.disabled {
  opacity: 0.6;
  background: #f5f5f5;
}

.task-info {
  flex: 1;
}

.task-name {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.task-details {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 13px;
  color: #666;
}

.task-details span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.task-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 5px;
  transition: all 0.2s;
  color: #666;
  font-size: 16px;
}

.btn-icon:hover {
  background: #f0f0f0;
  color: #333;
}

.btn-icon.btn-danger:hover {
  background: #ffebee;
  color: #f44336;
}

.no-tasks,
.no-upcoming {
  text-align: center;
  color: #999;
  padding: 40px 20px;
  font-style: italic;
}

.upcoming-list {
  max-height: 300px;
  overflow-y: auto;
}

.upcoming-item {
  background: white;
  border-left: 4px solid #555555;
  padding: 12px 15px;
  margin-bottom: 8px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.upcoming-date {
  font-size: 12px;
  color: #555555;
  font-weight: 600;
  margin-bottom: 4px;
}

.upcoming-task {
  font-size: 14px;
  color: #333;
}

/* Dark Mode Styles for Routine & Task Reminder */
.dark-mode .add-task-section h3,
.dark-mode .task-list-section h3,
.dark-mode .upcoming-section h3 {
  color: #e0e0e0;
}

.dark-mode .task-form {
  background: #2a2a2a;
  border-color: #444;
}

.dark-mode .task-form label {
  color: #e0e0e0;
}

.dark-mode .task-form input[type="text"],
.dark-mode .task-form input[type="time"],
.dark-mode .task-form input[type="date"],
.dark-mode .task-form select {
  background: #333;
  border-color: #555;
  color: #e0e0e0;
}

.dark-mode .task-form input:focus,
.dark-mode .task-form select:focus {
  border-color: #777;
}

.dark-mode .days-selector label {
  background: #333;
  border-color: #555;
  color: #e0e0e0;
}

.dark-mode .days-selector label:hover {
  background: #444;
}

.dark-mode .days-selector label:has(input:checked) {
  background: #666;
  border-color: #666;
}

.dark-mode .btn-primary {
  background: #666;
}

.dark-mode .btn-primary:hover {
  background: #777;
}

.dark-mode .task-item {
  background: #2a2a2a;
  border-color: #444;
}

.dark-mode .task-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dark-mode .task-item.disabled {
  background: #222;
}

/* ==================== PUNCH CLOCK STYLES ==================== */

.punch-section {
  text-align: center;
  padding: 30px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  margin-bottom: 25px;
}

.current-time-display {
  margin-bottom: 25px;
}

.time-display {
  font-size: 48px;
  font-weight: 700;
  color: white;
  font-family: 'Courier New', monospace;
  margin-bottom: 8px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.date-display {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.btn-punch {
  padding: 20px 50px;
  font-size: 24px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-punch i {
  font-size: 28px;
}

.btn-punch.punch-in {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: white;
}

.btn-punch.punch-in:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(17, 153, 142, 0.5);
}

.btn-punch.punch-out {
  background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
  color: white;
}

.btn-punch.punch-out:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(235, 51, 73, 0.5);
}

.btn-punch:active {
  transform: translateY(-1px);
}

.punch-history-section {
  margin-top: 25px;
}

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

.history-header h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

.btn-small {
  padding: 8px 15px;
  font-size: 13px;
}

.punch-history {
  max-height: 400px;
  overflow-y: auto;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  background: #fafafa;
}

.no-records {
  text-align: center;
  color: #999;
  padding: 30px;
  font-style: italic;
}

.punch-record {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 15px;
  margin-bottom: 10px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.punch-record:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.punch-record i {
  font-size: 20px;
}

.punch-record.record-in {
  border-left: 4px solid #11998e;
}

.punch-record.record-in i {
  color: #11998e;
}

.punch-record.record-out {
  border-left: 4px solid #eb3349;
}

.punch-record.record-out i {
  color: #eb3349;
}

.record-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.record-type {
  font-weight: 700;
  font-size: 14px;
  color: #333;
}

.record-time {
  font-family: 'Courier New', monospace;
  font-size: 16px;
  font-weight: 600;
  color: #555;
}

.export-section {
  margin-top: 20px;
  text-align: center;
}

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

/* Dark Mode - Punch Clock */
.dark-mode .punch-section {
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}

.dark-mode .time-display {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.dark-mode .history-header h3 {
  color: #e0e0e0;
}

.dark-mode .punch-history {
  background: #2a2a2a;
  border-color: #444;
}

.dark-mode .no-records {
  color: #777;
}

.dark-mode .punch-record {
  background: #333;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dark-mode .punch-record:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.dark-mode .record-type {
  color: #e0e0e0;
}

.dark-mode .record-time {
  color: #aaa;
}

/* Toast Notification Animation */
@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.dark-mode .task-name {
  color: #e0e0e0;
}

.dark-mode .task-details {
  color: #999;
}

.dark-mode .btn-icon {
  color: #999;
}

.dark-mode .btn-icon:hover {
  background: #444;
  color: #e0e0e0;
}

.dark-mode .btn-icon.btn-danger:hover {
  background: #3e2727;
  color: #f44336;
}

.dark-mode .no-tasks,
.dark-mode .no-upcoming {
  color: #666;
}

.dark-mode .upcoming-item {
  background: #2a2a2a;
  border-left-color: #777;
}

.dark-mode .upcoming-date {
  color: #999;
}

.dark-mode .upcoming-task {
  color: #e0e0e0;
}

/* Price Watch Styles */
.price-watch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.last-updated {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
  font-size: 14px;
}

.last-updated i {
  color: #555555;
}

.price-filter-section {
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.price-filter-section .form-group {
  margin-bottom: 15px;
}

.price-filter-section label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.price-filter-section input,
.price-filter-section select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.price-filter-section input:focus,
.price-filter-section select:focus {
  outline: none;
  border-color: #555555;
  box-shadow: 0 0 0 3px rgba(85, 85, 85, 0.1);
}

.loading-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px;
  color: #666;
  font-size: 16px;
}

.loading-indicator i {
  font-size: 24px;
  color: #555555;
}

.error-message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  color: #856404;
  margin-bottom: 20px;
}

.error-message i {
  font-size: 20px;
}

.error-message button {
  margin-left: auto;
}

.price-data-container {
  min-height: 300px;
  max-height: 500px;
  overflow-y: auto;
}

.no-data-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #999;
}

.no-data-message i {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.5;
}

.no-data-message p {
  font-size: 16px;
  margin: 0;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.price-table thead {
  background: #555555;
  color: white;
}

.price-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.price-table td {
  padding: 12px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 14px;
  color: #333;
}

.price-table tbody tr:hover {
  background: #f8f9fa;
}

.price-table tbody tr:last-child td {
  border-bottom: none;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 15px;
}

.pagination span {
  font-size: 14px;
  color: #666;
  font-weight: 600;
}

/* Dark Mode - Price Watch */
.dark-mode .price-watch-header {
  background: #2a2a2a;
  border-color: #444;
}

.dark-mode .last-updated {
  color: #aaa;
}

.dark-mode .last-updated i {
  color: #999;
}

.dark-mode .price-filter-section {
  background: #2a2a2a;
  border-color: #444;
}

.dark-mode .price-filter-section label {
  color: #e0e0e0;
}

.dark-mode .price-filter-section input,
.dark-mode .price-filter-section select {
  background: #333;
  border-color: #555;
  color: #e0e0e0;
}

.dark-mode .price-filter-section input:focus,
.dark-mode .price-filter-section select:focus {
  border-color: #777;
  box-shadow: 0 0 0 3px rgba(119, 119, 119, 0.2);
}

.dark-mode .loading-indicator {
  color: #aaa;
}

.dark-mode .loading-indicator i {
  color: #999;
}

.dark-mode .error-message {
  background: #3d3520;
  border-color: #6b5a2e;
  color: #ffd54f;
}

.dark-mode .no-data-message {
  color: #666;
}

.dark-mode .price-table {
  background: #2a2a2a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dark-mode .price-table thead {
  background: #444;
}

.dark-mode .price-table td {
  border-bottom-color: #444;
  color: #e0e0e0;
}

.dark-mode .price-table tbody tr:hover {
  background: #333;
}

.dark-mode .pagination span {
  color: #aaa;
}

/* Price Table Container - New Design */
.price-table-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 280px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  transition: all 0.2s ease;
  position: relative;
}

.price-row:hover {
  background: #e9ecef;
  transform: translateX(2px);
}

.store-name {
  font-size: 13px;
  color: #495057;
  font-weight: 500;
  flex: 1;
}

.store-price {
  font-size: 15px;
  font-weight: 700;
  color: #495057;
  margin-left: 12px;
}

/* Cell styling improvements */
.product-cell {
  vertical-align: top;
  max-width: 350px;
}

.category-cell {
  vertical-align: top;
  white-space: nowrap;
}

.prices-cell {
  vertical-align: top;
  min-width: 280px;
}

.date-cell {
  vertical-align: top;
  white-space: nowrap;
  color: #6c757d;
  font-size: 13px;
}

/* Dark Mode - Price Table Container */
.dark-mode .price-table-container {
  /* Container styles remain same */
}

.dark-mode .price-row {
  background: #2d2d2d;
  border-color: #404040;
}

.dark-mode .price-row:hover {
  background: #363636;
}

.dark-mode .store-name {
  color: #e0e0e0;
}

.dark-mode .store-price {
  color: #e0e0e0;
}

.dark-mode .date-cell {
  color: #999;
}

/* Loan/Mortgage Calculator Styles */
.loan-input-section {
  background: rgba(248, 249, 250, 0.8);
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 25px;
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dark-mode .loan-input-section {
  background: rgba(45, 45, 45, 0.8);
  border-color: #404040;
}

.loan-input-section .form-row {
  margin-bottom: 20px;
}

.loan-input-section .form-row:last-child {
  margin-bottom: 0;
}

.loan-results-summary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 25px;
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.dark-mode .loan-results-summary {
  background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

.loan-results-summary h3 {
  margin-bottom: 20px;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.result-card {
  background: rgba(255, 255, 255, 0.15);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.result-label {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-value {
  font-size: 24px;
  font-weight: 700;
}

.amortization-section {
  margin-top: 25px;
}

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

.section-header h3 {
  font-size: 20px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dark-mode .section-header h3 {
  color: #e0e0e0;
}

.table-container {
  overflow-x: auto;
  max-height: 600px;
  overflow-y: auto;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dark-mode .table-container {
  border-color: #404040;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 14px;
}

.dark-mode .data-table {
  background: #2d2d2d;
}

.data-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table thead th {
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.dark-mode .data-table tbody tr {
  border-bottom-color: #404040;
}

.data-table tbody tr:hover {
  background-color: #f8f9fa;
}

.dark-mode .data-table tbody tr:hover {
  background-color: #363636;
}

.data-table tbody td {
  padding: 10px;
  color: #495057;
}

.dark-mode .data-table tbody td {
  color: #e0e0e0;
}

.amount-cell {
  text-align: right;
  font-family: 'Courier New', monospace;
  font-weight: 500;
}

.principal-cell {
  color: #28a745;
}

.dark-mode .principal-cell {
  color: #5cb85c;
}

.interest-cell {
  color: #dc3545;
}

.dark-mode .interest-cell {
  color: #d9534f;
}

.balance-cell {
  font-weight: 600;
  color: #667eea;
}

.dark-mode .balance-cell {
  color: #8b9cf7;
}

.data-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.dark-mode .data-table tbody tr:nth-child(even) {
  background-color: #333333;
}

.data-table tbody tr:nth-child(even):hover {
  background-color: #e9ecef;
}

.dark-mode .data-table tbody tr:nth-child(even):hover {
  background-color: #3a3a3a;
}

/* Upcoming Installment Highlight */
.data-table tbody tr.upcoming-installment {
  background: linear-gradient(90deg, #fff3cd 0%, #ffeaa7 100%) !important;
  border-left: 4px solid #ffc107;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.dark-mode .data-table tbody tr.upcoming-installment {
  background: linear-gradient(90deg, #3d3520 0%, #4a3f28 100%) !important;
  border-left: 4px solid #ffd54f;
  box-shadow: 0 2px 8px rgba(255, 213, 79, 0.2);
}

.data-table tbody tr.upcoming-installment td {
  color: #856404;
  font-weight: 600;
}

.dark-mode .data-table tbody tr.upcoming-installment td {
  color: #ffd54f;
}

.data-table tbody tr.upcoming-installment .balance-cell {
  color: #ff6f00;
  font-weight: 700;
}

.dark-mode .data-table tbody tr.upcoming-installment .balance-cell {
  color: #ffb74d;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .result-value {
    font-size: 20px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .data-table {
    font-size: 12px;
  }

  .data-table thead th,
  .data-table tbody td {
    padding: 8px 6px;
  }
}

/* Loan Calculator Input Styles */
.loan-input-section .form-group label {
  display: block;
  margin-bottom: 8px;
  color: #495057;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
}

.dark-mode .loan-input-section .form-group label {
  color: #e0e0e0;
}

.loan-input-section input[type="number"],
.loan-input-section input[type="date"],
.loan-input-section select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #ffffff;
  color: #333;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.loan-input-section input[type="number"]:focus,
.loan-input-section input[type="date"]:focus,
.loan-input-section select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.loan-input-section input[type="number"]:hover,
.loan-input-section input[type="date"]:hover,
.loan-input-section select:hover {
  border-color: #667eea;
}

.dark-mode .loan-input-section input[type="number"],
.dark-mode .loan-input-section input[type="date"],
.dark-mode .loan-input-section select {
  background-color: #2d2d2d;
  border-color: #404040;
  color: #e0e0e0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b9cf7' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
}

.dark-mode .loan-input-section input[type="number"]:focus,
.dark-mode .loan-input-section input[type="date"]:focus,
.dark-mode .loan-input-section select:focus {
  border-color: #8b9cf7;
  box-shadow: 0 0 0 3px rgba(139, 156, 247, 0.15);
}

.dark-mode .loan-input-section input[type="number"]:hover,
.dark-mode .loan-input-section input[type="date"]:hover,
.dark-mode .loan-input-section select:hover {
  border-color: #8b9cf7;
}

/* Number input spinner styling */
.loan-input-section input[type="number"]::-webkit-inner-spin-button,
.loan-input-section input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
  height: 30px;
  cursor: pointer;
}

/* Date input calendar icon */
.loan-input-section input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.loan-input-section input[type="date"]::-webkit-calendar-picker-indicator:hover {
  background-color: rgba(102, 126, 234, 0.1);
}

.dark-mode .loan-input-section input[type="date"]::-webkit-calendar-picker-indicator:hover {
  background-color: rgba(139, 156, 247, 0.15);
}

/* Select dropdown arrow */
.loan-input-section select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 40px;
  cursor: pointer;
}

/* Placeholder styling */
.loan-input-section input::placeholder {
  color: #adb5bd;
  font-style: italic;
}

.dark-mode .loan-input-section input::placeholder {
  color: #6c757d;
}

/* Input validation states */
.loan-input-section input:invalid {
  border-color: #dc3545;
}

.loan-input-section input:valid {
  border-color: #28a745;
}

/* Responsive adjustments for inputs */
@media (max-width: 768px) {
  .loan-input-section input[type="number"],
  .loan-input-section input[type="date"],
  .loan-input-section select {
    padding: 10px 12px;
    font-size: 14px;
  }

  .loan-input-section .form-group label {
    font-size: 13px;
  }
}

/* Online/Offline Status Indicator */
.connection-status {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 20px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9998;
  animation: slideDown 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.connection-status.visible {
  display: flex;
}

/* Add padding to body when connection status is visible */
body.has-connection-banner {
  padding-top: 20px;
}

body.has-connection-banner main {
  margin-top: 0;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.connection-status.offline {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
}

.connection-status.online {
  background: linear-gradient(135deg, #28a745 0%, #218838 100%);
  color: white;
}

.connection-status i {
  font-size: 16px;
}

/* Service Worker Update Notification */
.sw-update-notification {
  position: fixed;
  bottom: 80px;
  right: 20px;
  padding: 15px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  display: none;
  align-items: center;
  gap: 15px;
  z-index: 9999;
  animation: slideUp 0.3s ease;
  max-width: 400px;
}

.sw-update-notification.visible {
  display: flex;
}

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

.sw-update-notification span {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}

.sw-update-notification i {
  font-size: 18px;
  margin-right: 5px;
  animation: spin 2s linear infinite;
}

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

.sw-update-notification .btn-small {
  padding: 8px 16px;
  font-size: 13px;
  background: white;
  color: #667eea;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sw-update-notification .btn-small:hover {
  background: #f8f9fa;
  transform: scale(1.05);
}

.sw-update-notification .btn-close-notification {
  background: transparent;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  padding: 5px;
  margin-left: 5px;
  opacity: 0.8;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.sw-update-notification .btn-close-notification:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* Responsive adjustments for notifications */
@media (max-width: 768px) {
  .connection-status {
    font-size: 12px;
    padding: 10px 15px;
  }
  
  body.has-connection-banner {
    padding-top: 45px;
  }
  
  .sw-update-notification {
    left: 20px;
    right: 20px;
    bottom: 90px;
    flex-direction: row;
    text-align: left;
    flex-wrap: wrap;
  }
  
  .sw-update-notification span {
    flex: 1 1 100%;
    margin-bottom: 10px;
  }
  
  .sw-update-notification .btn-small {
    flex: 1;
  }
  
  .sw-update-notification .btn-close-notification {
    order: 3;
  }
}

/* Punch Clock Duration Styles */
.punch-record-pair {
  background: rgba(248, 249, 250, 0.6);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #e9ecef;
  transition: all 0.2s ease;
}

.dark-mode .punch-record-pair {
  background: rgba(45, 45, 45, 0.6);
  border-color: #404040;
}

.punch-record-pair:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.duration-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  margin-top: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.duration-badge i {
  font-size: 14px;
}

.duration-badge.active {
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  animation: pulse 2s infinite;
}

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

/* HK Weather Tool Styles */
.weather-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.weather-general-situation {
  margin-bottom: 25px;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.weather-general-situation h3 {
  margin-bottom: 12px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.weather-general-situation p {
  line-height: 1.6;
  font-size: 15px;
  opacity: 0.95;
}

.weather-current-conditions {
  margin-bottom: 25px;
}

.weather-current-conditions h3 {
  margin-bottom: 15px;
  color: #333;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.current-conditions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.condition-card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  text-align: center;
  transition: all 0.3s ease;
}

.condition-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.condition-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.condition-value {
  font-size: 32px;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 8px;
  font-family: 'Courier New', monospace;
}

.condition-time {
  font-size: 12px;
  color: #999;
}

.weather-forecast-section {
  margin-top: 25px;
}

.weather-forecast-section h3 {
  margin-bottom: 15px;
  color: #333;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
}

.forecast-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.forecast-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

.forecast-date {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.forecast-day {
  font-size: 18px;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 4px;
}

.forecast-full-date {
  font-size: 13px;
  color: #999;
}

.forecast-icon-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 15px 0;
  min-height: 80px;
}

.forecast-icon {
  max-width: 80px;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.forecast-card:hover .forecast-icon {
  transform: scale(1.1);
}

.forecast-temps {
  display: flex;
  justify-content: space-around;
  margin-bottom: 15px;
  padding: 10px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 6px;
}

.temp-max {
  font-size: 24px;
  font-weight: 700;
  color: #dc3545;
}

.temp-min {
  font-size: 24px;
  font-weight: 700;
  color: #007bff;
}

.forecast-weather {
  font-size: 14px;
  color: #333;
  margin-bottom: 10px;
  line-height: 1.5;
  font-weight: 500;
}

.forecast-wind {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
}

.forecast-rh,
.forecast-psr {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
  padding: 6px 8px;
  background: #f8f9fa;
  border-radius: 4px;
}

/* Dark Mode - HK Weather */
.dark-mode .weather-header {
  background: #2a2a2a;
  border-color: #444;
}

.dark-mode .weather-general-situation {
  background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

.dark-mode .weather-current-conditions h3 {
  color: #e0e0e0;
}

.dark-mode .condition-card {
  background: #2a2a2a;
  border-color: #444;
}

.dark-mode .condition-card:hover {
  border-color: #777;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dark-mode .condition-label {
  color: #999;
}

.dark-mode .condition-value {
  color: #8b9cf7;
}

.dark-mode .condition-time {
  color: #666;
}

.dark-mode .weather-forecast-section h3 {
  color: #e0e0e0;
}

.dark-mode .forecast-card {
  background: #2a2a2a;
  border-color: #444;
}

.dark-mode .forecast-card:hover {
  border-color: #777;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.dark-mode .forecast-date {
  border-bottom-color: #444;
}

.dark-mode .forecast-day {
  color: #8b9cf7;
}

.dark-mode .forecast-full-date {
  color: #666;
}

.dark-mode .forecast-icon {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) brightness(1.1);
}

.dark-mode .forecast-temps {
  background: linear-gradient(135deg, #333 0%, #2d2d2d 100%);
}

.dark-mode .forecast-weather {
  color: #e0e0e0;
}

.dark-mode .forecast-wind,
.dark-mode .forecast-rh,
.dark-mode .forecast-psr {
  background: #333;
  color: #aaa;
}

/* Responsive adjustments for weather tool */
@media (max-width: 768px) {
  .current-conditions-grid {
    grid-template-columns: 1fr;
  }

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

  .condition-value {
    font-size: 28px;
  }

  .temp-max,
  .temp-min {
    font-size: 20px;
  }
}

/* HSI Index Graph Styles */
.hsi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.hsi-current-info {
  margin-bottom: 25px;
  text-align: center;
}

.hsi-main-value {
  display: inline-block;
  padding: 30px 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.hsi-label {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hsi-value {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 10px;
  font-family: 'Courier New', monospace;
}

.hsi-change {
  font-size: 20px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
}

.hsi-change.positive {
  color: #4ade80;
}

.hsi-change.negative {
  color: #f87171;
}

.hsi-chart-container {
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  min-height: 450px;
  position: relative;
}

.hsi-chart-container .apexcharts-canvas {
  margin: 0 auto;
}

.hsi-data-table-section {
  margin-top: 25px;
}

.hsi-data-table-section h3 {
  margin-bottom: 15px;
  color: #333;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.amount-cell.positive {
  color: #16a34a;
  font-weight: 600;
}

.amount-cell.negative {
  color: #dc2626;
  font-weight: 600;
}

/* Dark Mode - HSI Index */
.dark-mode .hsi-header {
  background: #2a2a2a;
  border-color: #444;
}

.dark-mode .hsi-main-value {
  background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

.dark-mode .hsi-data-table-section h3 {
  color: #e0e0e0;
}

.dark-mode .hsi-chart-container {
  background: #1e293b;
  border-color: #334155;
}

/* ApexCharts Dark Mode Overrides */
.dark-mode .apexcharts-tooltip {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

.dark-mode .apexcharts-tooltip-title {
  background: #0f172a !important;
  border-bottom-color: #334155 !important;
  color: #e2e8f0 !important;
}

.dark-mode .apexcharts-text {
  fill: #94a3b8 !important;
}

.dark-mode .apexcharts-legend-text {
  color: #e2e8f0 !important;
}

.dark-mode .apexcharts-gridline {
  stroke: #334155 !important;
}

.dark-mode .apexcharts-xaxis line,
.dark-mode .apexcharts-yaxis line {
  stroke: #334155 !important;
}

.dark-mode .apexcharts-toolbar {
  background: rgba(30, 41, 59, 0.9) !important;
}

.dark-mode .apexcharts-menu {
  background: #1e293b !important;
  border-color: #334155 !important;
}

.dark-mode .apexcharts-menu-item:hover {
  background: #334155 !important;
}

/* Gold Price Styles */
.gold-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.gold-current-info {
  margin-bottom: 25px;
  text-align: center;
}

.gold-rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.gold-rate-card {
  padding: 25px 20px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-radius: 12px;
  color: white;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  transition: transform 0.2s ease;
}

.gold-rate-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.gold-rate-label {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.gold-rate-value {
  font-size: 36px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
}

.gold-change-section {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.gold-previous-rates {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 10px;
  font-size: 16px;
}

.gold-previous-rates span {
  color: #666;
}

.gold-chart-container {
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  min-height: 450px;
  position: relative;
}

.gold-chart-container .apexcharts-canvas {
  margin: 0 auto;
}

.gold-info-section {
  margin-top: 25px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.gold-info-section h3 {
  margin-bottom: 15px;
  color: #333;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.gold-info-content p {
  margin: 8px 0;
  color: #666;
  line-height: 1.6;
}

/* Dark Mode - Gold Price */
.dark-mode .gold-header {
  background: #2a2a2a;
  border-color: #444;
}

.dark-mode .gold-rate-card {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.dark-mode .gold-change-section {
  background: #2a2a2a;
  border-color: #444;
}

.dark-mode .gold-previous-rates span {
  color: #b0b0b0;
}

.dark-mode .gold-info-section {
  background: #2a2a2a;
  border-color: #444;
}

.dark-mode .gold-info-section h3 {
  color: #e0e0e0;
}

.dark-mode .gold-info-content p {
  color: #b0b0b0;
}

.dark-mode .gold-chart-container {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .amount-cell.positive {
  color: #4ade80;
}

.dark-mode .amount-cell.negative {
  color: #f87171;
}

/* Responsive adjustments for HSI Index */
@media (max-width: 768px) {
  .hsi-value {
    font-size: 36px;
  }

  .hsi-change {
    font-size: 16px;
  }

  .hsi-chart-container {
    min-height: 350px;
  }

  .hsi-main-value {
    padding: 20px 30px;
  }
}

/* HSI Add Data Section */
.hsi-add-data-section {
  margin-top: 25px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
}

.hsi-add-data-section h3 {
  margin-bottom: 15px;
  color: #333;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hsi-input-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  align-items: end;
}

.hsi-slider-row {
  margin-top: 12px;
  width: 100%;
}

.hsi-input-field {
  display: flex;
  flex-direction: column;
}

.hsi-input-field label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hsi-input-field input {
  padding: 10px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Courier New', monospace;
  transition: all 0.3s ease;
  background: white;
}

.hsi-input-field input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Slider Styling */
.hsi-slider-field input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  /* background: linear-gradient(to right, #667eea 0%, #667eea var(--slider-fill, 40%), #e2e8f0 var(--slider-fill, 40%), #e2e8f0 100%); */
  outline: none;
  cursor: pointer;
  padding: 0;
  border: none;
}

.hsi-slider-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
  transition: all 0.2s ease;
}

.hsi-slider-field input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(102, 126, 234, 0.6);
}

.hsi-slider-field input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
  transition: all 0.2s ease;
}

.hsi-slider-field input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(102, 126, 234, 0.6);
}

.hsi-slider-field label span {
  color: #667eea;
  font-weight: 700;
  font-family: 'Courier New', monospace;
}

.hsi-input-button button {
  width: 100%;
  padding: 10px 16px;
  height: fit-content;
}

/* HSI Close Buttons */
.hsi-close-buttons {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.btn-adjust {
  flex: 1;
  min-width: 50px;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  background: white;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #64748b;
}

.btn-adjust:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

.btn-adjust:active {
  transform: scale(0.95);
}

/* Dark Mode - HSI Close Buttons */
.dark-mode .btn-adjust {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

.dark-mode .btn-adjust:hover {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

/* Dark Mode - HSI Add Data */
.dark-mode .hsi-add-data-section {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .hsi-add-data-section h3 {
  color: #e2e8f0;
}

.dark-mode .hsi-input-field label {
  color: #94a3b8;
}

.dark-mode .hsi-input-field input {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

.dark-mode .hsi-input-field input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Dark Mode - Slider */
.dark-mode .hsi-slider-field input[type="range"] {
  /* background: linear-gradient(to right, #667eea 0%, #667eea var(--slider-fill, 40%), #334155 var(--slider-fill, 40%), #334155 100%); */
}

.dark-mode .hsi-slider-field input[type="range"]::-webkit-slider-thumb {
  background: #818cf8;
  box-shadow: 0 2px 6px rgba(129, 140, 248, 0.4);
}

.dark-mode .hsi-slider-field input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 3px 8px rgba(129, 140, 248, 0.6);
}

.dark-mode .hsi-slider-field input[type="range"]::-moz-range-thumb {
  background: #818cf8;
  box-shadow: 0 2px 6px rgba(129, 140, 248, 0.4);
}

.dark-mode .hsi-slider-field input[type="range"]::-moz-range-thumb:hover {
  box-shadow: 0 3px 8px rgba(129, 140, 248, 0.6);
}

/* ========================================
   Countdown Timer Styles
   ======================================== */

.calendar-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 25px;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
}

.calendar-section h3 {
  color: white;
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#fullCalendar {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* FullCalendar Custom Styling */
.fc {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.fc .fc-toolbar {
  margin-bottom: 16px !important;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fc .fc-toolbar-title {
  font-size: 1.4em;
  color: #1e293b;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0;
  text-align: center;
  flex: 1;
}

.fc .fc-button {
  padding: 8px 16px;
  font-size: 0.9em;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-transform: capitalize;
}

.fc .fc-button-primary {
  background-color: #667eea;
  border-color: #667eea;
  color: white;
}

.fc .fc-button-primary:hover {
  background-color: #5568d3;
  border-color: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
  background-color: #4c5fd7;
  border-color: #4c5fd7;
}

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

.fc .fc-col-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.fc .fc-col-header-cell {
  padding: 12px 4px;
  font-weight: 700;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white;
  border: none;
}

.fc .fc-daygrid-day {
  padding: 4px;
  transition: background-color 0.2s ease;
}

.fc .fc-daygrid-day:hover {
  background-color: #f1f5f9;
}

.fc .fc-daygrid-day.fc-day-today {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
  border: 2px solid #f59e0b;
}

.fc .fc-daygrid-day-number {
  font-size: 0.95em;
  font-weight: 600;
  color: #334155;
  padding: 6px 8px;
  display: inline-block;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  line-height: 20px;
  text-align: center;
}

.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
  background: #f59e0b;
  color: white;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.fc .fc-day-other .fc-daygrid-day-number {
  color: #cbd5e1;
}

.fc .fc-event {
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.8em;
  font-weight: 600;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  margin: 2px 0;
}

.fc .fc-event:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.fc .fc-daygrid-day-events {
  margin-top: 4px;
}

.fc .fc-scrollgrid {
  border: none;
}

.fc .fc-scrollgrid td,
.fc .fc-scrollgrid th {
  border-color: #e2e8f0;
}

.fc .fc-daygrid-body {
  border: none;
}

/* Responsive Calendar */
@media (max-width: 768px) {
  .calendar-section {
    padding: 16px;
  }
  
  .fc .fc-toolbar {
    flex-direction: column;
    gap: 12px;
    padding: 10px;
  }
  
  .fc .fc-toolbar-title {
    font-size: 1.2em;
    order: -1;
  }
  
  .fc .fc-button {
    padding: 6px 12px;
    font-size: 0.85em;
  }
  
  .fc .fc-col-header-cell {
    padding: 8px 2px;
    font-size: 0.75em;
  }
  
  .fc .fc-daygrid-day-number {
    width: 28px;
    height: 28px;
    font-size: 0.85em;
    padding: 4px 6px;
  }
  
  .fc .fc-event {
    font-size: 0.75em;
    padding: 3px 6px;
  }
}

.add-countdown-section {
  background: #f0f9ff;
  border: 2px solid #3b82f6;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
}

.add-countdown-section h3 {
  color: #1e40af;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.countdown-form .form-group label {
  display: block;
  margin-bottom: 5px;
  color: #374151;
  font-weight: 600;
  font-size: 14px;
}

.countdown-form input,
.countdown-form select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.countdown-form input:focus,
.countdown-form select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.countdown-form .btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.countdown-form .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.active-countdowns-section h3 {
  color: #1e40af;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.countdown-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
}

.no-countdowns {
  text-align: center;
  color: #6b7280;
  padding: 40px 20px;
  font-style: italic;
  grid-column: 1 / -1;
}

.countdown-item {
  background: white;
  border: 3px solid;
  border-radius: 12px;
  padding: 20px;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.countdown-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.countdown-item.blue { border-color: #3b82f6; }
.countdown-item.green { border-color: #10b981; }
.countdown-item.purple { border-color: #8b5cf6; }
.countdown-item.orange { border-color: #f59e0b; }
.countdown-item.red { border-color: #ef4444; }
.countdown-item.pink { border-color: #ec4899; }

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

.countdown-name {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  flex: 1;
}

.countdown-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}

.delete-btn {
  background: none !important;
  border: none !important;
  cursor: pointer;
  padding: 8px 8px !important;
  border-radius: 4px;
  transition: all 0.2s ease;
  color: #9ca3af !important;
  font-size: 12px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  height: auto !important;
  min-width: unset !important;
  min-height: unset !important;
}

.delete-btn i {
  font-size: 12px !important;
  line-height: 1;
}

.delete-btn:hover {
  background: #fee2e2 !important;
  color: #dc2626 !important;
  transform: scale(1.05);
}

.countdown-actions {
  display: flex;
  gap: 8px;
}

.countdown-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: all 0.2s ease;
  color: #6b7280;
}

.countdown-action-btn:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.countdown-action-btn.delete:hover {
  background: #fee2e2;
  color: #dc2626;
}

.countdown-display {
  text-align: center;
  margin: 15px 0;
}

.countdown-time {
  font-size: 32px;
  font-weight: 800;
  font-family: 'Courier New', monospace;
  color: #1f2937;
  line-height: 1.2;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.time-value {
  font-size: 36px;
  font-weight: 800;
  color: #1f2937;
  line-height: 1;
}

.time-label {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 5px;
  font-weight: 600;
}

.countdown-finished {
  font-size: 24px;
  color: #059669;
  animation: pulse 2s ease-in-out infinite;
}

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

.countdown-labels {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 5px;
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.countdown-target-date {
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}

.countdown-target {
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  margin: 10px 0;
  padding: 8px;
  background: #f9fafb;
  border-radius: 6px;
}

.countdown-completed {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  color: #92400e;
}

/* Dark Mode - Countdown Timer */
.dark-mode .add-countdown-section {
  background: #1e293b;
  border-color: #3b82f6;
}

.dark-mode .add-countdown-section h3,
.dark-mode .active-countdowns-section h3 {
  color: #60a5fa;
}

.dark-mode .countdown-form .form-group label {
  color: #e2e8f0;
}

.dark-mode .countdown-form input,
.dark-mode .countdown-form select {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

.dark-mode .countdown-form input:focus,
.dark-mode .countdown-form select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.dark-mode .no-countdowns {
  color: #94a3b8;
}

.dark-mode .countdown-item {
  background: #1e293b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dark-mode .countdown-name {
  color: #f1f5f9;
}

.dark-mode .countdown-time {
  color: #f1f5f9;
}

.dark-mode .time-value {
  color: #f1f5f9;
}

.dark-mode .countdown-labels {
  color: #94a3b8;
}

.dark-mode .countdown-target-date {
  color: #94a3b8;
  border-color: #334155;
}

.dark-mode .countdown-target {
  background: #1e293b;
  color: #94a3b8;
}

.dark-mode .countdown-action-btn {
  color: #94a3b8;
}

.dark-mode .countdown-action-btn:hover {
  background: #334155;
  color: #f1f5f9;
}

.dark-mode .countdown-header h4 {
  color: #f1f5f9;
}

.dark-mode .delete-btn {
  color: #94a3b8 !important;
}

.dark-mode .delete-btn:hover {
  background: #7f1d1d !important;
  color: #fca5a5 !important;
}

.dark-mode .countdown-completed {
  background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
  color: #fcd34d;
}

/* Dark Mode - Calendar */
.dark-mode .calendar-section {
  background: linear-gradient(135deg, #4c5fd7 0%, #6b4fa2 100%);
  border: none;
  box-shadow: 0 8px 24px rgba(76, 95, 215, 0.3);
}

.dark-mode .calendar-section h3 {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dark-mode #fullCalendar {
  background: #1e293b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dark-mode .fc .fc-toolbar {
  background: #0f172a;
}

.dark-mode .fc .fc-toolbar-title {
  color: #f1f5f9;
}

.dark-mode .fc .fc-col-header {
  background: linear-gradient(135deg, #4c5fd7 0%, #6b4fa2 100%);
}

.dark-mode .fc .fc-col-header-cell {
  color: white;
}

.dark-mode .fc .fc-daygrid-day {
  background: #1e293b;
}

.dark-mode .fc .fc-daygrid-day:hover {
  background-color: #334155;
}

.dark-mode .fc .fc-daygrid-day.fc-day-today {
  background: linear-gradient(135deg, #92400e 0%, #78350f 100%) !important;
  border: 2px solid #f59e0b;
}

.dark-mode .fc .fc-daygrid-day-number {
  color: #e2e8f0;
}

.dark-mode .fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
  background: #f59e0b;
  color: white;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
}

.dark-mode .fc .fc-day-other .fc-daygrid-day-number {
  color: #475569;
}

.dark-mode .fc .fc-button-primary {
  background-color: #667eea;
  border-color: #667eea;
  color: white;
}

.dark-mode .fc .fc-button-primary:hover {
  background-color: #5568d3;
  border-color: #5568d3;
}

.dark-mode .fc .fc-scrollgrid td,
.dark-mode .fc .fc-scrollgrid th {
  border-color: #334155;
}

/* ========================================
   Unit Converter Styles
   ======================================== */

.converter-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 25px;
}

.category-btn {
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.category-btn:hover {
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-2px);
}

.category-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.converter-interface {
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
}

.conversion-row {
  display: flex;
  gap: 15px;
  align-items: flex-end;
  margin-bottom: 20px;
}

.conversion-input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.conversion-input-group label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.conversion-input-group input,
.conversion-input-group select {
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.2s ease;
}

.conversion-input-group input:focus,
.conversion-input-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.conversion-swap {
  display: flex;
  align-items: center;
  padding-bottom: 2px;
}

.swap-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swap-btn:hover {
  transform: rotate(180deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.conversion-result {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
}

.formula-text {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #667eea;
}

/* ========================================
   BMI Calculator Styles
   ======================================== */

.bmi-input-section {
  background: #f0f9ff;
  border: 2px solid #3b82f6;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
}

.bmi-input-section h3 {
  color: #1e40af;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bmi-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.bmi-form .form-group {
  display: flex;
  flex-direction: column;
}

.bmi-form .btn-primary {
  grid-column: span 2;
  margin-top: 5px;
}

.bmi-form .form-group label {
  display: block;
  margin-bottom: 5px;
  color: #374151;
  font-weight: 600;
  font-size: 14px;
}

.bmi-form .form-group input,
.bmi-form .form-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.2s ease;
}

.bmi-form .form-group input:focus,
.bmi-form .form-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.bmi-results {
  animation: fadeIn 0.5s ease;
}

.bmi-results h3 {
  color: #1e293b;
  margin-bottom: 20px;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bmi-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 25px;
  color: white;
}

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

.bmi-value span {
  font-size: 48px;
  font-weight: 700;
  display: block;
  line-height: 1;
}

.bmi-value small {
  font-size: 16px;
  opacity: 0.9;
  margin-top: 5px;
  display: block;
}

.bmi-category {
  font-size: 24px;
  font-weight: 700;
  text-align: right;
}

.bmi-scale {
  position: relative;
  height: 40px;
  background: #e2e8f0;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 25px;
  display: flex;
}

.scale-segment {
  flex: 1;
  height: 100%;
}

.scale-segment.underweight {
  background: #3b82f6;
}

.scale-segment.normal {
  background: #10b981;
}

.scale-segment.overweight {
  background: #f59e0b;
}

.scale-segment.obese {
  background: #ef4444;
}

.scale-indicator {
  position: absolute;
  top: -5px;
  width: 4px;
  height: 50px;
  background: #1e293b;
  border: 2px solid white;
  border-radius: 2px;
  transition: left 0.5s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.bmi-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.detail-card {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 15px;
}

.detail-card strong {
  display: block;
  color: #64748b;
  font-size: 14px;
  margin-bottom: 8px;
}

.detail-card p {
  margin: 0;
  color: #1e293b;
  font-size: 16px;
  font-weight: 600;
}

.bmi-recommendations {
  background: #fef3c7;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 20px;
}

.bmi-recommendations h4 {
  color: #92400e;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bmi-recommendations ul {
  margin: 0;
  padding-left: 20px;
}

.bmi-recommendations li {
  color: #78350f;
  margin-bottom: 10px;
  line-height: 1.6;
}

.bmi-recommendations li:last-child {
  margin-bottom: 0;
}

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

/* Responsive BMI Form */
@media (max-width: 768px) {
  .bmi-form {
    grid-template-columns: 1fr;
  }
  
  .bmi-form .btn-primary {
    grid-column: span 1;
  }
}

/* Dark Mode - Unit Converter */
.dark-mode .converter-categories .category-btn {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

.dark-mode .converter-categories .category-btn:hover {
  border-color: #667eea;
  color: #667eea;
}

.dark-mode .converter-categories .category-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
}

.dark-mode .converter-interface {
  background: #0f172a;
}

.dark-mode .conversion-input-group label {
  color: #e2e8f0;
}

.dark-mode .conversion-input-group input,
.dark-mode .conversion-input-group select {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

.dark-mode .conversion-result {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .formula-text {
  color: #60a5fa;
}

/* Dark Mode - BMI Calculator */
.dark-mode .bmi-input-section {
  background: #1e293b;
  border-color: #3b82f6;
}

.dark-mode .bmi-input-section h3 {
  color: #60a5fa;
}

.dark-mode .bmi-form .form-group label {
  color: #e2e8f0;
}

.dark-mode .bmi-form .form-group input,
.dark-mode .bmi-form .form-group select {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

.dark-mode .bmi-results h3 {
  color: #f1f5f9;
}

.dark-mode .detail-card {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .detail-card strong {
  color: #94a3b8;
}

.dark-mode .detail-card p {
  color: #f1f5f9;
}

.dark-mode .bmi-recommendations {
  background: #78350f;
  border-color: #f59e0b;
}

.dark-mode .bmi-recommendations h4 {
  color: #fbbf24;
}

.dark-mode .bmi-recommendations li {
  color: #fde68a;
}

/* ========================================
   8-Bit Pet Companion Styles
   ======================================== */

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

#petCanvas {
  border: 4px solid #333;
  border-radius: 8px;
  background: #E8F4F8;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pet-status {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}

.status-bar {
  margin-bottom: 12px;
}

.status-bar label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.bar-container {
  width: 100%;
  height: 20px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #ccc;
}

.bar-fill {
  height: 100%;
  transition: width 0.3s ease, background-color 0.3s ease;
  border-radius: 8px;
}

.bar-fill.hunger {
  background: #4CAF50;
}

.bar-fill.happiness {
  background: #4CAF50;
}

.bar-fill.energy {
  background: #4CAF50;
}

.pet-info {
  background: #f5f5f5;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 2px solid #ddd;
}

.pet-name-section {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.pet-name-section input {
  flex: 1;
  padding: 8px 12px;
  border: 2px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.btn-small {
  padding: 8px 16px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-small:hover {
  background: #5568d3;
  transform: translateY(-2px);
}

.pet-stats p {
  margin: 8px 0;
  font-size: 14px;
  color: #555;
}

.pet-stats strong {
  color: #333;
}

.pet-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.action-btn {
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.action-btn i {
  font-size: 18px;
}

.feed-btn {
  color: #FF6B6B;
  border-color: #FF6B6B;
}

.feed-btn:hover {
  background: #FF6B6B;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.play-btn {
  color: #4ECDC4;
  border-color: #4ECDC4;
}

.play-btn:hover {
  background: #4ECDC4;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.sleep-btn {
  color: #95E1D3;
  border-color: #95E1D3;
}

.sleep-btn:hover {
  background: #95E1D3;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(149, 225, 211, 0.3);
}

.clean-btn {
  color: #F38181;
  border-color: #F38181;
}

.clean-btn:hover {
  background: #F38181;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(243, 129, 129, 0.3);
}

.pet-log {
  background: #f9f9f9;
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  max-height: 200px;
  overflow-y: auto;
}

.pet-log h4 {
  margin: 0 0 10px 0;
  font-size: 16px;
  color: #333;
}

.log-content {
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

.log-entry {
  margin: 6px 0;
  padding: 6px;
  background: white;
  border-left: 3px solid #667eea;
  border-radius: 4px;
}

.pet-selection {
  background: #f5f5f5;
  padding: 15px;
  border-radius: 8px;
  border: 2px solid #ddd;
}

.pet-selection h4 {
  margin: 0 0 15px 0;
  font-size: 16px;
  color: #333;
}

.pet-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
}

.pet-option-btn {
  padding: 15px;
  border: 3px solid #ddd;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.pet-option-btn:hover {
  border-color: #667eea;
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

.pet-option-btn span {
  display: block;
  margin-top: 10px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.pet-preview {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  border: 2px solid #ccc;
  border-radius: 4px;
  image-rendering: pixelated;
}

.cat-preview {
  background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
}

.dog-preview {
  background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
}

.rabbit-preview {
  background: linear-gradient(135deg, #FFFFFF 0%, #F5F5F5 100%);
  border: 2px solid #ddd;
}

.hamster-preview {
  background: linear-gradient(135deg, #D2691E 0%, #CD853F 100%);
}

/* Level and XP System */
.level-info {
  margin-top: 15px;
  padding: 10px;
  background: #f0f8ff;
  border-radius: 8px;
  border: 2px solid #667eea;
}

.level-info p {
  margin: 5px 0;
  font-size: 14px;
  color: #333;
}

.xp-bar-container {
  width: 100%;
  height: 15px;
  background: #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #ccc;
  margin-top: 8px;
}

.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: width 0.5s ease;
  border-radius: 6px;
}

/* Mini-Game Button */
.game-btn {
  color: #FFD700;
  border-color: #FFD700;
}

.game-btn:hover {
  background: #FFD700;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

/* Accessory Button */
.accessory-btn {
  color: #9370DB;
  border-color: #9370DB;
}

.accessory-btn:hover {
  background: #9370DB;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(147, 112, 219, 0.4);
}

/* Achievements Section */
.achievements-section {
  background: #fff9e6;
  border: 2px solid #ffd700;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.achievements-section h4 {
  margin: 0 0 15px 0;
  font-size: 16px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.achievement-item {
  padding: 10px;
  border-radius: 6px;
  border: 2px solid #ddd;
  background: white;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.achievement-item.unlocked {
  border-color: #ffd700;
  background: linear-gradient(135deg, #fff9e6 0%, #fff 100%);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.achievement-item.locked {
  opacity: 0.5;
  filter: grayscale(100%);
}

.achievement-icon {
  font-size: 28px;
  min-width: 40px;
  text-align: center;
}

.achievement-info {
  flex: 1;
}

.achievement-name {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  margin-bottom: 3px;
}

.achievement-desc {
  font-size: 12px;
  color: #666;
}

/* Cleanliness Bar */
.bar-fill.cleanliness {
  background: #4CAF50;
}

/* Dark Mode - Pet Companion */
.dark-mode .pet-info,
.dark-mode .pet-log,
.dark-mode .pet-selection {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .status-bar label {
  color: #e2e8f0;
}

.dark-mode .bar-container {
  background: #334155;
  border-color: #475569;
}

.dark-mode .pet-stats p {
  color: #cbd5e1;
}

.dark-mode .pet-stats strong {
  color: #f1f5f9;
}

.dark-mode .action-btn {
  background: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}

.dark-mode .log-entry {
  background: #0f172a;
  border-left-color: #818cf8;
}

.dark-mode .pet-option-btn {
  background: #1e293b;
  border-color: #475569;
}

.dark-mode .pet-option-btn:hover {
  border-color: #818cf8;
}

.dark-mode .pet-option-btn span {
  color: #e2e8f0;
}

.dark-mode .pet-name-section input {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

.dark-mode #petCanvas {
  background: #1e293b;
  border-color: #475569;
}

/* Dark Mode - Level and XP */
.dark-mode .level-info {
  background: #1e293b;
  border-color: #818cf8;
}

.dark-mode .level-info p {
  color: #e2e8f0;
}

.dark-mode .xp-bar-container {
  background: #334155;
  border-color: #475569;
}

/* Dark Mode - Achievements */
.dark-mode .achievements-section {
  background: #1e293b;
  border-color: #fbbf24;
}

.dark-mode .achievements-section h4 {
  color: #f1f5f9;
}

.dark-mode .achievement-item {
  background: #0f172a;
  border-color: #475569;
}

.dark-mode .achievement-item.unlocked {
  border-color: #fbbf24;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.dark-mode .achievement-name {
  color: #f1f5f9;
}

.dark-mode .achievement-desc {
  color: #cbd5e1;
}

/* Text Diff Tool Styles */
.diff-input-section {
  margin-bottom: 25px;
}

.diff-textareas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.textarea-group {
  display: flex;
  flex-direction: column;
}

.textarea-group label {
  font-weight: 600;
  margin-bottom: 8px;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 6px;
}

.textarea-group textarea {
  width: 100%;
  min-height: 250px;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  resize: vertical;
  transition: border-color 0.3s ease;
}

.textarea-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.diff-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: nowrap;
  margin-top: 15px;
  padding: 15px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.diff-controls button {
  min-width: 140px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: 2px solid transparent;
}

.diff-controls button i {
  font-size: 16px;
}

.diff-controls .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #667eea;
  box-shadow: 0 4px 6px rgba(102, 126, 234, 0.3);
}

.diff-controls .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

.diff-controls .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.diff-controls .btn-secondary {
  background: white;
  color: #475569;
  border-color: #cbd5e1;
}

.diff-controls .btn-secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #1e293b;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.diff-controls .btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.diff-output {
  margin-top: 25px;
  padding-top: 25px;
  border-top: 2px solid #e2e8f0;
}

.diff-output h3 {
  color: #1f2937;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.diff-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.stat-item {
  background: #f9fafb;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-label {
  font-weight: 600;
  color: #6b7280;
}

.stat-value {
  font-size: 18px;
  font-weight: bold;
}

.stat-value.additions {
  color: #10b981;
}

.stat-value.deletions {
  color: #ef4444;
}

.stat-value.changes {
  color: #f59e0b;
}

.diff-view-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.diff-view-toggle .view-btn {
  padding: 10px 15px;
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  line-height: 1.4;
  width: 100%;
}

.diff-view-toggle .view-btn i {
  font-size: 14px;
  flex-shrink: 0;
}

.diff-view-toggle .view-btn:hover {
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-1px);
}

.diff-view-toggle .view-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.diff-view-toggle .view-btn.active:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.unified-diff-view {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  max-height: 500px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

.diff-line {
  display: flex;
  padding: 2px 8px;
  border-bottom: 1px solid #f3f4f6;
  line-height: 1.5;
}

.diff-line:last-child {
  border-bottom: none;
}

.diff-line.addition {
  background-color: #d1fae5;
}

.diff-line.deletion {
  background-color: #fee2e2;
}

.diff-line.unchanged {
  background-color: transparent;
}

.diff-line.empty {
  background-color: #f9fafb;
}

.line-prefix {
  width: 20px;
  font-weight: bold;
  flex-shrink: 0;
}

.diff-line.addition .line-prefix {
  color: #059669;
}

.diff-line.deletion .line-prefix {
  color: #dc2626;
}

.line-number {
  width: 50px;
  color: #9ca3af;
  text-align: right;
  padding-right: 10px;
  user-select: none;
  flex-shrink: 0;
}

.line-content {
  flex: 1;
  white-space: pre-wrap;
  word-break: break-word;
}

.side-by-side-diff-view {
  display: flex;
  gap: 10px;
  max-height: 500px;
  overflow-y: auto;
}

.diff-panel {
  flex: 1;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  max-height: 500px;
  overflow-y: auto;
}

.diff-panel.original {
  border-color: #fecaca;
}

.diff-panel.modified {
  border-color: #a7f3d0;
}

/* Tree View Styles */
.tree-diff-view {
  max-height: 500px;
  overflow-y: auto;
}

.tree-structure {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tree-block {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.tree-block.addition {
  border-color: #10b981;
}

.tree-block.deletion {
  border-color: #ef4444;
}

.tree-block.context {
  border-color: #d1d5db;
}

.tree-block-header {
  padding: 12px 16px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}

.tree-block.addition .tree-block-header {
  background: #d1fae5;
  color: #065f46;
}

.tree-block.deletion .tree-block-header {
  background: #fee2e2;
  color: #991b1b;
}

.tree-block.context .tree-block-header {
  background: #f3f4f6;
  color: #6b7280;
}

.tree-block-content {
  padding: 12px 16px;
  max-height: 200px;
  overflow-y: auto;
}

.tree-line {
  padding: 4px 8px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  border-left: 3px solid transparent;
  margin-bottom: 4px;
  white-space: pre-wrap;
  word-break: break-word;
}

.tree-block.addition .tree-line {
  border-left-color: #10b981;
  background: #f0fdf4;
}

.tree-block.deletion .tree-line {
  border-left-color: #ef4444;
  background: #fef2f2;
}

.tree-line.context-line {
  border-left-color: #9ca3af;
  background: #f9fafb;
  color: #6b7280;
}

.tree-line.more-indicator {
  font-style: italic;
  color: #9ca3af;
  text-align: center;
  border-left: none;
  background: transparent;
}

.no-differences {
  text-align: center;
  padding: 40px 20px;
  color: #10b981;
}

.no-differences i {
  font-size: 48px;
  margin-bottom: 15px;
}

.no-differences p {
  font-size: 18px;
  font-weight: 600;
}

/* Dark mode styles for Text Diff */
.dark-mode .textarea-group label {
  color: #e5e7eb;
}

.dark-mode .textarea-group textarea {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

.dark-mode .textarea-group textarea:focus {
  border-color: #667eea;
}

.dark-mode .diff-output {
  border-top-color: #334155;
}

.dark-mode .diff-output h3 {
  color: #f1f5f9;
}

.dark-mode .stat-item {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .stat-label {
  color: #94a3b8;
}

.dark-mode .diff-view-toggle .view-btn {
  background: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}

.dark-mode .diff-view-toggle .view-btn:hover {
  border-color: #667eea;
  color: #60a5fa;
  background: #0f172a;
}

.dark-mode .diff-view-toggle .view-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.dark-mode .diff-view-toggle .view-btn.active:hover {
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.dark-mode .diff-controls {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .diff-controls .btn-secondary {
  background: #0f172a;
  color: #e2e8f0;
  border-color: #475569;
}

.dark-mode .diff-controls .btn-secondary:hover {
  background: #1e293b;
  border-color: #667eea;
  color: #60a5fa;
}

.dark-mode .unified-diff-view {
  background: #0f172a;
  border-color: #334155;
}

.dark-mode .diff-line {
  border-bottom-color: #1e293b;
}

.dark-mode .diff-line.addition {
  background-color: #064e3b;
}

.dark-mode .diff-line.deletion {
  background-color: #7f1d1d;
}

.dark-mode .diff-line.empty {
  background-color: #1e293b;
}

.dark-mode .line-number {
  color: #64748b;
}

.dark-mode .diff-panel {
  background: #0f172a;
  border-color: #334155;
}

.dark-mode .diff-panel.original {
  border-color: #7f1d1d;
}

.dark-mode .diff-panel.modified {
  border-color: #064e3b;
}

.dark-mode .tree-block {
  background: #1e293b;
  border-color: #475569;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dark-mode .tree-block-header {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

.dark-mode .tree-block.addition .tree-block-header {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  color: #6ee7b7;
  border-bottom-color: #10b981;
}

.dark-mode .tree-block.deletion .tree-block-header {
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
  color: #fca5a5;
  border-bottom-color: #ef4444;
}

.dark-mode .tree-block.context .tree-block-header {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #cbd5e1;
  border-bottom-color: #64748b;
}

.dark-mode .tree-block-content {
  background: #0f172a;
}

.dark-mode .tree-line {
  color: #e2e8f0;
}

.dark-mode .tree-block.addition .tree-line {
  border-left-color: #10b981;
  background: rgba(6, 78, 59, 0.3);
  color: #6ee7b7;
}

.dark-mode .tree-block.deletion .tree-line {
  border-left-color: #ef4444;
  background: rgba(127, 29, 29, 0.3);
  color: #fca5a5;
}

.dark-mode .tree-line.context-line {
  background: rgba(30, 41, 59, 0.5);
  color: #94a3b8;
  border-left-color: #475569;
}

.dark-mode .tree-line.more-indicator {
  color: #64748b;
  background: transparent;
  font-style: italic;
}

.dark-mode .no-differences {
  color: #10b981;
}

/* Responsive styles for Text Diff */
@media (max-width: 768px) {
  .diff-textareas {
    grid-template-columns: 1fr;
  }
  
  .diff-controls {
    flex-wrap: nowrap;
    gap: 8px;
    padding: 12px;
    overflow-x: auto;
  }
  
  .diff-controls button {
    min-width: 120px;
    padding: 10px 15px;
    font-size: 13px;
    white-space: nowrap;
  }
  
  .diff-stats {
    flex-direction: column;
  }
  
  .side-by-side-diff-view {
    flex-direction: column;
  }
  
  .diff-panel {
    max-height: 300px;
  }
  
  .diff-view-toggle {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  
  .diff-view-toggle .view-btn {
    padding: 8px 10px;
    font-size: 11px;
  }
  
  .diff-view-toggle .view-btn i {
    font-size: 11px;
  }
}

/* Daily Expense Tracker Styles */
.expense-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.summary-card {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  padding: 20px;
  color: white;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.summary-icon {
  font-size: 36px;
  opacity: 0.9;
}

.summary-info {
  flex: 1;
}

.summary-label {
  font-size: 12px;
  opacity: 0.9;
  margin-bottom: 5px;
}

.summary-amount {
  font-size: 24px;
  font-weight: bold;
}

.add-expense-section {
  margin-bottom: 30px;
  padding: 25px;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.add-expense-section h3 {
  color: #374151;
  margin-bottom: 20px;
  font-size: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 8px;
  color: #374151;
  font-weight: 600;
  font-size: 14px;
}

.form-group input,
.form-group select {
  padding: 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #10b981;
}

/* Category Button Group */
.category-button-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.category-btn {
  padding: 12px 8px;
  border: 2px solid #e5e7eb;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
}

.category-btn i {
  font-size: 20px;
  margin-bottom: 2px;
}

.category-btn:hover {
  border-color: #10b981;
  background: #f0fdf4;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.category-btn.selected {
  border-color: #10b981;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.category-btn.selected i {
  color: white;
}

/* Number Pad */
.number-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.num-btn {
  padding: 15px;
  border: 2px solid #e5e7eb;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 600;
  color: #374151;
  transition: all 0.2s ease;
}

.num-btn:hover {
  border-color: #10b981;
  background: #f0fdf4;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.num-btn:active {
  transform: scale(0.95);
}

.num-btn-clear {
  background: #fee2e2;
  border-color: #fecaca;
  color: #ef4444;
}

.num-btn-clear:hover {
  background: #fecaca;
  border-color: #ef4444;
}

.chart-section {
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.chart-section h3 {
  color: #374151;
  margin-bottom: 20px;
  font-size: 18px;
}

.expenses-list-section {
  margin-bottom: 30px;
}

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

.list-header h3 {
  color: #374151;
  font-size: 18px;
}

.filter-controls select {
  padding: 8px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.expenses-list {
  max-height: 400px;
  overflow-y: auto;
}

.expense-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.expense-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.expense-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.expense-details {
  flex: 1;
}

.expense-category {
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
}

.expense-date {
  font-size: 12px;
  color: #6b7280;
}

.expense-note {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 4px;
  font-style: italic;
}

.expense-amount {
  font-size: 18px;
  font-weight: bold;
  color: #ef4444;
  margin-right: 10px;
}

.btn-delete {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
  width: auto !important;
  flex-shrink: 0;
}

.btn-delete:hover {
  background: #fee2e2;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}

.empty-state i {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.3;
}

.empty-state p {
  font-size: 16px;
}

.budget-settings-section {
  margin-bottom: 30px;
  padding: 25px;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.budget-settings-section h3 {
  color: #374151;
  margin-bottom: 20px;
  font-size: 18px;
}

.budget-form {
  display: flex;
  gap: 15px;
  align-items: flex-end;
}

.budget-form .form-group {
  flex: 1;
}

.export-section {
  display: flex;
  gap: 15px;
  justify-content: center;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

/* Templates Section */
.templates-section {
  margin-bottom: 30px;
  padding: 25px;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.templates-section h3 {
  color: #374151;
  margin-bottom: 15px;
  font-size: 18px;
}

.templates-list {
  display: grid;
  gap: 12px;
}

.template-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.template-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.template-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.template-details {
  flex: 1;
  min-width: 0;
}

.template-category {
  font-weight: 600;
  color: #374151;
  font-size: 15px;
  margin-bottom: 3px;
}

.template-note {
  font-size: 13px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-amount {
  font-weight: 700;
  color: #10b981;
  font-size: 16px;
  flex-shrink: 0;
}

.template-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-template-use {
  background: #10b981;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.btn-template-use:hover {
  background: #059669;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Dark Mode - Templates */
.dark-mode .templates-section {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .templates-section h3 {
  color: #e5e7eb;
}

.dark-mode .template-item {
  background: #0f172a;
  border-color: #334155;
}

.dark-mode .template-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dark-mode .template-category {
  color: #e5e7eb;
}

.dark-mode .template-note {
  color: #9ca3af;
}

/* Inline Templates Section */
.templates-section-inline {
  margin: 15px 0;
  padding: 15px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.templates-section-inline h4 {
  color: #374151;
  margin-bottom: 12px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.templates-list-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.template-btn-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  color: #374151;
}

.template-btn-inline i {
  font-size: 16px;
  color: #10b981;
}

.template-btn-inline:hover {
  border-color: #10b981;
  background: #f0fdf4;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.template-amount-inline {
  font-weight: 600;
  color: #10b981;
  margin-left: 5px;
}

.empty-state-inline {
  text-align: center;
  padding: 20px;
  color: #6b7280;
  font-size: 14px;
}

/* Dark Mode - Inline Templates */
.dark-mode .templates-section-inline {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .templates-section-inline h4 {
  color: #e5e7eb;
}

.dark-mode .template-btn-inline {
  background: #0f172a;
  border-color: #334155;
  color: #e5e7eb;
}

.dark-mode .template-btn-inline:hover {
  border-color: #10b981;
  background: #064e3b;
}

.dark-mode .empty-state-inline {
  color: #9ca3af;
}

/* Nutrition Guide */
.nutrition-search-section {
  margin-bottom: 20px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box i {
  position: absolute;
  left: 15px;
  color: #6b7280;
  font-size: 16px;
}

.search-box input {
  width: 100%;
  padding: 12px 15px 12px 45px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.nutrition-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 25px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  flex: 1;
  min-width: 70px;
  padding: 8px 16px;
  border: 2px solid #e5e7eb;
  background: white;
  border-radius: 25px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-align: center;
}

.filter-btn:hover {
  border-color: #10b981;
  color: #10b981;
  background: #f0fdf4;
}

.filter-btn.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

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

.nutrition-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.nutrition-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-color: #10b981;
}

.nutrition-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.nutrition-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.nutrition-info h3 {
  font-size: 18px;
  color: #374151;
  margin: 0 0 5px 0;
  font-weight: 600;
}

.nutrition-info p {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

.nutrition-foods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.food-tag {
  padding: 6px 12px;
  background: #f3f4f6;
  border-radius: 20px;
  font-size: 13px;
  color: #374151;
  transition: all 0.2s ease;
}

.food-tag:hover {
  background: #e5e7eb;
  transform: scale(1.05);
}

/* Dark Mode - Nutrition Guide */
.dark-mode .search-box input {
  background: #1e293b;
  border-color: #334155;
  color: #e5e7eb;
}

.dark-mode .search-box input:focus {
  border-color: #10b981;
}

.dark-mode .search-box i {
  color: #9ca3af;
}

.dark-mode .filter-btn {
  background: #1e293b;
  border-color: #334155;
  color: #9ca3af;
}

.dark-mode .filter-btn:hover {
  border-color: #10b981;
  color: #10b981;
  background: #064e3b;
}

.dark-mode .filter-btn.active {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border-color: #10b981;
}

.dark-mode .nutrition-card {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .nutrition-card:hover {
  border-color: #10b981;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.dark-mode .nutrition-info h3 {
  color: #e5e7eb;
}

.dark-mode .nutrition-info p {
  color: #9ca3af;
}

.dark-mode .food-tag {
  background: #0f172a;
  color: #e5e7eb;
}

.dark-mode .food-tag:hover {
  background: #1e293b;
}

/* Dark Mode - Expense Tracker */
.dark-mode .summary-card {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.dark-mode .add-expense-section,
.dark-mode .budget-settings-section {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .add-expense-section h3,
.dark-mode .chart-section h3,
.dark-mode .list-header h3,
.dark-mode .budget-settings-section h3 {
  color: #e5e7eb;
}

.dark-mode .form-group label {
  color: #e5e7eb;
}

.dark-mode .form-group input,
.dark-mode .form-group select {
  background: #1e293b;
  border-color: #334155;
  color: #e5e7eb;
}

.dark-mode .form-group input:focus,
.dark-mode .form-group select:focus {
  border-color: #10b981;
}

.dark-mode .category-btn {
  background: #1e293b;
  border-color: #334155;
  color: #9ca3af;
}

.dark-mode .category-btn:hover {
  border-color: #10b981;
  background: #064e3b;
}

.dark-mode .category-btn.selected {
  border-color: #10b981;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
}

.dark-mode .num-btn {
  background: #1e293b;
  border-color: #334155;
  color: #e5e7eb;
}

.dark-mode .num-btn:hover {
  border-color: #10b981;
  background: #064e3b;
}

.dark-mode .num-btn-clear {
  background: #7f1d1d;
  border-color: #991b1b;
  color: #fca5a5;
}

.dark-mode .num-btn-clear:hover {
  background: #991b1b;
  border-color: #ef4444;
}

.dark-mode .chart-section {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .expense-item {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .expense-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dark-mode .expense-category {
  color: #e5e7eb;
}

.dark-mode .expense-date {
  color: #9ca3af;
}

.dark-mode .btn-delete:hover {
  background: #7f1d1d;
}

.dark-mode .export-section {
  border-top-color: #334155;
}

/* Responsive Expense Tracker */
@media (max-width: 768px) {
  .expense-summary {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .list-header {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  
  .budget-form {
    flex-direction: column;
  }
  
  .budget-form .form-group {
    width: 100%;
  }
  
  .budget-form .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  
  .export-section {
    flex-direction: column;
  }
  
  .expense-item {
    flex-wrap: wrap;
  }
  
  .expense-amount {
    order: 3;
    width: 100%;
    text-align: right;
    margin-top: 10px;
  }
  
  .category-button-group {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .template-item {
    flex-wrap: wrap;
  }
  
  .template-amount {
    order: 3;
    width: 100%;
    text-align: right;
    margin-top: 10px;
  }
  
  .template-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 10px;
  }
  
  .templates-list-inline {
    flex-direction: column;
  }
  
  .template-btn-inline {
    width: 100%;
    justify-content: space-between;
  }
  
  .nutrition-filters {
    justify-content: flex-start;
    gap: 12px;
  }
  
  .filter-btn {
    padding: 10px 24px;
    font-size: 14px;
  }
  
  .nutrition-grid {
    grid-template-columns: 1fr;
  }
}

/* Tool Card Widget Styles */
.tool-card-widget {
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  padding: 15px;
}

.tool-card-widget .tool-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.tool-card-widget .tool-icon {
  font-size: 24px !important;
  margin-bottom: 0 !important;
  margin-right: 8px;
  text-align: left !important;
}

.tool-card-widget .tool-title {
  font-size: 16px;
  margin-bottom: 0;
  text-align: left !important;
}

.tool-card-widget .tool-description-hidden {
  display: none;
}

.tool-widget-display {
  margin-top: auto;
  padding: 15px 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.12) 100%);
  border-radius: 10px;
  text-align: center;
  min-height: 110px;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  gap: 6px;
  border: 2px solid rgba(16, 185, 129, 0.2);
}

.widget-label {
  font-size: 11px;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.tool-card-widget:hover .tool-widget-display {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(5, 150, 105, 0.18) 100%);
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}

.widget-loading {
  color: #10b981;
  font-size: 28px;
}

.widget-value {
  font-size: 18px;
  font-weight: bold;
  color: #1f2937;
  line-height: 1.1;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.widget-change {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}

.widget-change.positive {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.widget-change.negative {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.widget-change i {
  font-size: 12px;
}

.widget-weather-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 6px 0;
}

.widget-weather-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.widget-date {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
  font-weight: 500;
}

.widget-subinfo {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 3px;
  font-style: italic;
  font-weight: 500;
}

.widget-no-data {
  color: #9ca3af;
  font-size: 14px;
}

.widget-error {
  color: #ef4444;
  font-size: 20px;
}

/* Dark Mode - Tool Card Widget */
.dark-mode .tool-widget-display {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.18) 0%, rgba(4, 120, 87, 0.18) 100%);
  border-color: rgba(16, 185, 129, 0.3);
}

.dark-mode .widget-label {
  color: #9ca3af;
}

.dark-mode .widget-value {
  color: #f3f4f6;
}

.dark-mode .widget-change {
  background: rgba(31, 41, 55, 0.5);
}

.dark-mode .widget-change.positive {
  background: rgba(16, 185, 129, 0.15);
}

.dark-mode .widget-change.negative {
  background: rgba(239, 68, 68, 0.15);
}

.dark-mode .widget-date,
.dark-mode .widget-subinfo {
  color: #6b7280;
}

/* Responsive Tool Card Widget */
@media (max-width: 768px) {
  .tool-card-widget {
    min-height: 190px;
    padding: 12px;
  }
  
  .tool-card-widget .tool-header {
    margin-bottom: 10px;
  }
  
  .tool-card-widget .tool-icon {
    font-size: 20px !important;
    margin-right: 6px;
  }
  
  .tool-card-widget .tool-title {
    font-size: 15px;
  }
  
  .tool-widget-display {
    min-height: 100px;
    padding: 12px 10px;
  }
  
  .widget-value {
    font-size: 28px;
  }
  
  .widget-change {
    font-size: 13px;
    padding: 3px 8px;
  }
  
  .widget-label,
  .widget-date,
  .widget-subinfo {
    font-size: 10px;
  }
}
