﻿/* ============================================
   StatAnaliz — Shared Base Styles
   EduOps Design System · Dark Glassmorphism
   ============================================ */

:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.25);
  --secondary: #ec4899;
  --accent: #8b5cf6;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.9);
  --bg-input: rgba(15, 23, 42, 0.6);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(99, 102, 241, 0.4);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(99,102,241,0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme {
  --bg-dark: #f8f9fc;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-input: #ffffff;
  --text-main: #1e293b;
  --text-muted: #475569;
  --text-dim: #64748b;
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-border-hover: rgba(99, 102, 241, 0.3);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0,0,0,0.02);
  --shadow-hover: 0 20px 40px rgba(99, 102, 241, 0.1);
  background: radial-gradient(circle at top right, #ffffff, #f0f4f8);
}
body.light-theme .blob { opacity: 0.15; filter: blur(60px); }
body.light-theme .app-header { background: rgba(255, 255, 255, 0.85); border-bottom: 1px solid rgba(0,0,0,0.05); }
body.light-theme .step-circle { background: #fff; border-color: #e2e8f0; color: #64748b; }
body.light-theme .step-line { background: #e2e8f0; }
body.light-theme .var-table thead tr { background: #f1f5f9; }
body.light-theme .var-table th { color: #475569; }
body.light-theme .var-table td { border-bottom: 1px solid #e2e8f0; }
body.light-theme .var-table input, body.light-theme .var-table select { border: 1px solid #cbd5e1; background: #fff; color: #1e293b; }
body.light-theme .modal-box { background: #ffffff; border: 1px solid rgba(0,0,0,0.1); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); color: #1e293b; }
body.light-theme .modal-header, body.light-theme .modal-footer { border-color: #e2e8f0; }
body.light-theme .var-checkbox { background: #f8fafc; border-color: #e2e8f0; color: #475569; }
body.light-theme .result-header { border-color: #e2e8f0; }
body.light-theme .stat-chip { background: #f1f5f9; border-color: #e2e8f0; color: #475569; }
body.light-theme .prompt-panel { background: linear-gradient(135deg, #f8fafc, #f1f5f9); border: 1px solid #e2e8f0; }
body.light-theme .prompt-box { background: #ffffff; border: 1px solid #e2e8f0; color: #334155; }
body.light-theme .platform-link { background: #ffffff; border-color: #cbd5e1; color: #475569; }
body.light-theme .apa-table th { border-bottom: 2px solid #000; border-top: 2px solid #000; color: #000; }
body.light-theme .apa-table td { color: #000; }
body.light-theme .apa-table { background: #fff; font-size: 0.8rem; }
body.light-theme .var-checkbox.selected { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; }
body.light-theme .form-control { background: #fff; color: #1e293b; border-color: #cbd5e1; }
body.light-theme select option { background: #fff; color: #1e293b; }


*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* ── Background Blobs ── */
.blob {
  position: fixed;
  filter: blur(120px);
  z-index: 0;
  opacity: 0.35;
  pointer-events: none;
  animation: blobFloat 12s ease-in-out infinite alternate;
}
.blob-1 {
  top: -150px; left: -100px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}
.blob-2 {
  bottom: -150px; right: -100px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
  animation-delay: -6s;
}
.blob-3 {
  top: 40%; left: 40%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  animation-delay: -3s;
  opacity: 0.15;
}

@keyframes blobFloat {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 60px) scale(1.08); }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.7); }

/* ── Utility Classes ── */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--primary-glow);
}
.btn-secondary {
  background: rgba(255,255,255,0.07);
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text-main);
}
.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
}
.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16,185,129,0.3);
}
.btn-danger {
  background: rgba(239,68,68,0.15);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Badge ── */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge-primary {
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,0.25);
}
.badge-success {
  background: rgba(16,185,129,0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16,185,129,0.25);
}

/* ── Tag Chip ── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 50px;
  font-size: 0.75rem;
  color: #a5b4fc;
  font-weight: 500;
}

/* ── Form Controls ── */
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: 'Outfit', sans-serif;
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-control option { background: #1e293b; }
select.form-control { cursor: pointer; }

/* ── Tooltip ── */
[data-tooltip] {
  position: relative;
  cursor: help;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.75rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 1000;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ── Spinner ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── DOMAIN SELECTION ── */
.domain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.domain-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.domain-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99,102,241,0.1);
}
.domain-card.selected {
  border-color: var(--primary);
  background: rgba(99,102,241,0.03);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}
.domain-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.domain-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #1e293b; /* Koyu gri, kesin okunur */
}
.domain-card p {
  font-size: 0.85rem;
  color: #475569; /* Orta gri */
}

/* ── APA Table Styles (SPSS Output) ── */
.apa-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
}
.apa-table {
  border-collapse: collapse;
  width: 100%;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 0.92rem;
  color: var(--text-main);
  min-width: max-content;
}
.apa-table caption {
  text-align: left;
  font-weight: 700;
  caption-side: top;
  padding: 0 0 0.5rem 0;
  color: var(--text-main);
  font-size: 0.9rem;
}
.apa-table caption em {
  font-weight: 400;
  font-style: italic;
  display: block;
  color: var(--text-muted);
}
.apa-table thead tr:first-child {
  border-top: 2px solid rgba(255,255,255,0.5);
}
.apa-table thead tr:last-child {
  border-bottom: 1px solid rgba(255,255,255,0.25);
}
.apa-table th {
  text-align: center;
  font-weight: 700;
  padding: 0.5rem 1rem;
  color: var(--text-main);
  font-family: 'Georgia', serif;
  white-space: nowrap;
  white-space: nowrap;
}
.apa-table td {
  text-align: center;
  padding: 0.4rem 1rem;
  color: var(--text-muted);
  font-family: 'Georgia', serif;
  white-space: nowrap;
}
.apa-table td:first-child { text-align: left; color: var(--text-main); }
.apa-table tbody tr:hover td { color: var(--text-main); background: rgba(99,102,241,0.05); }
.apa-table tfoot td {
  font-size: 0.8rem;
  text-align: left;
  color: var(--text-dim);
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 0.5rem;
  font-family: 'Outfit', sans-serif;
}
.apa-table .sig { color: #fbbf24; font-weight: 700; }
.apa-table .sig-high { color: #34d399; font-weight: 700; }

/* ── Toast Notification ── */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.toast {
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: slideIn 0.3s ease;
  max-width: 320px;
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.toast-success { background: rgba(16,185,129,0.2); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.toast-error   { background: rgba(239,68,68,0.2);  border: 1px solid rgba(239,68,68,0.3);  color: #fca5a5; }
.toast-info    { background: rgba(99,102,241,0.2); border: 1px solid rgba(99,102,241,0.3); color: #a5b4fc; }

/* ── Responsive Helpers ── */
@media (max-width: 768px) {
  .apa-table th, .apa-table td { padding: 0.4rem 0.6rem; font-size: 0.82rem; }
}

