/* Theme Toggle Styles */
.theme-toggle {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 1001;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.theme-toggle .icon {
  font-size: 1.5rem;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.theme-toggle .sun-icon {
  display: none;
}

.theme-toggle .moon-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}

/* Dark Mode Transition */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Fix for emoji backgrounds in dark mode - except for feature section */
[data-theme="dark"] .stat-icon,
[data-theme="dark"] .layer-icon,
[data-theme="dark"] .monitoring-feature .feature-icon,
[data-theme="dark"] .security-layer .layer-icon {
  background-color: #1e293b;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Make revolutionary features section emojis transparent in dark mode */
[data-theme="dark"] #features .features-grid .feature-icon,
[data-theme="dark"] .section.parallax-container .features-grid .feature-icon,
[data-theme="dark"] .feature-card .feature-icon {
  background-color: transparent !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: none !important;
}

/* Additional Dark Mode Specific Styles */
[data-theme="dark"] header {
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] header .nav-menu a,
[data-theme="dark"] header .logo-text {
  color: var(--text-primary);
}

[data-theme="dark"] .mobile-menu-toggle {
  color: var(--text-primary);
}

/* Cards and Sections */
[data-theme="dark"] .section {
  background: var(--primary-bg);
}

/* Fix for all headings and text in dark mode */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] li,
[data-theme="dark"] a {
  color: var(--text-primary);
}

[data-theme="dark"] .text-secondary,
[data-theme="dark"] .text-muted {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .card,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .news-card,
[data-theme="dark"] .pricing-card,
[data-theme="dark"] .testimonial-card {
  background: var(--card-bg);
  border-color: var(--border-color);
}

[data-theme="dark"] .pricing-card.featured {
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.15), rgba(0, 122, 255, 0.05));
}

/* Buttons */
[data-theme="dark"] .btn-secondary {
  background: rgba(33, 38, 45, 0.5);
  color: var(--text-primary);
}

[data-theme="dark"] .btn-secondary:hover {
  background: rgba(33, 38, 45, 0.8);
  color: var(--accent-blue-light);
}

/* Tables */
[data-theme="dark"] table {
  border-color: var(--border-color);
}

[data-theme="dark"] th,
[data-theme="dark"] td {
  border-color: var(--border-color);
}

[data-theme="dark"] tr:nth-child(even) {
  background-color: rgba(33, 38, 45, 0.3);
}

