/**
 * Circloud GUI - Base Styles
 * Reset, body, container, header
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
  --header-height: 60px;
  --footer-height: 32px;
}

html {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--background, #070b17);
  color: var(--text, #ffffff);
  min-height: 100vh;
  height: 100vh;
  line-height: 1.6;
  padding: 0;
  display: block;
  overflow: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(1200px 760px at 6% -10%, rgba(94, 203, 255, 0.26) 0%, transparent 60%),
    radial-gradient(900px 640px at 94% 110%, rgba(107, 92, 255, 0.16) 0%, transparent 65%),
    radial-gradient(700px 420px at 50% 30%, rgba(107, 92, 255, 0.18) 0%, transparent 70%),
    linear-gradient(160deg, rgba(7, 10, 24, 0.98) 0%, rgba(12, 16, 36, 0.96) 45%, rgba(6, 9, 20, 0.99) 100%),
    var(--network-lines-sm);
  background-size: auto, auto, auto, auto, 720px 480px;
  background-position: 0 0, 0 0, 0 0, 0 0, 60px 90px;
  pointer-events: none;
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  inset: -10% 0 0 0;
  background:
    radial-gradient(50% 80% at 50% 0%, rgba(10, 16, 34, 0.2) 0%, rgba(7, 10, 24, 0.9) 70%),
    var(--network-lines-lg);
  background-size: auto, 1400px 900px;
  background-position: 0 0, -140px -10px;
  transform: perspective(860px) rotateX(68deg) scale(1.03);
  transform-origin: top;
  opacity: 0.36;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: -1;
}

/* Container */
.container {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--container-bg, transparent);
  border-radius: 0;
  box-shadow: none;
  overflow: visible !important;
  backdrop-filter: none;
  border: none;
  min-height: 0;
  height: 100%;
  position: relative;
  z-index: 1;
}

/* Header */
header {
  background: var(--header-bg, rgba(12, 15, 34, 0.86));
  color: var(--header-color, #ffffff);
  padding: 4px 10px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  box-shadow: var(--shadow, 0 4px 24px rgba(0, 0, 0, 0.4));
  backdrop-filter: blur(20px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--app-header-height, var(--header-height));
  display: flex;
  align-items: center;
  z-index: 1000;
  overflow: hidden;
}

header h1 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text, #ffffff);
  margin: 0;
  letter-spacing: 0.01em;
}

/* Header layout */
.header-content {
  max-width: none;
  margin: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}

/* Header logo container */
.header-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 32px;
}

.header-logo {
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}

header p {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted, #6d7696);
  margin: 0;
  opacity: 1;
}

/* Header title section */
.header-title-section {
  display: flex;
  flex-direction: column;
  line-height: 1;
  width: max-content;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header-meta {
  font-size: 0.72rem;
  color: var(--text-secondary, #a7b0d1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm, 10px);
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  white-space: nowrap;
}

.header-meta-label {
  font-weight: 600;
  color: rgba(226, 232, 240, 0.9);
}

.header-meta-sep {
  opacity: 0.6;
}

.header-meta code {
  padding: 0.1rem 0.5rem;
  border-radius: 8px;
  background: var(--glass, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  color: var(--text-secondary, #a7b0d1);
}

/* Header navigation - simple clean style */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  padding: 0;
  border-radius: 0;
  border: none;
  backdrop-filter: none;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.header-nav::-webkit-scrollbar {
  display: none;
}

.header-nav .nav-link {
  color: var(--text-secondary, #a7b0d1);
  text-decoration: none;
  padding: 0.32rem 0.7rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
  background: transparent;
  border: none;
  white-space: nowrap;
}

.header-nav .nav-link:hover {
  color: var(--text, #ffffff);
  background: rgba(255, 255, 255, 0.1);
}

.header-nav .nav-link.active {
  color: var(--text, #ffffff);
  background: rgba(139, 156, 255, 0.2);
  box-shadow: none;
}

.content {
  padding: 8px 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Admin Bar */
.admin-bar {
  background: var(--admin-bar-bg, #f8f9fa);
  padding: 8px 12px;
  border-bottom: 2px solid var(--admin-bar-border, #e0e0e0);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.admin-info {
  flex: 1;
  min-width: 300px;
}

.admin-label {
  margin-bottom: 4px;
  color: var(--admin-bar-text, #333);
  font-size: 12px;
}

.admin-label strong {
  color: var(--admin-bar-label, #666);
  font-weight: 600;
}

/* Code inline */
code {
  background: var(--code-inline-bg);
  color: var(--code-inline-color);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  border: 1px solid var(--code-inline-border);
}

/* Empty State */
.empty-state {
  color: #7d8590;
  text-align: center;
  padding: 48px 24px;
  font-size: 14px;
  font-style: normal;
  background: rgba(139, 156, 255, 0.03);
  border-radius: 8px;
  border: 1px dashed rgba(139, 156, 255, 0.15);
  margin: 8px 0;
}

/* App footer */
.app-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--footer-height);
  padding: 0 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 11px;
  border-top: 1px solid rgba(139, 156, 255, 0.1);
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.main-content {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.app-content {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: var(--footer-height);
  overflow: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
