/* ==========================================================================
   OP Easy Generator — Component Design System
   Glassmorphism, 3D cards, glowing buttons, dropzones, badges & forms.
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 4px 18px var(--glow-purple);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 6px 25px var(--glow-purple), 0 0 15px var(--glow-cyan);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-bright);
  color: var(--text-main);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-outline:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--glow-cyan);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 0.95rem 2rem;
  font-size: 1.05rem;
}

/* Glassmorphic Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  position: relative;
}

.glass-card:hover {
  border-color: var(--border-bright);
  box-shadow: var(--shadow-3d);
}

/* 3D Generator Card */
.generator-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 2rem;
  position: relative;
  transition: all var(--transition-normal);
  overflow: hidden;
}

.generator-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.generator-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-bright);
  box-shadow: var(--shadow-3d);
}

.generator-card:hover::before {
  opacity: 1;
}

.card-icon-wrap {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  transition: all var(--transition-normal);
}

.generator-card:hover .card-icon-wrap {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 20px var(--glow-purple);
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
}

.badge-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-label .required-star {
  color: var(--accent-rose);
  margin-left: 0.2rem;
}

.form-control, .form-select {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font-family);
  font-size: 0.95rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  outline: none;
  transition: all var(--transition-fast);
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px var(--glow-purple);
}

.form-text {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
}

.input-with-action {
  position: relative;
  display: flex;
}

.input-with-action .form-control {
  padding-right: 3rem;
}

.input-action-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 4px;
}

.input-action-btn:hover {
  color: var(--text-main);
}

/* Drag & Drop Upload Zone */
.upload-dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}

.upload-dropzone:hover, .upload-dropzone.drag-over {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.04);
  box-shadow: 0 0 25px var(--glow-cyan);
}

.upload-dropzone .dropzone-icon {
  font-size: 2.5rem;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
}

.upload-dropzone .dropzone-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

.upload-dropzone .dropzone-subtitle {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.dropzone-file-preview {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
}

.dropzone-file-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dropzone-file-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
}

.dropzone-file-size {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.92rem;
}

.alert-error {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fda4af;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fde68a;
}

.alert-info {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.3);
  color: #67e8f9;
}

/* Progress Tracker */
.progress-container {
  width: 100%;
  margin: 1.5rem 0;
}

.progress-track {
  height: 0.75rem;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  position: relative;
}

.progress-bar {
  height: 100%;
  background: var(--gradient-primary);
  width: 0%;
  transition: width 0.4s ease;
  box-shadow: 0 0 12px var(--glow-purple);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Download Card */
.download-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: var(--shadow-3d);
}

.download-file-details h4 {
  font-size: 1.15rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.download-file-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Danger Zone */
.danger-zone {
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.04);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-top: 2rem;
}

.danger-zone-title {
  color: #ef4444;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
