/* Common CSS for Doc Folder */

/* Base Styles */
body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #f8fafc 60%, #ffeaea 100%);
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Dark Mode Base */
[data-bs-theme="dark"] body {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #e4e4e4;
}

[data-bs-theme="dark"] .content {
  background: #1a1a2e;
  color: #e4e4e4;
}

[data-bs-theme="dark"] .section {
  background: #16213e;
  border-color: #2a2a4e;
}

[data-bs-theme="dark"] .api-endpoint {
  background: #0f0f1e;
  border-color: #2a2a4e;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

[data-bs-theme="dark"] .api-endpoint:hover {
  background: #1a1a2e;
  border-color: #667eea;
}

[data-bs-theme="dark"] .code-block {
  background: #0a0a15;
  color: #a8dadc;
  border-color: #2a2a4e;
}

[data-bs-theme="dark"] .param-table {
  background: #0f0f1e;
  border-color: #2a2a4e;
}

[data-bs-theme="dark"] .param-table th {
  background: #1a1a2e;
  color: #667eea;
  border-color: #2a2a4e;
}

[data-bs-theme="dark"] .param-table td {
  border-color: #2a2a4e;
  color: #d4d4d4;
}

[data-bs-theme="dark"] .sidebar {
  background: #0f0f1e;
  border-color: #2a2a4e;
}

[data-bs-theme="dark"] .sidebar a {
  color: #b8b8b8;
}

[data-bs-theme="dark"] .sidebar a:hover,
[data-bs-theme="dark"] .sidebar a.active {
  background: #667eea;
  color: #fff;
}

[data-bs-theme="dark"] .topbar {
  background: #0f0f1e;
  border-color: #2a2a4e;
}

[data-bs-theme="dark"] .search-bar {
  background: #1a1a2e;
  color: #e4e4e4;
  border-color: #2a2a4e;
}

[data-bs-theme="dark"] .alert-info {
  background: #1a2332;
  color: #a8d5e2;
  border-color: #2a4a5e;
}

[data-bs-theme="dark"] .alert-warning {
  background: #332a1a;
  color: #e2d5a8;
  border-color: #5e4a2a;
}

/* Common Form Styles */
.form-control {
  border-radius: 10px;
  padding-left: 2.2rem;
  box-shadow: 0 2px 8px 0 rgba(255,77,79,0.07);
  margin-bottom: 1rem;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #ffb199;
  font-size: 1.1rem;
  pointer-events: none;
}

/* Common Button Styles */
.btn-primary {
  background: linear-gradient(90deg,#ff4d4f 80%,#ffb199 100%);
  border: none;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 2px 8px 0 rgba(255,77,79,0.10);
  transition: background 0.18s;
}

.btn-primary:hover {
  background: linear-gradient(90deg,#ffb199 0%,#ff4d4f 100%);
  color: #fff;
}

/* Dark Toggle Button */
.dark-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

/* Dark Mode Form Controls */
[data-bs-theme="dark"] .form-control {
  background: #444;
  color: white;
  border: 1px solid #666;
}

[data-bs-theme="dark"] .form-control::placeholder {
  color: #aaa;
}

/* Validation Styles */
.form-control.is-valid {
  border-color: #28a745;
  box-shadow: 0 2px 8px 0 rgba(40,167,69,0.15);
}

.form-control.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 2px 8px 0 rgba(220,53,69,0.15);
}

.validation-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  pointer-events: none;
}

.validation-icon.valid {
  color: #28a745;
}

.validation-icon.invalid {
  color: #dc3545;
}

.error-message {
  color: #dc3545;
  font-size: 0.85rem;
  margin-top: 0.3rem;
  display: none;
  animation: fadeIn 0.3s ease;
}

.error-message.show {
  display: block;
}

/* Loading States */
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn .spinner {
  display: none;
}

.btn.loading .spinner {
  display: inline-block;
}

.btn.loading .btn-text {
  display: none;
}

/* Animations */
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner {
  animation: spin 1s linear infinite;
}

/* Responsive */
@media (max-width: 400px) {
  .form-card { padding: 1.2rem 0.5rem; }
  .form-logo { font-size: 2rem; }
}

/* API Documentation Specific Styles */
.sidebar {
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  background: rgba(255,255,255,0.95);
  border-right: 1.5px solid #eaeaea;
  padding-top: 70px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 2px 0 16px 0 rgba(80,80,80,0.04);
  backdrop-filter: blur(2px);
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 12px 24px;
  color: #444;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.04rem;
  border-left: 3px solid transparent;
  transition: 0.18s;
}

.sidebar a.active, .sidebar a:hover {
  background: #ffeaea;
  color: #ff4d4f;
  border-left: 3px solid #ff4d4f;
  font-weight: 700;
}

.sidebar .sidebar-icon {
  font-size: 1.2rem;
  color: #ff4d4f;
  min-width: 22px;
  text-align: center;
}

.topbar {
  height: 70px;
  background: linear-gradient(90deg, #ff4d4f 80%, #ffb199 100%);
  position: fixed;
  top: 0;
  left: 280px;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.2rem;
  border-bottom: 1.5px solid #ffd6d6;
  z-index: 99;
  box-shadow: 0 2px 16px 0 rgba(255,77,79,0.07);
}

.topbar .api-logo {
  font-size: 1.7rem;
  margin-right: 0.7rem;
  color: #fff;
  vertical-align: middle;
}

.topbar strong {
  font-size: 1.18rem;
  color: #fff;
  letter-spacing: 0.01em;
}

.topbar .btn {
  font-weight: 600;
  border-radius: 8px;
  margin-left: 0.3rem;
}

.topbar .btn-outline-secondary {
  border-color: #fff;
  color: #fff;
}

.topbar .btn-outline-secondary:hover {
  background: #fff;
  color: #ff4d4f;
}

.topbar .btn-outline-primary {
  border-color: #fff;
  color: #fff;
}

.topbar .btn-outline-primary:hover {
  background: #fff;
  color: #ff4d4f;
}

.topbar .btn-danger {
  background: #fff;
  color: #ff4d4f;
  border: none;
}

.topbar .btn-danger:hover {
  background: #ff4d4f;
  color: #fff;
}

.content {
  margin-left: 280px;
  padding: 100px 2.5rem 2.5rem 2.5rem;
  max-width: 100%;
}

.section {
  margin-bottom: 4rem;
}

.api-endpoint {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 16px 0 rgba(255,77,79,0.07);
  padding: 1.2rem 1.2rem 1.1rem 1.2rem;
  margin-bottom: 1.3rem;
  border-left: 5px solid #ff4d4f;
  position: relative;
  transition: box-shadow 0.18s;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.api-endpoint:hover {
  box-shadow: 0 4px 32px 0 rgba(255,77,79,0.13);
  border-left: 5px solid #4e54c8;
}

.api-method {
  display: inline-block;
  font-size: 0.93rem;
  font-weight: 700;
  border-radius: 7px;
  padding: 2px 12px;
  margin-right: 0.7rem;
  color: #fff;
  background: #4e54c8;
  letter-spacing: 0.01em;
  vertical-align: middle;
}

.api-method.get { background: #28a745; }
.api-method.post { background: #007bff; }
.api-method.put { background: #ff9800; }
.api-method.delete { background: #ff4d4f; }

.api-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 7px;
  padding: 2px 10px;
  margin-left: 0.5rem;
  color: #fff;
  background: #4e54c8;
  vertical-align: middle;
}

.api-badge.auth { background: #ff9800; }
.api-badge.success { background: #28a745; }
.api-badge.error { background: #ff4d4f; }
.api-badge.info { background: #007bff; }

.api-endpoint code {
  background: #f8f8f8;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 0.97rem;
  color: #4e54c8;
}

.copy-btn {
  border: none;
  background: none;
  color: #ff4d4f;
  cursor: pointer;
  float: right;
  font-size: 1.1rem;
  margin-left: 0.7rem;
  margin-top: -2px;
  transition: color 0.18s;
}

.copy-btn:hover {
  color: #4e54c8;
}

.api-desc {
  color: #666;
  font-size: 0.98rem;
  margin-bottom: 0.7rem;
  margin-top: 0.2rem;
}

.code-block {
  background: #23272e;
  color: #eaeaea;
  border-radius: 10px;
  padding: 1rem;
  font-size: 0.97rem;
  margin-top: 0.7rem;
  margin-bottom: 0.7rem;
  overflow-x: auto;
  font-family: 'Fira Mono', 'Consolas', monospace;
}

.param-table {
  width: 100%;
  margin-bottom: 0.7rem;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f8f8;
  font-size: 0.97rem;
}

.param-table th, .param-table td {
  padding: 7px 12px;
  border-bottom: 1px solid #eee;
}

.param-table th {
  background: #ffeaea;
  color: #ff4d4f;
  font-weight: 700;
}

.param-table tr:last-child td {
  border-bottom: none;
}

.search-bar {
  width: 260px;
  border-radius: 10px;
  border: 1.5px solid #ffeaea;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  margin-right: 1.2rem;
  box-shadow: 0 2px 8px 0 rgba(255,77,79,0.07);
  transition: border 0.18s;
}

.search-bar:focus {
  border: 1.5px solid #ff4d4f;
  outline: none;
}

.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 999;
  background: #ff4d4f;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 2px 12px 0 rgba(255,77,79,0.13);
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.18s;
  display: none;
}

.back-to-top.show {
  display: flex;
}

.api-endpoint {
  transition: box-shadow 0.18s, border-left 0.18s, transform 0.18s;
}

.api-endpoint.in-view {
  transform: scale(1.015);
  box-shadow: 0 6px 32px 0 rgba(255,77,79,0.16);
  border-left: 5px solid #28a745;
}

.tooltip-copy {
  position: absolute;
  top: 10px;
  right: 50px;
  background: #23272e;
  color: #fff;
  font-size: 0.92rem;
  border-radius: 7px;
  padding: 3px 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  z-index: 10;
}

.tooltip-copy.show {
  opacity: 1;
}

/* Dashboard Specific Styles */
.welcome-section {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-radius: 20px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 4px 25px rgba(0,0,0,0.08);
  border: 1px solid rgba(255,77,79,0.1);
}

.user-avatar {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #ff4d4f 0%, #ff6b6b 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  margin-right: 1rem;
  overflow: hidden;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(255, 77, 79, 0.3);
}

.welcome-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ff4d4f;
  margin-bottom: 0.5rem;
}

.welcome-subtitle {
  color: #666;
  font-size: 1rem;
}

.section-title {
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: #ff4d4f;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title i {
  font-size: 1.1rem;
}

.token-box {
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border-radius: 15px;
  padding: 1.5rem;
  word-break: break-all;
  position: relative;
  border: 2px solid rgba(255,77,79,0.1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: #333;
}

.stats-card {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid rgba(255,77,79,0.1);
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stats-card:hover {
  transform: translateY(-5px);
}

.stats-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff4d4f 0%, #ff6b6b 100%);
}

.stats-icon {
  font-size: 2rem;
  color: #ff4d4f;
  margin-bottom: 1rem;
}

.stats-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.5rem;
}

.stats-label {
  color: #666;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-card {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid rgba(255,77,79,0.1);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-card:hover {
  transform: translateX(5px);
  box-shadow: 0 6px 25px rgba(255,77,79,0.15);
  color: inherit;
  text-decoration: none;
}

.nav-icon {
  font-size: 1.5rem;
  color: #ff4d4f;
}

/* Result Alert Styles */
.result-alert {
  border-radius: 15px;
  border: none;
  padding: 1.2rem;
  margin: 1rem 0;
  font-weight: 500;
  animation: fadeIn 0.5s ease;
}

.result-alert.success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  border-left: 4px solid #28a745;
}

.result-alert.error {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
  border-left: 4px solid #dc3545;
}

/* Dark Mode Overrides */
[data-bs-theme="dark"] .topbar,
[data-bs-theme="dark"] .sidebar,
[data-bs-theme="dark"] .api-endpoint,
[data-bs-theme="dark"] .content,
[data-bs-theme="dark"] .api-endpoint code,
[data-bs-theme="dark"] footer {
  background-color: #1e1e1e !important;
  color: #eaeaea !important;
  border-color: #333 !important;
}

[data-bs-theme="dark"] .sidebar a {
  color: #ccc;
}

[data-bs-theme="dark"] .sidebar a:hover {
  background-color: #2a2a2a;
  color: white;
}

[data-bs-theme="dark"] .api-endpoint code {
  background-color: #2c2c2c;
  color: #e0e0e0;
}

[data-bs-theme="dark"] .copy-btn {
  color: #aaa;
}

[data-bs-theme="dark"] .copy-btn:hover {
  color: #fff;
}

[data-bs-theme="dark"] .btn-outline-secondary {
  border-color: #777;
  color: #ddd;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
  background-color: #333;
  color: #fff;
}

[data-bs-theme="dark"] .btn-outline-primary {
  border-color: #0d6efd;
  color: #0d6efd;
}

[data-bs-theme="dark"] .btn-outline-primary:hover {
  background-color: #0d6efd;
  color: #fff;
}

[data-bs-theme="dark"] .welcome-section {
  background: linear-gradient(135deg, #2e2e2e 0%, #1a1a1a 100%);
  border: 1px solid rgba(255,77,79,0.2);
}

[data-bs-theme="dark"] .welcome-subtitle {
  color: #aaa;
}

[data-bs-theme="dark"] .token-box {
  background: linear-gradient(135deg, #2e2e2e 0%, #1a1a1a 100%);
  color: #fff;
  border: 2px solid rgba(255,77,79,0.2);
}

[data-bs-theme="dark"] .stats-card {
  background: linear-gradient(135deg, #2e2e2e 0%, #1a1a1a 100%);
  color: #fff;
  border: 1px solid rgba(255,77,79,0.2);
}

[data-bs-theme="dark"] .stats-number {
  color: #fff;
}

[data-bs-theme="dark"] .stats-label {
  color: #aaa;
}

[data-bs-theme="dark"] .nav-card {
  background: linear-gradient(135deg, #2e2e2e 0%, #1a1a1a 100%);
  border: 1px solid rgba(255,77,79,0.2);
}

[data-bs-theme="dark"] .result-alert.success {
  background: linear-gradient(135deg, #1e4a2e 0%, #2d5a3d 100%);
  color: #d4edda;
}

[data-bs-theme="dark"] .result-alert.error {
  background: linear-gradient(135deg, #4a1e1e 0%, #5a2d2d 100%);
  color: #f8d7da;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .topbar {
    left: 0;
  }
  .content {
    margin-left: 0;
    padding: 80px 1rem 2rem;
  }
} 