/* AKAO UI Framework Styles */

/* Import Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap");

/* CSS Variables */
:root {
  /* Core Units */
  --unit: 8px;
  --text: 14px;
  --radius: 4px;
  --speed: 200ms;
  
  /* Spacing */
  --gap: var(--unit);
  --padding: calc(var(--unit) * 2);
  --margin: calc(var(--unit) * 2);
  
  /* Colors - Light Theme (default) */
  --primary: #667eea;
  --secondary: #764ba2;
  --success: #48bb78;
  --danger: #f56565;
  --warning: #ed8936;
  
  --background: #ffffff;
  --surface: #f7fafc;
  --color: #2d3748;
  --border: #e2e8f0;
  
  /* Typography */
  --font: "Noto Sans", system-ui, sans-serif;
  --font-mono: "Consolas", "Monaco", monospace;
  
  /* Layout */
  --header-height: 60px;
  --footer-height: 200px;
  --sidebar-width: 260px;
  --container-width: 1200px;
  
  /* Icon sizes */
  --icon-sm: 24px;
  --icon: 32px;
  --icon-lg: 48px;
  
  /* Inverted colors */
  --background-inverted: #1a202c;
  --color-inverted: #f7fafc;
}

/* Dark Theme */
[data-theme="dark"] {
  --background: #1a202c;
  --surface: #2d3748;
  --color: #f7fafc;
  --border: #4a5568;
  --background-inverted: #ffffff;
  --color-inverted: #2d3748;
}

/* Reset */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: var(--text);
  line-height: 1.6;
  color: var(--color);
  background: var(--background);
}

/* Container */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--padding);
}

/* Header */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--gap);
  text-decoration: none;
  color: var(--color);
  font-size: 20px;
  font-weight: 700;
}

.logo-icon {
  font-size: 28px;
}

/* Navigation */
.main-nav {
  display: flex;
  gap: calc(var(--gap) * 3);
}

.main-nav a {
  color: var(--color);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity var(--speed);
}

.main-nav a:hover,
.main-nav a.active {
  opacity: 1;
}

/* Main Content */
.app-content {
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height) - var(--footer-height));
  padding: calc(var(--padding) * 2) 0;
}

/* Buttons */
.button {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: var(--text);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--speed);
  background: var(--surface);
  color: var(--color);
}

.button.primary {
  background: var(--primary);
  color: white;
}

.button.secondary {
  background: var(--secondary);
  color: white;
}

.button.success {
  background: var(--success);
  color: white;
}

.button.danger {
  background: var(--danger);
  color: white;
}

.button.warning {
  background: var(--warning);
  color: white;
}

.button.ghost {
  background: transparent;
  border: 1px solid var(--border);
}

.button.large {
  padding: 15px 30px;
  font-size: 16px;
}

.button.small {
  padding: 5px 10px;
  font-size: 12px;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

/* Forms */
.input,
.textarea,
.select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text);
  font-family: var(--font);
  background: var(--background);
  color: var(--color);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  padding: var(--padding);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.card-body {
  padding: var(--padding);
}

.card-footer {
  padding: var(--padding);
  border-top: 1px solid var(--border);
}

/* Footer */
.app-footer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
}

.app-footer ui-navigator {
  position: relative;
}

.app-footer a {
  text-decoration: none;
  color: var(--color);
}

/* Theme Toggle */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 18px;
  cursor: pointer;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.github-link {
  color: var(--color);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--speed);
}

.github-link:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--unit); }
.mt-2 { margin-top: calc(var(--unit) * 2); }
.mt-3 { margin-top: calc(var(--unit) * 3); }
.mt-4 { margin-top: calc(var(--unit) * 4); }

.mb-1 { margin-bottom: var(--unit); }
.mb-2 { margin-bottom: calc(var(--unit) * 2); }
.mb-3 { margin-bottom: calc(var(--unit) * 3); }
.mb-4 { margin-bottom: calc(var(--unit) * 4); }

.p-1 { padding: var(--unit); }
.p-2 { padding: calc(var(--unit) * 2); }
.p-3 { padding: calc(var(--unit) * 3); }
.p-4 { padding: calc(var(--unit) * 4); }

/* Page Specific Styles */
.hero {
  padding: calc(var(--padding) * 6) 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  text-align: center;
}

.hero-title {
  font-size: 48px;
  margin: 0 0 var(--margin) 0;
}

.hero-subtitle {
  font-size: 20px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto calc(var(--margin) * 2);
}

.hero-actions {
  display: flex;
  gap: var(--gap);
  justify-content: center;
  margin-bottom: calc(var(--margin) * 3);
}

.hero-stats {
  display: flex;
  gap: calc(var(--gap) * 4);
  justify-content: center;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 32px;
  font-weight: bold;
}

.stat-label {
  display: block;
  font-size: 14px;
  opacity: 0.8;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: calc(var(--gap) * 3);
  margin-top: calc(var(--margin) * 3);
}

/* Advanced Showcase */
.advanced-showcase {
  margin: calc(var(--margin) * 4) 0;
}

.showcase-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: calc(var(--gap) * 4);
  margin-bottom: calc(var(--margin) * 4);
}

.showcase-item {
  text-align: center;
  padding: calc(var(--padding) * 2);
  background: var(--surface);
  border-radius: var(--radius);
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.showcase-item.full-width {
  grid-column: 1 / -1;
}

.showcase-item h3 {
  margin: 0 0 calc(var(--margin) * 2) 0;
  color: var(--primary);
}

.showcase-item p {
  margin-top: calc(var(--margin) * 2);
  color: var(--color);
  opacity: 0.8;
}

.feature-card {
  padding: calc(var(--padding) * 2);
  background: var(--surface);
  border-radius: var(--radius);
  text-align: center;
}

.feature-icon {
  font-size: 48px;
  margin-bottom: var(--margin);
}

/* Sections */
section {
  padding: calc(var(--padding) * 4) 0;
}

section h2 {
  font-size: 36px;
  margin: 0 0 var(--margin) 0;
  text-align: center;
}

/* Code Blocks */
pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--padding);
  overflow-x: auto;
}

code {
  font-family: var(--font-mono);
  font-size: 13px;
}