/* Compact Dobble Settings Panel Styles */

:root {
  --dobbleX: -800px;
  --dobbleY: -500px;
}

/* Logo container maintains space when logo is positioned absolutely */
.dobble-logo-container {
  width: 120px;
  height: 120px;
  margin: 0 auto 3rem auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ensure logo is centered when not in animation on settings page */
#dobble-page #dobbleLogo:not(.dobble):not(.roller):not(.spin):not(.bounce):not(.shake):not(.pulse):not(.buzz) {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
}

/* Allow animations to work - don't override transform when animating */
#dobble-page #dobbleLogo.bounce,
#dobble-page #dobbleLogo.shake,
#dobble-page #dobbleLogo.pulse,
#dobble-page #dobbleLogo.buzz {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  /* Don't override transform - let animation handle it */
}

/* Roller animation needs position: fixed - don't override it */
#dobble-page #dobbleLogo.roller {
  /* Don't override position, left, top, width, height for roller */
  /* Let the JavaScript animation handle positioning */
  position: fixed;
}

.compact-settings-panel {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Hide theme button only when dobble-page is active (all screen sizes) */
body.dobble-page-active .header .theme-toggle,
body.dobble-page-active .header .theme-btn,
body:has(#dobble-page.active) .header .theme-toggle,
body:has(#dobble-page.active) .header .theme-btn {
  visibility: hidden !important;
  display: none !important;
}

.panel-title {
  text-align: center;
  color: #fff;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 30px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Settings Navigation Bar */
.settings-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-nav-btn {
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.setting-nav-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(74, 172, 254, 0.3), rgba(123, 97, 255, 0.3));
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.setting-nav-btn i {
  position: relative;
  z-index: 1;
}

.setting-nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.setting-nav-btn:hover::before {
  opacity: 1;
}

.setting-nav-btn.active {
  background: linear-gradient(135deg, #4facfe, #7b61ff);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(74, 172, 254, 0.4);
}

.setting-nav-btn.active::before {
  opacity: 0;
}

.setting-nav-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 172, 254, 0.5);
}

/* Settings Content Container */
.settings-content {
  position: relative;
  min-height: 300px;
}

.setting-section {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.3s ease forwards;
}

.setting-section.active {
  display: block;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.section-title {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 500;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.section-title i {
  color: #4facfe;
  font-size: 1.2rem;
}

/* Color Options */
.color-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  gap: 15px;
  max-width: 400px;
}

.color-option {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.color-option::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.color-option:hover {
  transform: scale(1.15);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.custom-color-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4facfe, #7b61ff);
  border: 3px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.custom-color-btn:hover {
  transform: scale(1.15);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 5px 15px rgba(74, 172, 254, 0.4);
}

/* Sound and Animation Options */
.sound-options,
.animation-options,
.bg-animation-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
}

.sound-option,
.animation-option,
.bg-animation-option {
  padding: 20px 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(5px);
}

.sound-option i,
.animation-option i,
.bg-animation-option i {
  font-size: 1.8rem;
  color: #4facfe;
  transition: all 0.3s ease;
}

.bg-animation-option .snail-icon {
  font-size: 1.8rem;
  color: #4facfe;
  transition: all 0.3s ease;
  display: block;
  line-height: 1;
}

.option-label {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.sound-option:hover,
.animation-option:hover,
.bg-animation-option:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(74, 172, 254, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.sound-option:hover i,
.animation-option:hover i,
.bg-animation-option:hover i {
  color: #fff;
  transform: scale(1.1);
}

.bg-animation-option:hover .snail-icon {
  color: #fff;
  transform: scale(1.1);
}

.sound-option.selected,
.animation-option.selected,
.bg-animation-option.selected {
  background: linear-gradient(135deg, rgba(74, 172, 254, 0.3), rgba(123, 97, 255, 0.3));
  border-color: #4facfe;
  box-shadow: 0 5px 15px rgba(74, 172, 254, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
  .compact-settings-panel {
    max-width: 600px;
    margin: 10px;
    padding: 20px;
  }
  
  .settings-nav {
    gap: 15px;
    padding: 15px;
  }
  
  .setting-nav-btn {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
  
  .color-options {
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 10px;
  }
  
  .color-option,
  .custom-color-btn {
    width: 40px;
    height: 40px;
  }
  
  .sound-options,
  .animation-options,
  .bg-animation-options {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
  }
  
  .sound-option,
  .animation-option,
  .bg-animation-option {
    padding: 15px 10px;
  }
  
  .panel-title {
    font-size: 1.6rem;
    margin-bottom: 20px;
  }
  #dobbleLogo{
    min-width: 130px !important;
    min-height: 130px !important;;
  }
}

@media (max-width: 480px) {
  .settings-nav {
    gap: 10px;
    flex-wrap: wrap;
  }
  
  .setting-nav-btn {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }
}

/* Screens smaller than 440px - make nav buttons smaller to fit on one line */
@media (max-width: 440px) {
  .settings-nav {
    gap: 8px;
    padding: 15px 10px;
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  
  .setting-nav-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
    flex-shrink: 0;
  }
  
  .sound-options,
  .animation-options,
  .bg-animation-options {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Screens smaller than 400px - make panel wider */
@media (max-width: 400px) {
  #dobble-page .main-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .compact-settings-panel {
    width: 90vw;
    max-width: 90vw;
    padding: 20px 15px;
    box-sizing: border-box;
  }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
  .setting-nav-btn,
  .color-option,
  .custom-color-btn,
  .sound-option,
  .animation-option,
  .bg-animation-option,
  .setting-section {
    transition: none;
  }
  
  .setting-section {
    animation: none;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .compact-settings-panel {
    border: 2px solid #fff;
    background: rgba(0, 0, 0, 0.8);
  }
  
  .setting-nav-btn {
    border: 2px solid #fff;
  }
  
  .setting-nav-btn.active {
    background: #fff;
    color: #000;
  }
}

/* Focus indicators for better accessibility */
.color-option:focus,
.custom-color-btn:focus,
.sound-option:focus,
.animation-option:focus,
.bg-animation-option:focus {
  outline: 2px solid #4facfe;
  outline-offset: 2px;
}
