/* Settings CSS - Android Mobile First */ 
:root {
  /* Dynamic viewport height variables */
  --vh: 1vh;
  --dynamic-height: calc(var(--vh, 1vh) * 100);
}

/* Prevent mobile elastic scrolling on settings pages */
html, body {
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto; /* Disable elastic scrolling */
  touch-action: pan-y; /* Allow vertical scrolling, prevent horizontal stretching */
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Make all settings screens scrollable */

.s1-company-hub-container {
  --accent-color: gold;
  --text-glow: 1px 1px 3px rgba(0, 0, 0, 0.6);
  --bg-dark: #2a0a1f;
  --bg-darker: #12000f;
  --ribbon-gradient: linear-gradient(to right, #FFD700, #FF8C00);
  --btn-glow: rgba(255, 215, 0, 0.7);
  --android-width: 360px;
  --android-height: 640px;
  --success-color: #4CAF50;
  --warning-color: #FF9800;
  --danger-color: #f44336;
  --info-color: #2196F3;
  --purple-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --green-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --orange-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --blue-gradient: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  position: relative;
  flex: 1;
  overflow-y: auto;
  /* Control scrolling behavior */
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto; /* Disable elastic scrolling */
  touch-action: pan-y; /* Allow vertical scrolling, prevent stretching */
  height: 100vh;
}
.s1-company-hub-container {
  max-width: 100%;
  margin: 0 auto;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/wpref.jpg') no-repeat center center / cover;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}
.s1-hub-header {
  text-align: center;
  padding: 20px 16px;
  position: relative;
  z-index: 2;
  border-bottom: 2px solid var(--accent-color);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}
.s1-hub-header h1 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 8px;
  text-shadow: var(--text-glow);
  background: linear-gradient(to right, gold, orange);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.s1-hub-header p {
  color: #fff;
  font-size: 1rem;
  opacity: 0.9;
  text-shadow: var(--text-glow);
}
.s1-hub-content {
  padding: 16px;
  position: relative;
  z-index: 2;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;
  touch-action: pan-y;
}
.s1-nav-section {
  text-align: center;
  margin-bottom: 24px;
}
.s1-back-to-main {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  border: none;
  color: white;
  font-weight: bold;
  padding: 16px 32px;
  border-radius: 25px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(67, 233, 123, 0.3);
  width: 100%;
  max-width: 280px;
}
.s1-back-to-main:hover {
  background: linear-gradient(135deg, #38f9d7 0%, #43e97b 100%);
  box-shadow: 0 8px 24px rgba(67, 233, 123, 0.4);
  transform: translateY(-2px);
}
.s1-section-group {
  margin-bottom: 32px;
}
.s1-section-title {
  color: #fff;
  text-align: center;
  margin-bottom: 16px;
  font-size: 1.4rem;
  text-shadow: var(--text-glow);
  background: linear-gradient(to right, gold, orange);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}
.s1-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.s1-nav-card {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--accent-color);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.s1-nav-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}
.s1-nav-card:hover::before {
  left: 100%;
}
.s1-nav-card:hover {
  transform: translateY(-4px);
  border-color: #FF8C00;
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.3);
  background: rgba(255, 255, 255, 0.2);
}
.s1-nav-card:active {
  transform: translateY(-2px) scale(0.98);
}
.s1-nav-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}
.s1-nav-card:hover .s1-nav-icon {
  transform: scale(1.1);
}
.s1-nav-card h3 {
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 4px;
  text-shadow: var(--text-glow);
  line-height: 1.2;
}
.s1-nav-card p {
  color: #ccc;
  font-size: 0.75rem;
  line-height: 1.3;
  margin: 0;
  opacity: 0.9;
}
/* New Gamified Components */
.s1-progress-section {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 215, 0, 0.3);
}
.s1-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.s1-progress-title {
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  text-shadow: var(--text-glow);
}
.s1-progress-value {
  color: var(--accent-color);
  font-weight: bold;
  font-size: 0.9rem;
}
.s1-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.s1-progress-fill {
  height: 100%;
  background: var(--green-gradient);
  border-radius: 4px;
  transition: width 0.8s ease;
  position: relative;
}
.s1-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: s1-shimmer 2s infinite;
}
@keyframes s1-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}
.s1-achievement-badge {
  display: inline-flex;
  align-items: center;
  background: var(--purple-gradient);
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  margin: 4px;
  animation: s1-badgePop 0.6s ease-out;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
@keyframes s1-badgePop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.s1-achievement-badge.locked {
  background: rgba(255, 255, 255, 0.2);
  color: #ccc;
  box-shadow: none;
}
.s1-achievement-badge .badge-icon {
  margin-right: 6px;
  font-size: 1rem;
}
.s1-settings-card {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.s1-settings-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.2);
}
.s1-settings-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--ribbon-gradient);
}
.s1-setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.s1-setting-item:last-child {
  border-bottom: none;
}
.s1-setting-label {
  color: #fff;
  font-weight: 500;
  font-size: 0.9rem;
  text-shadow: var(--text-glow);
}
.s1-setting-control {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 4px 0;
}
.s1-setting-control > input,
.s1-setting-control > select,
.s1-setting-control > textarea {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
.s1-setting-control > div[id$="-error"] {
  grid-row: 2;
  grid-column: 1;
  margin-top: 2px;
  color: orange;
  font-size: 0.9em;
  display: block;
}
.s1-setting-control.with-icon {
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 4px 8px;
}
.s1-setting-control.with-icon > .s1-icon {
  grid-row: 1;
  grid-column: 1;
  align-self: center;
}
.s1-setting-control.with-icon > input {
  grid-row: 1;
  grid-column: 2;
}
.s1-setting-control.with-icon > div[id$="-error"] {
  grid-row: 2;
  grid-column: 1 / span 2;
}
.s1-toggle-switch {
  position: relative;
  width: 50px;
  height: 24px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.s1-toggle-switch.active {
  background: var(--success-color);
}
.s1-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.s1-toggle-switch.active::after {
  transform: translateX(26px);
}
.s1-slider-container {
  width: 120px;
  position: relative;
}
.s1-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.3);
  outline: none;
  cursor: pointer;
}
.s1-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
  transition: all 0.3s ease;
}
.s1-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.6);
}
.s1-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
}
.s1-slider-value {
  color: var(--accent-color);
  font-weight: bold;
  font-size: 0.8rem;
  min-width: 30px;
  text-align: center;
}
.s1-select-styled {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  color: #fff;
  padding: 8px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}
