/* 
 * Professional Light Theme
 * A clean, professional design with green color scheme
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Palette */
  --primary-color: #00ab55;          /* Primary brand color */
  --primary-dark: #007b3e;           /* Darker shade for hover states */
  --primary-light: #4fd08a;          /* Lighter shade for backgrounds */
  --primary-ultra-light: rgba(0, 171, 85, 0.08);

  /* Text Colors */
  --text-color: #202124;             /* Primary text color */
  --text-secondary: #5f6368;         /* Secondary text color */
  --text-tertiary: #80868b;          /* Tertiary text color */
  
  /* Background Colors */
  --background: #ffffff;             /* Main background */
  --card-bg: #ffffff;                /* Card background */
  --surface-secondary: #f8f9fa;      /* Secondary surface color */
  
  /* Border Elements */
  --border-color: #dadce0;           /* Border color */
  --border-radius: 8px;              /* Card and container radius */
  --small-radius: 6px;               /* Input and small element radius */
  --button-radius: 20px;             /* Button radius */
  
  /* Effects */
  --shadow-small: 0 1px 3px rgba(60, 64, 67, 0.08);
  --shadow: 0 2px 6px rgba(60, 64, 67, 0.12);
  --shadow-large: 0 4px 12px rgba(60, 64, 67, 0.16);
  --transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  
  /* Status Colors */
  --success: #0cce6b;               /* Success color */
  --error: #ea4335;                 /* Error color */
  --warning: #fbbc04;               /* Warning color */
  --info: #00ab55;                  /* Info color changed to green */
  
  /* Highlight */
  --highlight-bg: rgba(0, 171, 85, 0.08);
}

/* Base Elements */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #00ab55;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--background);
  color: var(--text-color);
  line-height: 1.5;
  padding-bottom: 96px;
  min-height: 100vh;
  font-weight: 400;
  font-size: 16px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
  color: var(--text-color);
}

h1 {
  font-size: 2rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
}

/* Container Elements */
.section {
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 96px);
  animation: fadeIn 0.3s ease-out;
}

.card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.card:hover {
  box-shadow: var(--shadow-large);
  transform: translateY(-2px);
}

/* Text Content */
#text {
  color: var(--text-secondary);
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  padding: 1rem;
}

/* Auth Components */
.auth-container {
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 480px;
  margin: 2rem auto;
}

.auth-tabs {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

.auth-tab {
  background: none;
  border: none;
  font-size: 0.95rem;
  padding: 0.5rem 1.25rem;
  margin: 0 0.5rem;
  color: var(--text-tertiary);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  font-weight: 500;
}

.auth-tab.active {
  color: var(--primary-color);
  font-weight: 600;
}

.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Config Management */
#config-management {
  margin-top: 1.5rem;
}

.config-forms {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .config-forms {
    grid-template-columns: 1fr 1fr;
  }
}

.config-form {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  font-size: 0.95rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

/* Form Elements */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  font-size: 0.9rem;
  font-weight: 500;
}

input, select, textarea, button {
  width: 100%;
  padding: 0.75rem;
  box-sizing: border-box;
  font-size: 0.95rem;
  border-radius: var(--small-radius);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

input, select, textarea {
  background-color: var(--background);
  color: var(--text-color);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0, 171, 85, 0.2);
  outline: none;
}

input::placeholder {
  color: var(--text-tertiary);
  font-weight: 400;
}

button {
  min-height: 38px;
  cursor: pointer;
  background-color: var(--primary-color);
  color: white;
  border: none;
  font-weight: 500;
  transition: var(--transition);
  border-radius: var(--button-radius);
}

button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Task Items */
.task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 0.95rem;
}

.task-item-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.task-item-actions button {
  width: auto;
  padding: 0.375rem 0.75rem;
  font-size: 0.85rem;
  border-radius: var(--button-radius);
}

#add-task-form {
  background: var(--primary-ultra-light);
  padding: 1.25rem;
  border-radius: var(--border-radius);
  margin-top: 1.25rem;
  border: 1px solid rgba(0, 171, 85, 0.15);
}

/* Tasks Container */
#tasks-container {
  display: grid;
  gap: 1.25rem;
  width: 100%;
}

.task-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  border-radius: var(--border-radius);
  background-color: var(--card-bg);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border-left: 3px solid var(--primary-color);
  width: 100%;
  position: relative;
  overflow: hidden;
}

.task-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-large);
}

.task-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-right: 1.25rem;
}

.task-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-color);
  line-height: 1.4;
}

.task-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 400;
}

.task-reward {
  font-weight: 600;
  font-size: 1rem;
  color: var(--primary-color);
  background-color: var(--primary-ultra-light);
  padding: 0.375rem 0.75rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
  align-self: flex-start;
}

.task-reward i {
  font-size: 0.9rem;
}

.task-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.task-progress {
  height: 4px;
  background-color: var(--border-color);
  border-radius: 2px;
  width: 100%;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.task-button {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: var(--button-radius);
  background-color: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-weight: 500;
  min-width: max-content;
}

.task-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.task-button.completed {
  background-color: var(--success);
  cursor: default;
}

.task-button.in-progress {
  background-color: var(--warning);
  color: white;
  font-weight: 500;
}

.task-actions {
  display: flex;
  flex-shrink: 0;
  gap: 1rem;
  align-items: center;
}

/* Navigation */
.bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 420px;
  height: 64px;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
  border-radius: 28px;
  z-index: 100;
  box-shadow: var(--shadow-large);
  border: 1px solid var(--border-color);
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  padding: 0.375rem 0.625rem;
  transition: var(--transition);
  font-weight: 500;
  box-shadow: none;
  min-height: auto;
}

