/* Global Styles */
:root {
  /* Light mode colors */
  --primary-color: #10b981;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --light-color: #f8fafc;
  --dark-color: #0f172a;
  --gray-color: #64748b;
  --border-color: #e2e8f0;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --transition: all 0.3s ease;
  --background-color: #f8fafc;
  --text-color: #0f172a;
  --card-background: white;
  --header-background: rgba(255, 255, 255, 0.85);
  --btn-primary-bg: #10b981;
  --btn-primary-hover: #059669;
  --btn-outline-bg: transparent;
  --btn-outline-color: #10b981;
  --btn-outline-border: #10b981;
}

/* Dark mode colors */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #10b981;
    --secondary-color: #94a3b8;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-color: #1e293b;
    --dark-color: #f8fafc;
    --gray-color: #64748b;
    --border-color: #334155;
    --shadow: 0 10px 30px rgba(0,0,0,0.5);
    --background-color: #0f172a;
    --text-color: #f8fafc;
    --card-background: #1e293b;
    --header-background: rgba(15, 23, 42, 0.85);
    --btn-primary-bg: #10b981;
    --btn-primary-hover: #059669;
    --btn-outline-bg: transparent;
    --btn-outline-color: #f8fafc;
    --btn-outline-border: rgba(255, 255, 255, 0.2);
  }
}

/* System override for manual dark mode toggle */
[data-theme="dark"] {
  --primary-color: #10b981;
  --secondary-color: #94a3b8;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --light-color: #1e293b;
  --dark-color: #f8fafc;
  --gray-color: #64748b;
  --border-color: #334155;
  --shadow: 0 10px 30px rgba(0,0,0,0.5);
  --background-color: #0f172a;
  --text-color: #f8fafc;
  --card-background: #1e293b;
  --header-background: rgba(15, 23, 42, 0.85);
  --btn-primary-bg: #10b981;
  --btn-primary-hover: #059669;
  --btn-outline-bg: transparent;
  --btn-outline-color: #f8fafc;
  --btn-outline-border: rgba(255, 255, 255, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.card {
  background-color: var(--card-background);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 30px;
}

.card-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.5rem;
  color: var(--text-color);
  margin-bottom: 10px;
}

.card-content {
  color: var(--text-color);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--btn-primary-bg);
  color: white;
}

.btn-primary:hover {
  background-color: var(--btn-primary-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: var(--btn-outline-bg);
  color: var(--btn-outline-color);
  border: 2px solid var(--btn-outline-border);
}

.btn-outline:hover {
  background-color: var(--btn-primary-bg);
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
}

/* Header */
.header {
  background: var(--header-background);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-color);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo i {
  font-size: 28px;
  color: var(--primary-color);
}

.logo h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-color);
}

.nav {
  display: flex;
  gap: 25px;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 4px;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--primary-color);
}

.auth-buttons {
  display: flex;
  gap: 10px;
}

/* Sections */
section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 36px;
  color: var(--dark-color);
  margin-bottom: 15px;
}

.section-header p {
  font-size: 18px;
  color: var(--secondary-color);
  max-width: 700px;
  margin: 0 auto;
}

/* Landing Section */
.landing {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e7f1 100%);
  position: relative;
  overflow: hidden;
}

.landing::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
  z-index: 0;
}

.landing-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.landing h2 {
  font-size: 48px;
  margin-bottom: 20px;
  color: var(--dark-color);
}

