/* ============================================
   SILENTBYTE GITHUB IMPORT - CLEAN UI
   ============================================ */

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --bg-card: #161616;
  --bg-hover: #1f1f1f;
  --bg-terminal: #0d0d0d;
  
  --border-primary: #222222;
  --border-secondary: #333333;
  --border-accent: #444444;
  
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --text-muted: #52525b;
  
  --accent-primary: #6366f1;
  --accent-secondary: #818cf8;
  --accent-hover: #4f46e5;
  
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  --deploy: #06b6d4;
  --upload: #a855f7;
  
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
  --shadow-terminal: 0 -4px 20px rgba(0, 0, 0, 0.6);
  
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loading-content {
  text-align: center;
  animation: fadeInUp 0.6s ease;
}

.loading-logo {
  font-size: 4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  letter-spacing: -3px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-secondary);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

.loading-text {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-family: 'SF Mono', Monaco, monospace;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

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

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.brand-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: none;
}

@media (min-width: 640px) {
  .brand-text {
    display: block;
  }
}

/* Profile */
.nav-profile {
  position: relative;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: transparent;
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.profile-trigger:hover {
  background: var(--bg-hover);
  border-color: var(--border-accent);
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-secondary);
}

.profile-info {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

@media (min-width: 640px) {
  .profile-info {
    display: flex;
  }
}

.nav-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.nav-email {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  line-height: 1.2;
}

.profile-trigger i {
  color: var(--text-tertiary);
  font-size: 0.75rem;
  transition: transform var(--transition-fast);
}

.profile-trigger:hover i {
  transform: rotate(180deg);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-base);
  z-index: 101;
  overflow: hidden;
}

.profile-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.dropdown-item i {
  width: 16px;
  text-align: center;
  color: var(--text-tertiary);
}

.dropdown-item:hover i {
  color: var(--accent-primary);
}

.dropdown-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dropdown-item.logout {
  color: var(--error);
}

.dropdown-item.logout i {
  color: var(--error);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-primary);
  margin: 0.5rem 0;
}

/* Main Content */
.main-content {
  padding-top: 64px;
  min-height: 100vh;
  padding-bottom: 350px;
}

.git-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

@media (min-width: 640px) {
  .git-container {
    padding: 3rem 1.5rem;
  }
}

.glass {
  background: rgba(22, 22, 22, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-primary);
}

/* Page Header */
.page-header {
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #333, #1a1a1a);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-secondary);
  flex-shrink: 0;
}

.header-icon i {
  font-size: 2rem;
  color: white;
}

.header-text h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.header-text p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

@media (max-width: 640px) {
  .page-header {
    padding: 1.5rem;
  }
  
  .header-icon {
    width: 48px;
    height: 48px;
  }
  
  .header-icon i {
    font-size: 1.5rem;
  }
  
  .header-text h1 {
    font-size: 1.25rem;
  }
}

/* Controls Bar */
.controls-bar {
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  animation: fadeInUp 0.6s ease 0.2s both;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 250px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box i {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 2.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  transition: all var(--transition-fast);
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-clear {
  position: absolute;
  right: 0.75rem;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  border-radius: 50%;
}

.search-clear.visible {
  opacity: 1;
  visibility: visible;
}

.search-clear:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.refresh-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.refresh-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-accent);
  color: var(--text-primary);
}

.refresh-btn:active {
  transform: scale(0.98);
}

.refresh-btn.loading i {
  animation: spin 1s linear infinite;
}

/* Repositories List */
.repos-list {
  border-radius: var(--radius-xl);
  padding: 1rem;
  min-height: 300px;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.repo-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-secondary);
  text-align: center;
}

.status-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-secondary);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.repo-status.error {
  color: var(--error);
}

.repo-status.error i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Repository Item */
.repo-item {
  padding: 1.25rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.repo-item:last-child {
  margin-bottom: 0;
}

.repo-item:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.repo-item-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-secondary);
  flex-shrink: 0;
}

.repo-item-icon i {
  font-size: 1rem;
  color: var(--text-secondary);
}