.nav-btn i {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.nav-btn.active {
  color: var(--primary-color);
  transform: translateY(-3px);
}

/* User Info */
.user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem;
}

.balance {
  font-size: 1.4rem;
  margin-top: 0.5rem;
  color: var(--primary-color);
  font-weight: 600;
}

/* Description Cards */
.description-card {
  border-left: 3px solid var(--primary-color);
  border-radius: 6px 8px 8px 6px;
  background-color: var(--primary-ultra-light);
  padding: 1.25rem;
  margin: 1rem 0;
}

.description-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.description-header i {
  color: var(--primary-color);
  font-size: 1.25rem;
  margin-right: 0.625rem;
}

/* Version Info */
.version-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.version-tag {
  background-color: var(--primary-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.update-date {
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Feature Lists */
.feature-list {
  margin-top: 1.25rem;
}

.feature-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.feature-item i {
  color: var(--primary-color);
  margin-right: 0.625rem;
  width: 1.25rem;
  text-align: center;
  font-size: 1rem;
}

/* Referral */
.referral-info {
  text-align: center;
  padding: 1rem 0;
}

#referral-code {
  font-weight: 600;
  color: var(--primary-color);
  padding: 0.5rem;
  background-color: var(--primary-ultra-light);
  border-radius: 6px;
  margin: 0 0.375rem;
  letter-spacing: 0.5px;
}

/* Forms */
#withdrawal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Admin Stats */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  text-align: center;
  padding: 1.25rem;
  border-radius: var(--border-radius);
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.stat-card p {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.375rem;
}

/* Leaderboard */
.leaderboard-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.leaderboard-tab {
  background: none;
  border: none;
  font-size: 0.95rem;
  padding: 0.375rem 1rem;
  margin: 0 0.375rem;
  color: var(--text-tertiary);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  font-weight: 500;
}

.leaderboard-tab.active {
  color: var(--primary-color);
  font-weight: 600;
}

.leaderboard-tab.active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* Alerts */
#custom-alert {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(32, 33, 36, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.alert-content {
  width: 85%;
  max-width: 360px;
  text-align: center;
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-large);
}

.alert-content h3 {
  color: var(--text-color);
  margin-bottom: 1rem;
}

.alert-content p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.alert-content button {
  background-color: var(--primary-color);
  color: white;
  border-radius: var(--button-radius);
  padding: 0.75rem;
  font-weight: 500;
  font-size: 1rem;
  width: 100%;
  margin-top: 0.5rem;
}

/* Footer */
.footer {
  background-color: var(--surface-secondary);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  font-weight: 400;
}

.footer-bottom {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.standard-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
}

.standard-link:hover {
  text-decoration: underline;
}

/* UI Components */
.hidden {
  display: none !important;
}

.pill-button {
  border-radius: var(--button-radius);
  font-size: 0.95rem;
  padding: 0.625rem 1.25rem;
  font-weight: 500;
}

.action-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--card-bg);
  border-radius: 20px 20px 0 0;
  padding: 1.75rem 1.5rem;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.action-sheet.active {
  transform: translateY(0);
}

.action-sheet-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(32, 33, 36, 0.4);
  z-index: 199;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.action-sheet-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color);
  transition: .3s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.2);
}

input:checked + .toggle-slider {
  background-color: var(--primary-color);
}

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

/* Segmented Control */
.segmented-control {
  display: flex;
  background-color: var(--surface-secondary);
  border-radius: 8px;
  overflow: hidden;
  padding: 2px;
  border: 1px solid var(--border-color);
}

.segment {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: var(--transition);
  font-weight: 500;
  color: var(--text-tertiary);
}

.segment.active {
  background-color: var(--primary-color);
  color: white;
  font-weight: 500;
}

/* Icon Styles */
.ios-icon {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.5rem;
}

/* Cards */
.ios-card {
  border-radius: 12px;
  background: var(--card-bg);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

/* Floating Action Button */
.float-button {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 28px;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-large);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 50;
}

.float-button:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Badge */
.badge {
  background-color: var(--primary-color);
  color: white;
  font-size: 0.7rem;
  font-weight: 500;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* Notifications */
.ios-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background-color: rgba(255, 255, 255, 0.98);
  color: var(--text-color);
  padding: 12px 18px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 500;
  box-shadow: var(--shadow-large);
  z-index: 1000;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border-color);
  width: 85%;
  max-width: 350px;
  text-align: center;
}

.ios-notification.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Effects */
.glow-effect {
  box-shadow: 0 0 15px rgba(0, 171, 85, 0.25);
}

/* Patterns */
.pattern-overlay {
  position: relative;
}

.pattern-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23000000' fill-opacity='0.03' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='1'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface-secondary);
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  .section {
    padding: 1.25rem;
  }
  
  .task-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
  }
  
  .task-info {
    max-width: 100%;
    margin-right: 0;
  }
  
  .task-actions {
    width: 100%;
    justify-content: space-between;
    margin-top: 0.5rem;
  }
  
  .task-reward {
    align-self: flex-start;
  }
  
  .admin-stats {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.4rem;
  }
  
  .section {
    padding: 1rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  .task-title {
    font-size: 1rem;
  }
  
  .task-description {
    font-size: 0.9rem;
  }
  
  .task-reward {
    font-size: 0.9rem;
    padding: 0.375rem 0.625rem;
  }
  
  .task-button {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
  }
  
  .bottom-nav {
    height: 64px;
    width: 94%;
  }
  
  .nav-btn span {
    font-size: 0.7rem;
  }
}
