/* common.css - Shared styles for all CREATESONLINE pages */
:root {
  --primary: #000000;
  --secondary: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-900: #171717;
  --accent: #151516;
  --success: #10b981;
  --info: #3b82f6;
  --warning: #f59e0b;
  --error: #ef4444;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #000000 0%, #ffffff 100%);
  color: var(--primary);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  line-height: 1.6;
}

/* Common Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--secondary);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.header-logo:hover {
  transform: scale(1.05);
}

.header-logo-image {
  height: 40px;
  width: auto;
  margin-right: 0.75rem;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1));
}

.header-logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.header-nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
  opacity: 0.8;
  padding: 0.5rem 1rem;
  border-radius: 6px;
}

.nav-link:hover {
  opacity: 1;
  background: var(--primary);
  color: var(--secondary);
  transform: translateY(-1px);
}

.nav-link.active {
  background: var(--primary);
  color: var(--secondary);
  opacity: 1;
}

/* Common Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.page-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  margin: 3rem 0;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.page-icon {
  width: 32px;
  height: 32px;
}

/* Common Cards */
.card {
  background: var(--secondary);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border: 2px solid var(--gray-200);
  transition: all 0.3s ease;
  margin-bottom: 2rem;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  border-color: var(--primary);
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-icon {
  width: 20px;
  height: 20px;
}

.card-description {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Common Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--secondary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--gray-900);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--primary);
  border-color: var(--gray-200);
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--secondary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-icon {
  width: 16px;
  height: 16px;
}

/* Code Blocks */
.code-block {
  background: var(--gray-900);
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 8px;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.method-badge {
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
}

.method-badge.get { background: var(--success); }
.method-badge.post { background: var(--info); }
.method-badge.put { background: var(--warning); }
.method-badge.delete { background: var(--error); }

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* Status Indicators */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-online {
  background: #dcfce7;
  color: #166534;
}

.status-offline {
  background: #fee2e2;
  color: #991b1b;
}

.status-warning {
  background: #fef3c7;
  color: #92400e;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* Common Footer */
.footer {
  background: var(--gray-100);
  color: var(--gray-700);
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--gray-200);
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.footer-favicon {
  width: 20px;
  height: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .header-nav {
    gap: 1rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .page-title {
    font-size: 2rem;
    margin: 2rem 0;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .card {
    padding: 1.5rem;
  }
}

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