.repo-item-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repo-badge {
  padding: 0.25rem 0.5rem;
  background: var(--success);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.repo-badge.warning {
  background: var(--warning);
  color: var(--bg-primary);
}

.repo-item-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.repo-item-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.repo-meta-pill {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.repo-meta-pill i {
  font-size: 0.625rem;
  color: var(--text-muted);
}

.repo-lang-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.repo-import-btn {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.repo-import-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.repo-import-btn:active {
  transform: translateY(0);
}

/* Info Section */
.info-section {
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-top: 1.5rem;
  animation: fadeInUp 0.6s ease 0.4s both;
}

.info-section h3 {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.info-section h3 i {
  color: var(--accent-primary);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.info-card {
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  transition: all var(--transition-base);
}

.info-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.info-step {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

.info-card i {
  font-size: 1.5rem;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  margin-top: 0.5rem;
}

.info-card h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.info-card p {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  line-height: 1.4;
}

/* ============================================
   TERMINAL PANEL
   ============================================ */
.terminal-panel {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100%;
  max-width: 700px;
  height: 320px;
  background: var(--bg-terminal);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-terminal);
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: all var(--transition-base);
  animation: slideUp 0.4s ease;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
}

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

.terminal-panel.minimized {
  height: 48px;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.terminal-panel.hidden {
  display: none;
}

@media (min-width: 768px) {
  .terminal-panel {
    bottom: 1rem;
    right: 1rem;
    width: 600px;
    height: 350px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-secondary);
  }
  
  .terminal-panel.minimized {
    height: 48px;
    border-radius: var(--radius-lg);
  }
}

/* Terminal Header */
.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: linear-gradient(90deg, var(--bg-tertiary), var(--bg-card));
  border-bottom: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  flex-shrink: 0;
}

.terminal-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.terminal-brand i {
  color: var(--accent-primary);
  font-size: 1rem;
}

.terminal-brand-name {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.terminal-status {
  margin-left: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.terminal-status.idle { color: var(--text-muted); }
.terminal-status.scanning { color: var(--info); animation: blink 1s infinite; }
.terminal-status.importing { color: var(--upload); animation: blink 1s infinite; }
.terminal-status.processing { color: var(--warning); animation: blink 1s infinite; }
.terminal-status.deploying { color: var(--deploy); animation: blink 1s infinite; }
.terminal-status.live { 
  color: var(--success); 
  text-shadow: 0 0 10px var(--success);
}
.terminal-status.error { color: var(--error); }

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.5; }
}

.terminal-controls {
  display: flex;
  gap: 0.25rem;
}

.term-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.75rem;
}

.term-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.term-btn.close:hover {
  background: var(--error);
  color: white;
}

/* Terminal Stats */
.terminal-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-primary);
  font-size: 0.75rem;
  flex-shrink: 0;
  overflow-x: auto;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.stat-item i {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--success);
  font-weight: 700;
  animation: pulse 2s infinite;
}

.live-indicator.hidden {
  display: none;
}

.live-indicator i {
  color: var(--success);
}

/* Terminal Body */
.terminal-body {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: var(--bg-terminal);
}

.terminal-logs {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  padding: 0.75rem;
  font-size: 0.75rem;
  line-height: 1.7;
}

/* Log Entries */
.log-entry {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.375rem;
  padding: 0.25rem 0;
  animation: fadeIn 0.2s ease;
  flex-wrap: wrap;
  align-items: flex-start;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-5px); }
  to { opacity: 1; transform: translateX(0); }
}

.log-time {
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 70px;
}

.log-type {
  font-weight: 700;
  flex-shrink: 0;
  min-width: 70px;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.log-type i {
  font-size: 0.625rem;
}

.log-type.system { color: var(--accent-primary); }
.log-type.info { color: var(--info); }
.log-type.success { color: var(--success); }
.log-type.error { color: var(--error); }
.log-type.warning { color: var(--warning); }
.log-type.import { color: var(--upload); }
.log-type.deploy { color: var(--deploy); }

.log-message {
  color: var(--text-secondary);
  word-break: break-word;
  flex: 1;
  min-width: 200px;
}

.log-file {
  display: block;
  width: 100%;
  margin-left: calc(70px + 0.75rem + 70px + 0.75rem);
  color: var(--text-muted);
  font-size: 0.6875rem;
  margin-top: 0.125rem;
}

.log-url {
  display: block;
  width: 100%;
  margin-left: calc(70px + 0.75rem + 70px + 0.75rem);
  margin-top: 0.25rem;
}

.log-url a {
  color: var(--deploy);
  text-decoration: none;
  font-weight: 600;
}

.log-url a:hover {
  text-decoration: underline;
}

/* Terminal Footer */
.terminal-footer {
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-primary);
  flex-shrink: 0;
}

