/* ════════════════════════════════════════════════════════════════
   SHARED COMPONENTS - Common Stylesheet
   Used by Towers AI, Mines Analytics and other tools
   ════════════════════════════════════════════════════════════════ */

/* ── Login Card Component (Reusable) ────────────────────────────────── */
.login-card {
  background: var(--card);
  border-radius: 20px;
  padding: 32px;
  max-width: 400px;
  margin: 60px auto;
  text-align: center;
  animation: slideInUp 0.6s ease;
}

.login-card h2 {
  margin-bottom: 8px;
  background: linear-gradient(135deg, #6cf2c2, #5aa2ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-card p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
}

.login-input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  margin-bottom: 14px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.login-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(108, 242, 194, 0.3);
}

.login-error {
  color: #fb7185;
  font-size: 12px;
  margin-bottom: 14px;
  display: none;
  animation: slideInUp 0.3s ease;
}

.login-error.show {
  display: block;
}

.login-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--bg);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 12px;
}

.login-btn:hover:not(:disabled) {
  box-shadow: 0 0 24px rgba(108, 242, 194, 0.4);
  transform: translateY(-2px);
}

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

.login-help {
  font-size: 12px;
  color: var(--muted);
}

.login-help a {
  color: var(--accent);
  text-decoration: none;
}

/* ── VIP Badge Component (Reusable) ────────────────────────────────── */
.vip-badge {
  display: none;
  background: linear-gradient(135deg, #facc15, #fb7185);
  color: white;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 12px;
  text-align: center;
  margin-bottom: 20px;
  animation: slideInUp 0.5s ease 0.1s backwards;
}

.vip-badge.show {
  display: block;
}

/* ── Load Button Component (Reusable) ────────────────────────────────── */
.load-btn {
  padding: 12px 8px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.load-btn:hover {
  border-color: var(--accent2);
  background: rgba(90, 162, 255, 0.1);
  transform: translateY(-2px);
}

.load-btn.active {
  border-color: var(--accent);
  background: rgba(108, 242, 194, 0.15);
  color: var(--accent);
  box-shadow: 0 0 16px rgba(108, 242, 194, 0.3);
}

.load-btn.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.load-btn.locked:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  transform: none;
}

/* ── Control Button Component (Reusable) ────────────────────────────────── */
.control-btn {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--bg);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.control-btn:hover:not(:disabled) {
  box-shadow: 0 0 24px rgba(108, 242, 194, 0.4);
  transform: translateY(-2px);
}

.control-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

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

.control-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 2px solid rgba(255, 255, 255, 0.15);
}

/* ── AI Status Component (Reusable) ────────────────────────────────── */
.ai-status {
  background: rgba(108, 242, 194, 0.05);
  border: 2px solid rgba(108, 242, 194, 0.2);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin-bottom: 24px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: slideInUp 0.5s ease 0.4s backwards;
}

.ai-status.analyzing {
  border-color: var(--accent);
  background: rgba(108, 242, 194, 0.1);
  animation: pulse 1.5s infinite;
}

.ai-status-text {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}

.ai-status-icon {
  display: inline-block;
  margin-right: 8px;
  font-size: 18px;
}

/* ── Demo Counter Component (Reusable) ────────────────────────────────── */
.demo-counter {
  background: linear-gradient(135deg, rgba(108, 242, 194, 0.1), rgba(90, 162, 255, 0.1));
  border: 2px solid rgba(108, 242, 194, 0.3);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 24px;
  text-align: center;
  animation: slideInUp 0.5s ease 0.1s backwards;
}

.demo-counter.vip-mode {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.1), rgba(251, 113, 133, 0.1));
  border-color: rgba(250, 204, 21, 0.3);
}

.demo-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.demo-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  font-family: 'Courier New', monospace;
}

.demo-counter.vip-mode .demo-value {
  color: #facc15;
}

.demo-bar {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}

.demo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(108, 242, 194, 0.3);
  transition: all 0.3s ease;
}

.demo-dot.active {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.demo-dot.used {
  background: rgba(108, 242, 194, 0.1);
}

.demo-dot.vip-mode {
  background: linear-gradient(135deg, #facc15, #fb7185);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.5);
}

/* ── Load Display Component (Reusable) ────────────────────────────────── */
.load-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(108, 242, 194, 0.15);
}

.load-fill {
  height: 100%;
  background: linear-gradient(90deg, #6cf2c2, #5aa2ff);
  width: 0;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(108, 242, 194, 0.4);
}

.load-fill.low {
  background: linear-gradient(90deg, #6cf2c2, #6cf2c2);
}

.load-fill.medium {
  background: linear-gradient(90deg, #5aa2ff, #5aa2ff);
}

.load-fill.high {
  background: linear-gradient(90deg, #facc15, #fb7185);
}

.load-fill.extreme {
  background: linear-gradient(90deg, #fb7185, #8b5cf6);
}

/* ── Animations (Reusable) ────────────────────────────────────────────── */
@keyframes thinking {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.thinking {
  animation: thinking 1s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.pulse {
  animation: pulse 0.8s infinite;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