.s1-select-styled:hover {
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.3);
}
.s1-select-styled:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
}
.s1-btn-gamified {
  background: var(--green-gradient);
  border: none;
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(67, 233, 123, 0.3);
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}
.s1-btn-gamified::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}
.s1-btn-gamified:hover::before {
  left: 100%;
}
.s1-btn-gamified:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(67, 233, 123, 0.4);
}
.s1-btn-gamified.danger {
  background: var(--danger-color);
  box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}
.s1-btn-gamified.danger:hover {
  box-shadow: 0 8px 20px rgba(244, 67, 54, 0.4);
}
.s1-btn-gamified.warning {
  background: var(--warning-color);
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}
.s1-btn-gamified.warning:hover {
  box-shadow: 0 8px 20px rgba(255, 152, 0, 0.4);
}
.s1-input-gamified {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  color: #fff;
  padding: 10px 12px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  width: 100%;
}
.s1-input-gamified:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
}
.s1-input-gamified::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Validation error styles */
.s1-input-gamified.validation-error {
  border-color: var(--danger-color);
  box-shadow: 0 0 8px rgba(244, 67, 54, 0.4);
  background: rgba(244, 67, 54, 0.1);
  animation: s1-validation-shake 0.5s ease-in-out;
}

@keyframes s1-validation-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.s1-input-gamified.validation-error:focus {
  border-color: var(--danger-color);
  box-shadow: 0 0 12px rgba(244, 67, 54, 0.6);
}

.s1-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.s1-stat-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 215, 0, 0.2);
  transition: all 0.3s ease;
}
.s1-stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-color);
}
.s1-stat-value {
  color: var(--accent-color);
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 4px;
}
.s1-stat-label {
  color: #fff;
  font-size: 0.8rem;
  opacity: 0.9;
}


.s1-achievement-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.s1-achievement-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}
.s1-achievement-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}
.s1-achievement-item.unlocked {
  border-color: var(--accent-color);
  background: rgba(255, 215, 0, 0.1);
}
.s1-achievement-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.s1-achievement-name {
  color: #fff;
  font-size: 0.7rem;
  font-weight: bold;
}
.s1-achievement-desc {
  color: #ccc;
  font-size: 0.6rem;
  margin-top: 2px;
}
.s1-notification-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--success-color);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  max-width: 280px;
}
.s1-notification-toast.show {
  transform: translateX(0);
}
.s1-notification-toast.success {
  background: var(--success-color);
}
.s1-notification-toast.warning {
  background: var(--warning-color);
}
.s1-notification-toast.error {
  background: var(--danger-color);
}
.s1-notification-toast.info {
  background: var(--info-color);
}
.s1-pulse-animation {
  animation: s1-pulse 2s infinite;
}
@keyframes s1-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}
.s1-bounce-animation {
  animation: s1-bounce 0.6s ease-out;
}
@keyframes s1-bounce {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
/* Overlay scrolling styles */
.s1-overlay {
  overflow-y: hidden;
  height: var(--dynamic-height, 100vh);
  display: flex;
  align-items: center;
  justify-content: center;
}
.s1-overlay-content {
  max-height: calc(var(--dynamic-height, 100vh) * 0.9);
  overflow-y: hidden;
  width: 90%;
  max-width: 95vw;
}

@media (min-width: 480px) {
  .s1-nav-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .s1-nav-card {
    min-height: 140px;
  }
  .s1-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .s1-achievement-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.s1-legal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  line-height: 1.6;
}
.s1-legal-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}
.s1-legal-section {
  margin-bottom: 25px;
}
.s1-legal-section h2 {
  color: #2c3e50;
  margin-bottom: 15px;
}
.s1-legal-section h3 {
  color: #34495e;
  margin-bottom: 10px;
}
.s1-legal-section p {
  margin-bottom: 10px;
}
.s1-legal-section ul {
  margin-left: 20px;
  margin-bottom: 10px;
}
.s1-legal-section li {
  margin-bottom: 5px;
}
.s1-back-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
}
.s1-overlay-main{
  --accent-color: gold;
  --text-glow: 1px 1px 3px rgba(0, 0, 0, 0.6);
  --bg-dark: #2a0a1f;
  --bg-darker: #12000f;
  --ribbon-gradient: linear-gradient(to right, #FFD700, #FF8C00);
  --btn-glow: rgba(255, 215, 0, 0.7);
  --android-width: 360px;
  --android-height: 640px;
  --success-color: #4CAF50;
  --warning-color: #FF9800;
  --danger-color: #f44336;
  --info-color: #2196F3;
  --purple-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --green-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --orange-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --blue-gradient: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}