/* Form Elements */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background-color: var(--tertiary-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

/* Footer */
[data-theme="dark"] footer {
  background: var(--secondary-bg);
  border-top: 1px solid var(--border-color);
}

/* Navigation */
[data-theme="dark"] .nav-menu a {
  color: var(--text-primary);
}

[data-theme="dark"] .nav-menu a:hover {
  color: var(--accent-blue);
}

/* Live Market Data */
[data-theme="dark"] .market-ticker,
[data-theme="dark"] .market-data-row,
[data-theme="dark"] .market-data-cell,
[data-theme="dark"] .market-price,
[data-theme="dark"] .market-change,
[data-theme="dark"] .market-volume,
[data-theme="dark"] .market-cap,
[data-theme="dark"] .market-name,
[data-theme="dark"] .market-symbol,
[data-theme="dark"] .market-table th,
[data-theme="dark"] .market-table td,
[data-theme="dark"] .market-table tr,
[data-theme="dark"] .market-header,
[data-theme="dark"] .market-footer,
[data-theme="dark"] .market-filter,
[data-theme="dark"] .market-sort {
  color: var(--text-primary);
}

[data-theme="dark"] .market-table {
  background-color: var(--secondary-bg);
  border-color: var(--border-color);
}

[data-theme="dark"] .market-table th {
  background-color: var(--tertiary-bg);
}

[data-theme="dark"] .market-table tr:nth-child(even) {
  background-color: rgba(33, 38, 45, 0.3);
}

[data-theme="dark"] .market-overview-section h2,
[data-theme="dark"] .market-overview-section h3,
[data-theme="dark"] .market-overview-section p,
[data-theme="dark"] .market-overview-section .market-stat-value,
[data-theme="dark"] .market-overview-section .market-stat-label,
[data-theme="dark"] .market-overview-section .section-title,
[data-theme="dark"] .market-overview-section .section-subtitle {
  color: var(--text-primary);
}

/* Sign In Form */
[data-theme="dark"] .signin-main {
  background: linear-gradient(135deg, #1a1f36 0%, #111827 100%);
}

[data-theme="dark"] .signin-card {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .signin-container,
[data-theme="dark"] .signin-form,
[data-theme="dark"] .signin-form label,
[data-theme="dark"] .signin-form h2,
[data-theme="dark"] .signin-form h3,
[data-theme="dark"] .signin-form p,
[data-theme="dark"] .signin-options a,
[data-theme="dark"] .auth-switch a,
[data-theme="dark"] .auth-title,
[data-theme="dark"] .auth-subtitle,
[data-theme="dark"] .form-group label,
[data-theme="dark"] .form-footer,
[data-theme="dark"] .form-footer a,
[data-theme="dark"] .signin-options,
[data-theme="dark"] .signin-social {
  color: #ffffff;
}

[data-theme="dark"] .signin-header h1 {
  color: #ffffff;
}

[data-theme="dark"] .signin-header p {
  color: #a1a1aa;
}

[data-theme="dark"] .signin-form,
[data-theme="dark"] .auth-container {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .signin-form input,
[data-theme="dark"] .signin-form select,
[data-theme="dark"] .signin-form textarea {
  background-color: rgba(15, 23, 42, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

[data-theme="dark"] .signin-form input:focus,
[data-theme="dark"] .signin-form select:focus,
[data-theme="dark"] .signin-form textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .signin-form input::placeholder,
[data-theme="dark"] .signin-form select::placeholder,
[data-theme="dark"] .signin-form textarea::placeholder {
  color: #6b7280;
}

[data-theme="dark"] .divider span {
  background-color: #1e293b;
  color: #a1a1aa;
}

[data-theme="dark"] .signin-divider::before,
[data-theme="dark"] .signin-divider::after {
  background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .signin-footer {
  border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .checkbox-container {
  color: #a1a1aa;
}

[data-theme="dark"] .feature-icon {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

/* Additional fixes for any remaining elements */
[data-theme="dark"] .section-header .section-title,
[data-theme="dark"] .section-header .section-subtitle,
[data-theme="dark"] .page-title,
[data-theme="dark"] .page-subtitle,
[data-theme="dark"] .feature-title,
[data-theme="dark"] .feature-description,
[data-theme="dark"] .testimonial-text,
[data-theme="dark"] .testimonial-author,
[data-theme="dark"] .testimonial-position,
[data-theme="dark"] .pricing-title,
[data-theme="dark"] .pricing-price,
[data-theme="dark"] .pricing-period,
[data-theme="dark"] .footer-section h4,
[data-theme="dark"] .footer-section a,
[data-theme="dark"] .footer-section p,
[data-theme="dark"] .copyright {
  color: var(--text-primary);
}

/* Live Market Intelligence Section */
[data-theme="dark"] .hero h1,
[data-theme="dark"] .hero h2,
[data-theme="dark"] .hero p,
[data-theme="dark"] .hero .subtitle {
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Bitcoin, Ethereum, Market Cap and Volume prices in dark mode */
[data-theme="dark"] .market-stats-grid .stat-card .price,
[data-theme="dark"] .market-stats-grid .stat-card .value,
[data-theme="dark"] .market-stats-grid .stat-card strong,
[data-theme="dark"] .crypto-price-value,
[data-theme="dark"] .market-overview .price-value,
[data-theme="dark"] .market-overview .price,
[data-theme="dark"] .market-overview .crypto-price {
  color: #3b82f6 !important;
  font-weight: 700;
  opacity: 1 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .market-price,
[data-theme="dark"] .price-value,
[data-theme="dark"] .price-label,
[data-theme="dark"] .crypto-price,
[data-theme="dark"] .market-intelligence-price,
[data-theme="dark"] .market-intelligence-section .price,
[data-theme="dark"] .market-intelligence-section .value,
[data-theme="dark"] .market-intelligence-section .currency,
[data-theme="dark"] .market-intelligence-section .change,
[data-theme="dark"] .market-intelligence-section .percentage {
  color: #3b82f6;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  opacity: 1 !important;
  background: transparent !important;
}

/* General price elements in dark mode */
[data-theme="dark"] .price,
[data-theme="dark"] .crypto-price,
[data-theme="dark"] .price-value,
[data-theme="dark"] .market-overview-section .price,
[data-theme="dark"] .market-overview-section .crypto-price,
[data-theme="dark"] .market-overview-section .value,
[data-theme="dark"] .market-overview-section .price-value,
[data-theme="dark"] .market-intelligence-section .price-value,
[data-theme="dark"] .market-intelligence-section .price-label,
[data-theme="dark"] .market-overview .price,
[data-theme="dark"] .market-overview .value {
  color: #ffffff;
  opacity: 1 !important;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  background: transparent !important;
}

/* Metric card styling for both light and dark mode */
/* Light mode */
.metric-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.metric-card .metric-value {
  color: #111827;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.metric-card .metric-label {
  color: #4b5563;
  font-size: 0.9rem;
  font-weight: 500;
}

.metric-card .metric-change.positive {
  color: #10b981;
  font-weight: 600;
}

.metric-card .metric-change.negative {
  color: #ef4444;
  font-weight: 600;
}

/* Dark mode */
html[data-theme="dark"] .metric-card {
  background: #1e293b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .metric-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

html[data-theme="dark"] .metric-card .metric-value {
  color: #ffffff;
  opacity: 1 !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .metric-card .metric-label {
  color: #e5e7eb;
  opacity: 1 !important;
}

html[data-theme="dark"] .metric-card .metric-change.positive {
  color: #34d399;
  opacity: 1 !important;
}

html[data-theme="dark"] .metric-card .metric-change.negative {
  color: #f87171;
  opacity: 1 !important;
}

/* Live Market Intelligence section */
[data-theme="dark"] .market-intelligence-section,
[data-theme="dark"] .market-intelligence-section h1,
[data-theme="dark"] .market-intelligence-section h2,
[data-theme="dark"] .market-intelligence-section h3,
[data-theme="dark"] .market-intelligence-section p,
[data-theme="dark"] .market-intelligence-section .subtitle {
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Mobile Menu */
[data-theme="dark"] .mobile-menu {
  background: var(--secondary-bg);
  border-color: var(--border-color);
}

/* Pricing Features */
[data-theme="dark"] .pricing-features li::before {
  color: var(--accent-green);
}