.terminal-progress {
  width: 100%;
  height: 3px;
  background: var(--border-secondary);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 2px;
}

.terminal-url {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.terminal-url.hidden {
  display: none;
}

.terminal-url i {
  color: var(--success);
}

.terminal-url a {
  color: var(--deploy);
  text-decoration: none;
  font-weight: 600;
  word-break: break-all;
}

.terminal-url a:hover {
  text-decoration: underline;
}

/* ============================================
   THERMAL BUTTON (Reopen Terminal)
   ============================================ */
.thermal-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: 50%;
  cursor: pointer;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-lg);
}

.thermal-btn:hover {
  transform: scale(1.1);
  border-color: var(--accent-primary);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
}

.thermal-btn.hidden {
  display: none;
}

.thermal-icon {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}

.thermal-icon i {
  color: white;
  font-size: 1.25rem;
}

.thermal-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--accent-primary);
  animation: thermalPulse 2s infinite;
  opacity: 0;
}

.thermal-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background: var(--accent-primary);
  filter: blur(20px);
  opacity: 0.3;
  animation: thermalGlow 3s ease-in-out infinite;
}

@keyframes thermalPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

@keyframes thermalGlow {
  0%, 100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

/* Toast Container */
.toast-container {
  position: fixed;
  top: 80px;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 200;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-left: 3px solid var(--info);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  font-size: 0.875rem;
  animation: slideInRight 0.3s ease;
  pointer-events: auto;
  max-width: 350px;
}

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

.toast.success {
  border-left-color: var(--success);
  background: rgba(34, 197, 94, 0.1);
}

.toast.error {
  border-left-color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

.toast.warning {
  border-left-color: var(--warning);
  background: rgba(245, 158, 11, 0.1);
}

.toast i {
  font-size: 1rem;
  flex-shrink: 0;
}

.toast.success i { color: var(--success); }
.toast.error i { color: var(--error); }
.toast.warning i { color: var(--warning); }
.toast.info i { color: var(--info); }

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

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-secondary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-accent);
}

/* Mobile Optimizations */
@media (max-width: 767px) {
  .main-content {
    padding-bottom: 280px;
  }
  
  .page-header {
    padding: 1.5rem;
  }
  
  .header-content {
    gap: 1rem;
  }
  
  .header-icon {
    width: 48px;
    height: 48px;
  }
  
  .controls-bar {
    padding: 0.75rem;
  }
  
  .search-box {
    min-width: 100%;
  }
  
  .repo-item {
    padding: 1rem;
  }
  
  .repo-item-name {
    font-size: 1rem;
  }
  
  .terminal-panel {
    height: 250px;
  }
  
  .terminal-stats {
    gap: 1rem;
    padding: 0.5rem;
  }
  
  .terminal-logs {
    padding: 0.5rem;
    font-size: 0.6875rem;
  }
  
  .log-entry {
    gap: 0.5rem;
  }
  
  .log-time {
    min-width: 55px;
  }
  
  .log-type {
    min-width: 60px;
  }
  
  .log-file,
  .log-url {
    margin-left: calc(55px + 0.5rem + 60px + 0.5rem);
  }
  
  .thermal-btn {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
  }
  
  .thermal-icon i {
    font-size: 1rem;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .toast-container {
    left: 1rem;
    right: 1rem;
  }
  
  .toast {
    max-width: 100%;
  }
}

@media (hover: none) and (pointer: coarse) {
  .repo-import-btn {
    padding: 0.875rem;
  }
  
  .refresh-btn {
    padding: 0.875rem 1rem;
  }
  
  .term-btn {
    width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
