/**
 * Circloud - Public Pages Styles
 * About, Documentation, API Documentation pages
 */

/* Public page layout */
body.public-page {
  margin: 0;
  padding: 0 !important;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  background: var(--body-bg, linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #0d1520 100%));
}

body.public-page.login-page {
  background: var(--body-bg, #0a0a1a);
}

body.public-page.login-page .public-shell {
  position: relative;
}
body.public-page .public-shell {
  height: 100%;
}

/* Fix container on public pages to be full width */
body.public-page .container {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: visible !important;
}

/* Center login card within the content area */
body.public-page.login-page .app-content {
  align-items: center;
  justify-content: center;
}

body.public-page.login-page .public-content {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 0 30px;
}

body.public-page.login-page .login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  max-width: 420px;
  width: 100%;
}

body.public-page.login-page .login-hero {
  text-align: center;
  margin-bottom: 6px;
}

body.public-page.login-page .login-logo {
  height: 100px;
  width: auto;
  margin-bottom: 12px;
  filter: drop-shadow(0 6px 16px rgba(99, 102, 241, 0.35));
}

body.public-page.login-page .login-title {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.2px;
  background: linear-gradient(135deg, #a78bfa 0%, #60a5fa 50%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body.public-page.login-page .login-subtitle {
  margin-top: 6px;
  color: #9aa3b2;
  font-size: 15px;
}

body.public-page.login-page .login-toggle {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 6px;
  margin: 0 auto 18px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(139, 156, 255, 0.2);
  border-radius: 12px;
  max-width: 340px;
  width: 100%;
}

body.public-page.login-page .login-toggle.single {
  max-width: 160px;
}

body.public-page.login-page .login-toggle-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: #a5b4fc;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

body.public-page.login-page .login-toggle-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
}

body.public-page.login-page .login-card {
  background: linear-gradient(180deg, rgba(30, 30, 55, 0.9) 0%, rgba(18, 20, 40, 0.95) 100%);
  border: 1px solid rgba(139, 156, 255, 0.2);
  border-radius: 20px;
  padding: 28px 28px 24px;
  box-shadow: 0 24px 60px rgba(8, 10, 26, 0.6);
  backdrop-filter: blur(14px);
  width: 100%;
}

body.public-page.login-page .login-card .input-group {
  margin: 18px 0;
}

body.public-page.login-page .login-card .input-group input {
  background: rgba(23, 24, 40, 0.95);
  border: 1px solid rgba(139, 156, 255, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

body.public-page.login-page .login-card .input-group input:focus {
  border-color: rgba(139, 156, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

body.public-page.login-page .login-card .login-btn {
  border-radius: 12px;
  margin-top: 20px;
  box-shadow: 0 12px 24px rgba(99, 102, 241, 0.25);
}

body.public-page.login-page .login-card .form-section {
  margin-bottom: 0;
}

/* Navigation - Full width header matching cloudManagerGui */
.public-nav {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(139, 156, 255, 0.2);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.4), 0 0 60px rgba(99, 102, 241, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Animated bottom border */
.public-nav::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899, #a855f7, #6366f1);
  background-size: 200% 100%;
  animation: gradientFlow 4s linear infinite;
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.nav-brand img {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.4));
}

.nav-brand span {
  font-size: 20px;
  font-weight: 600;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Nav links container - pill style matching cloudManagerGui */
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.6);
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(139, 156, 255, 0.15);
}

.nav-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
  background: transparent;
  border: none;
  white-space: nowrap;
}

.nav-link:hover {
  color: white;
  background: rgba(139, 156, 255, 0.15);
}

.nav-link.active {
  color: white;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.4));
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.nav-link.login-btn-nav {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-weight: 500;
}

.nav-link.login-btn-nav:hover {
  opacity: 0.9;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Public content area */
.public-content {
  padding: 0 30px 16px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  min-height: 0;
  overflow: visible;
}

/* Login container override */
.public-content .login-container {
  max-width: 420px;
  margin: 0 auto 12px;
}

/* Form sections */
.form-section {
  margin-bottom: 20px;
}

.switch-form {
  text-align: center;
  margin-top: 20px;
  color: #888;
  font-size: 13px;
}

.switch-form a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.switch-form a:hover {
  text-decoration: underline;
}

/* Page titles */
.page-title {
  color: #fff;
  font-size: 32px;
  margin-bottom: 10px;
  font-weight: 700;
}

.page-subtitle {
  color: #888;
  font-size: 16px;
  margin-bottom: 40px;
}

/* Content sections */
.content-section {
  background: #1e1e2e;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  border: 1px solid #333;
}

.content-section h2 {
  color: #fff;
  font-size: 22px;
  margin-bottom: 20px;
  border-bottom: 1px solid #333;
  padding-bottom: 15px;
}

.content-section h3 {
  color: #667eea;
  font-size: 18px;
  margin: 25px 0 15px 0;
}

.content-section p {
  color: #ccc;
  line-height: 1.7;
  margin-bottom: 15px;
}

.content-section ul,
.content-section ol {
  color: #ccc;
  line-height: 1.8;
  padding-left: 25px;
}

.content-section li {
  margin-bottom: 8px;
}

.content-section a {
  color: #667eea;
  text-decoration: none;
}

.content-section a:hover {
  text-decoration: underline;
}

.content-section code {
  background: #2d2d3d;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Fira Code', 'SF Mono', monospace;
  color: #e0e0e0;
  font-size: 13px;
}

.content-section pre {
  background: #0d1117;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid #333;
  margin: 15px 0;
}

.content-section pre code {
  background: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.5;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.feature-card {
  background: #252535;
  border-radius: 10px;
  padding: 25px;
  border: 1px solid #333;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.feature-card h4 {
  color: #667eea;
  margin-bottom: 12px;
  font-size: 16px;
}

.feature-card p {
  color: #aaa;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* API endpoint styling */
.api-endpoint {
  background: #252535;
  border-radius: 8px;
  padding: 15px 20px;
  margin: 15px 0;
  border-left: 3px solid #667eea;
}

.api-method {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 10px;
  font-family: 'SF Mono', monospace;
}

.api-method.get {
  background: #27ae60;
  color: #fff;
}

.api-method.post {
  background: #3498db;
  color: #fff;
}

.api-method.put {
  background: #f39c12;
  color: #fff;
}

.api-method.delete {
  background: #e74c3c;
  color: #fff;
}

.api-path {
  color: #e0e0e0;
  font-family: 'Fira Code', 'SF Mono', monospace;
  font-size: 14px;
}

.api-desc {
  color: #888;
  font-size: 13px;
  margin-top: 8px;
}

/* Use case cards */
.use-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.use-case-card {
  background: linear-gradient(135deg, #1e1e2e 0%, #252535 100%);
  border-radius: 12px;
  padding: 25px;
  border: 1px solid #444;
  text-align: center;
}

.use-case-card .icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.use-case-card h4 {
  color: #fff;
  margin-bottom: 10px;
  font-size: 18px;
}

.use-case-card p {
  color: #aaa;
  font-size: 14px;
  margin: 0;
}

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

/* Responsive */
@media (max-width: 768px) {
  .public-nav {
    flex-direction: column;
    gap: 12px;
    padding: 12px 15px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    padding: 4px 6px;
  }

  .nav-link {
    padding: 6px 10px;
    font-size: 11px;
  }

  .nav-brand img {
    width: 36px;
    height: 36px;
  }

  .nav-brand span {
    font-size: 18px;
  }

  .public-content {
    padding: 0 12px 12px;
  }

  .public-content .login-container {
    margin: 0 auto 8px;
  }

  .page-title {
    font-size: 26px;
  }

  .content-section {
    padding: 20px;
  }
}