.landing p {
  font-size: 20px;
  color: var(--secondary-color);
  max-width: 700px;
  margin: 0 auto 30px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 50px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.feature-card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.feature-card i {
  font-size: 40px;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: var(--dark-color);
}

/* Dashboard Section */
.dashboard {
  background: var(--background-color);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-bottom: 50px;
}

.stat-card {
  background: var(--card-background);
  padding: 25px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid var(--border-color);
}

.stat-card h3 {
  font-size: 16px;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.stat-change {
  font-size: 14px;
  color: var(--success-color);
}

.dashboard-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.emulator-status {
  background: var(--card-background);
  padding: 25px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-top: 20px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: var(--light-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--success-color);
}

.status-indicator.offline {
  background-color: var(--danger-color);
}

.status-detail {
  font-size: 14px;
  color: var(--secondary-color);
}

.recent-notifications {
  background: var(--card-background);
  padding: 25px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.notification-list {
  margin-top: 20px;
}

.notification-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item:hover {
  background: var(--light-color);
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--light-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-icon.tiktok { background: #000000; color: white; }
.notification-icon.youtube { background: #ff0000; color: white; }
.notification-icon.twitter { background: #1da1f2; color: white; }
.notification-icon.facebook { background: #1877f2; color: white; }
.notification-icon.instagram { background: #8338ec; color: white; }
.notification-icon.threads { background: #000000; color: white; }
.notification-icon.twitch { background: #6441a5; color: white; }
.notification-icon.kick { background: #000000; color: white; }

.notification-content {
  flex: 1;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.platform {
  font-weight: 600;
  color: var(--primary-color);
}

.time {
  font-size: 12px;
  color: var(--secondary-color);
}

.notification-actions {
  display: flex;
  gap: 10px;
}

/* Emulators Section */
.emulators {
  background: var(--background-color);
}

.emulator-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
}

.tab-btn {
  padding: 12px 24px;
  background: var(--card-background);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.tab-btn:hover:not(.active) {
  background: var(--light-color);
}

.emulator-content {
  background: var(--card-background);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.emulator-panel {
  display: none;
  padding: 30px;
}

.emulator-panel.active {
  display: block;
}

.emulator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.emulator-controls {
  display: flex;
  gap: 10px;
}

.emulator-info {
  margin-bottom: 30px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.info-item h4 {
  font-size: 14px;
  color: var(--secondary-color);
  margin-bottom: 5px;
}

.info-item p {
  font-size: 16px;
  font-weight: 600;
}

.status-online {
  color: var(--success-color);
}

.emulator-console {
  background: #0b0f19;
  border-radius: 8px;
  padding: 20px;
  color: #f8fafc;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  border: 1px solid var(--border-color);
}

.console-output {
  max-height: 200px;
  overflow-y: auto;
  padding-right: 10px;
}

.log-entry {
  margin-bottom: 8px;
  font-size: 14px;
}

.log-entry.info { color: #38bdf8; }
.log-entry.success { color: #10b981; }
.log-entry.warning { color: #f59e0b; }
.log-entry.error { color: #ef4444; }

/* Platforms Section */
.platforms {
  background: var(--background-color);
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-bottom: 50px;
}

.platform-card {
  background: var(--card-background);
  border-radius: 12px;
  padding: 25px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.platform-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--primary-color);
}

.platform-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
}

.platform-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--text-color);
}

.platform-stats {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.platform-stats span {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--light-color);
  color: var(--secondary-color);
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.platform-actions {
  text-align: center;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

/* API Section */
.api {
  background: var(--background-color);
}

.api-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
}

.api-panel {
  display: none;
}

.api-panel.active {
  display: block;
}

.api-endpoints {
  background: var(--card-background);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 25px;
  border: 1px solid var(--border-color);
}

.endpoint {
  margin-bottom: 25px;
}

.endpoint h4 {
  font-size: 16px;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.endpoint p {
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.endpoint pre {
  background: #0b0f19;
  color: #f8fafc;
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 14px;
  border: 1px solid var(--border-color);
}

/* Footer */
.footer {
  background: #0b0f19;
  color: white;
  padding: 60px 0 30px;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.footer-logo i {
  font-size: 24px;
  color: #ffcc00;
}

.footer-links h4 {
  font-size: 16px;
  margin-bottom: 15px;
  color: white;
}

.footer-links a {
  display: block;
  color: #adb5bd;
  text-decoration: none;
  margin-bottom: 10px;
  font-size: 14px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
  padding-left: 5px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid #495057;
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  color: #adb5bd;
  font-size: 18px;
  transition: var(--transition);
}

.footer-social a:hover {
  color: white;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
}

.modal-content {
  background-color: var(--card-background);
  color: var(--text-color);
  margin: 10% auto;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  position: relative;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.close {
  color: var(--secondary-color);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: var(--primary-color);
}

.auth-form {
  margin-top: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 16px;
  background-color: var(--light-color);
  color: var(--text-color);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 15px;
  }
  
  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .auth-buttons {
    width: 100%;
  }
  
  .dashboard-content {
    grid-template-columns: 1fr;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
  
  section {
    padding: 60px 0;
  }
  
  .section-header h2 {
    font-size: 32px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .section-header h2 {
    font-size: 28px;
  }
  
  .landing h2 {
    font-size: 36px;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}