/* BetReplicator Main Styles */

/* CSS Variables for consistent theming */
:root {
  --primary-color: #007bff;
  --primary-hover: #0056b3;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  
  --text-color: #2c3e50;
  --text-muted: #6c757d;
  --border-color: #e1e5e9;
  --background-color: #ffffff;
  --background-light: #f8f9fa;
  
  --border-radius: 8px;
  --border-radius-sm: 4px;
  --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --box-shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.15);
  
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-base: 16px;
  --font-size-sm: 14px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;
  
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;
}

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

html {
  font-size: var(--font-size-base);
  line-height: 1.6;
  width: 100%;
}

body {
  font-family: var(--font-family);
  color: var(--text-color);
  background-color: var(--background-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Container */
.main_container {
  width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.container, section {
  padding: 0;
  flex: 1;
}

/* Header */
.header {
  background-color: var(--background-color);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
}

.logo {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--primary-color);
}

.logo-link {
  text-decoration: none;
  color: inherit;
}

.logo-link:hover {
  color: var(--primary-hover);
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.nav-link {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius-sm);
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--primary-color);
  background-color: var(--background-light);
}

/* Main content */
.main, .panel {
  flex: 1;
  display: flex;
  padding: 0;
  width: 100%;
}

/* Authentication Section */
.auth-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-card {
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow-lg);
  padding: var(--spacing-xxl);
  width: 100%;
  text-align: center;
}

.auth-card h2 {
  margin-bottom: var(--spacing-md);
  color: var(--text-color);
}

.auth-card p {
  color: var(--text-muted);
  margin-bottom: var(--spacing-xl);
}

.auth-options {
  display: flex;
  gap: var(--spacing-xl);
  margin-top: 0;
}

.auth-option {
  padding: var(--spacing-lg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--background-light);
  flex: 1;
  flex-direction: column;
  display: none;
  max-width: 300px;
  margin: 0 auto;
}

.auth-option.auth-holding-message {
  display: flex
}

.auth-option h3 {
  margin-bottom: var(--spacing-md);
  color: var(--text-color);
}

.auth-option p {
  margin-bottom: var(--spacing-lg);
  font-size: var(--font-size-sm);
}

/* Forms */
.auth-form {
  text-align: left;
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  color: var(--text-color);
}

.form-group input {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-base);
  transition: border-color 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-base);
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.5;
}

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

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

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

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background-color: #c82333;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-outline:hover:not(:disabled) {
  background-color: var(--primary-color);
  color: white;
}

/* Dashboard */
.dashboard-section {
  display: none;
}

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

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xl);
}

.dashboard-header h2 {
  color: var(--text-color);
}

.user-info {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
}

/* Cards */
.card {
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: var(--spacing-lg);
  border: 1px solid var(--border-color);
}

.card-title {
  margin-bottom: var(--spacing-md);
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-color);
}

/* Status indicators */
.status-indicator,
.balance-display,
.connection-status {
  padding: var(--spacing-md);
  border-radius: var(--border-radius-sm);
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.status-success,
.connection-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-error,
.connection-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.connection-disconnected {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.balance-success {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.balance-amount {
  font-size: var(--font-size-xl);
  font-weight: bold;
}

.balance-currency {
  font-size: var(--font-size-base);
  opacity: 0.8;
}

.balance-timestamp {
  font-size: var(--font-size-sm);
  opacity: 0.7;
}

/* Actions */
.connection-actions,
.balance-actions {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

/* Activity list */
.activity-list {
  max-height: 200px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-amount {
  font-weight: 600;
  color: var(--text-color);
}

.activity-time {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* Loading states */
.loading {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--text-muted);
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-spinner.large {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  font-size: var(--font-size-sm);
}

/* Notifications */
.notifications {
  position: fixed;
  top: var(--spacing-md);
  right: var(--spacing-md);
  z-index: 1000;
  max-width: 400px;
}

.notification {
  background-color: var(--background-color);
  border-radius: var(--border-radius-sm);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  box-shadow: var(--box-shadow-lg);
  border-left: 4px solid;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideIn 0.3s ease;
}

.notification-success {
  border-left-color: var(--success-color);
}

.notification-error {
  border-left-color: var(--danger-color);
}

.notification-info {
  border-left-color: var(--info-color);
}

.notification-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  margin-left: var(--spacing-md);
  color: var(--text-muted);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.loading-content {
  background-color: var(--background-color);
  padding: var(--spacing-xl);
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--box-shadow-lg);
}

.loading-content .loading-spinner {
  margin: 0 auto var(--spacing-md);
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .header-content {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .auth-options {
    grid-template-columns: 1fr;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }
  
  .notifications {
    left: var(--spacing-sm);
    right: var(--spacing-sm);
    max-width: none;
  }
  
  .auth-card {
    padding: var(--spacing-lg);
  }
}

@media (max-width: 480px) {
  :root {
    --font-size-base: 14px;
  }
  
  .btn {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-sm);
  }
  
  .card {
    padding: var(--spacing-md);
  }
}
