:root {
  --accent: #BB162B;
  --accent-hover: #d91a32;
  --accent-glow: rgba(187, 22, 43, 0.3);
  --transition: 0.3s ease;
}

[data-theme="dark"] {
  --bg-primary: #0a0a0b;
  --bg-secondary: #111113;
  --bg-tertiary: #1a1a1d;
  --bg-card: rgba(255,255,255,0.03);
  --bg-card-hover: rgba(255,255,255,0.06);
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --glass: rgba(10,10,11,0.85);
}

[data-theme="light"] {
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f4f4f5;
  --bg-card: rgba(0,0,0,0.02);
  --bg-card-hover: rgba(0,0,0,0.04);
  --text-primary: #18181b;
  --text-secondary: #52525b;
  --text-muted: #a1a1aa;
  --border: rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.15);
  --glass: rgba(255,255,255,0.85);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-placeholder {
  width: 42px;
  height: 42px;
  background: var(--bg-tertiary);
  border: 1px dashed var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  padding: 24px 32px;
  z-index: 999;
  overflow-y: auto;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu a {
  display: block;
  color: var(--text-primary);
  text-decoration: none;
  padding: 18px 0;
  font-size: 1.1rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}

.mobile-menu a:hover {
  color: var(--accent);
}

/* Main */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Sections */
section {
  padding: 100px 0;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 16px;
  padding: 6px 12px;
  background: rgba(187, 22, 43, 0.1);
  border-radius: 6px;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 72px;
  opacity: 1 !important;
  transform: none !important;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, var(--accent) 0%, #ff6b7a 50%, var(--accent) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.hero .subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

/* Vertical Tabs - Section 1 */
.vertical-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  margin-top: 48px;
  min-height: 500px;
}

.vtabs-menu {
  width: 280px;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  border-right: 1px solid var(--border);
  padding: 8px;
}

.vtab-btn {
  width: 100%;
  padding: 18px 20px;
  background: transparent;
  border: none;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.vtab-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.vtab-btn.active {
  background: var(--accent);
  color: white;
}

.vtab-btn .icon {
  font-size: 1.3rem;
  width: 32px;
  text-align: center;
}

.vtab-btn svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.vtab-btn.active svg {
  opacity: 1;
}

.vtab-btn:hover svg {
  opacity: 1;
}

.vtabs-content {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
}

.vtab-panel {
  display: none;
  animation: fadeIn 0.4s ease;
}

.vtab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

.vtab-panel h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.vtab-panel h3 svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.content-placeholder {
  padding: 32px;
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Mobile Accordion for Vertical Tabs */
.mobile-accordion {
  display: none;
  margin-top: 48px;
}

.accordion-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  padding: 20px 24px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  transition: all var(--transition);
}

.accordion-header:hover {
  background: var(--bg-card-hover);
}

.accordion-header .left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.accordion-header .left svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.accordion-header .chevron {
  transition: transform var(--transition);
  color: var(--text-muted);
}

.accordion-item.open .accordion-header .chevron {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.accordion-item.open .accordion-content {
  max-height: 1000px;
}

.accordion-body {
  padding: 0 24px 24px;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* Department Tabs */
.dept-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.dept-tab {
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.dept-tab:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.dept-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.dept-content {
  display: none;
}

.dept-content.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

/* Prompt Cards */
.prompt-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: all var(--transition);
}

.prompt-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.prompt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

.prompt-card-header h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.copy-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.copy-btn.copied {
  background: #10b981;
  border-color: #10b981;
  color: white;
}

.prompt-card-body {
  padding: 24px;
}

.prompt-card-body code {
  display: block;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Generator Section */
.generator-section {
  margin-top: 64px;
}

.generator-box {
  background: linear-gradient(135deg, rgba(187,22,43,0.08) 0%, rgba(187,22,43,0.02) 100%);
  border: 1px solid rgba(187,22,43,0.2);
  border-radius: 24px;
  padding: 40px;
}

.generator-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 32px;
}

.generator-header svg {
  flex-shrink: 0;
  color: var(--accent);
}

.generator-header h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.generator-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

.generator-form {
  margin-bottom: 32px;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

textarea, input[type="text"] {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  resize: vertical;
  transition: all var(--transition);
}

textarea:focus, input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(187,22,43,0.1);
}

textarea::placeholder, input[type="text"]::placeholder {
  color: var(--text-muted);
}

.generator-output {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.output-box {
  padding: 24px;
  min-height: 120px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.output-box .placeholder {
  color: var(--text-muted);
  font-style: italic;
}

/* Theory Section - reuse accordion styles */
.theory-section {
  margin-bottom: 32px;
}

.theory-section .accordion-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.tool-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.tool-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 0 30px rgba(187, 22, 43, 0.15);
}

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

/* Individual card glows */
.tool-card:nth-child(1):hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 0 40px rgba(0, 120, 212, 0.25);
}

.tool-card:nth-child(2):hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 0 40px rgba(16, 163, 127, 0.25);
}

.tool-card:nth-child(3):hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 0 40px rgba(217, 119, 87, 0.25);
}

.tool-card:nth-child(4):hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 0 40px rgba(66, 133, 244, 0.25);
}

.tool-card:nth-child(5):hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 0 40px rgba(124, 58, 237, 0.25);
}

.tool-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.tool-card h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.tool-card-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.tool-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tag {
  padding: 4px 10px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.tool-card-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  transition: gap var(--transition);
}

.tool-card:hover .tool-card-cta {
  gap: 12px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 24px;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 10;
}

.modal-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.modal-header {
  padding: 40px 40px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.modal-header .tool-card-icon {
  margin-bottom: 0;
}

.modal-header h3 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.modal-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

.modal-body {
  padding: 0 40px 40px;
}

.modal-body h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text-primary);
}

.modal-body h4:first-child {
  margin-top: 0;
}

.modal-body p, .modal-body ul {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.modal-body ul {
  padding-left: 20px;
  margin: 0;
}

.modal-body li {
  margin-bottom: 8px;
}

.modal-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 12px 24px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.modal-link:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

/* Visual Gallery */
.visual-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.gallery-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
}

.gallery-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.gallery-card:nth-child(1):hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 0 40px rgba(0, 196, 204, 0.2);
}

.gallery-card:nth-child(2):hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 0 40px rgba(139, 92, 246, 0.2);
}

.gallery-card:nth-child(3):hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 0 40px rgba(245, 158, 11, 0.2);
}

.gallery-preview {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.gallery-placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg-tertiary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
}

.gallery-placeholder svg {
  opacity: 0.5;
}

.gallery-placeholder span {
  font-size: 0.85rem;
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0) 100%);
  display: flex;
  align-items: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay-content {
  transform: translateY(10px);
  transition: transform var(--transition);
}

.gallery-card:hover .gallery-overlay-content {
  transform: translateY(0);
}

.gallery-overlay h4 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.gallery-overlay p {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.gallery-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
}

.gallery-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}

.gallery-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gallery-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.gallery-info p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0;
}

/* Audio Tools */
.audio-tools {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 64px;
}

.audio-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: all var(--transition);
}

.audio-card:hover {
  border-color: var(--border-hover);
  transform: translateX(8px);
}

.audio-card:nth-child(1):hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.1), 0 0 30px rgba(29, 185, 84, 0.15);
}

.audio-card:nth-child(2):hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.1), 0 0 30px rgba(66, 133, 244, 0.15);
}

.audio-card:nth-child(3):hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.1), 0 0 30px rgba(99, 102, 241, 0.15);
}

.audio-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.audio-card-content {
  flex: 1;
}

.audio-card-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.audio-card-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.audio-card-arrow {
  color: var(--text-muted);
  transition: all var(--transition);
}

.audio-card:hover .audio-card-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* Timeline */
.timeline-section {
  margin-bottom: 64px;
}

.timeline-section h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  padding-bottom: 32px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -40px;
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--accent-glow);
}

.timeline-marker span {
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
}

.timeline-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  transition: all var(--transition);
}

.timeline-content:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.timeline-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.timeline-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.6;
}

/* Assistant Section */
.assistant-section {
  margin-top: 48px;
}

.assistant-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.04) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 24px;
  padding: 40px;
}

.assistant-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 32px;
}

.assistant-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
}

.assistant-header h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.assistant-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.6;
}

.assistant-form {
  margin-bottom: 24px;
}

.btn-assistant {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  color: white;
  border: none;
}

.btn-assistant:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.assistant-output {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

/* Implementation Cards */
.impl-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-bottom: 24px;
  overflow: hidden;
  transition: all var(--transition);
}

.impl-card:hover {
  border-color: var(--border-hover);
}

.impl-card-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 32px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

.impl-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.impl-card-header h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.impl-card-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.impl-card-body {
  padding: 28px 32px;
}

/* Workflow Steps */
.workflow-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px;
  background: var(--bg-tertiary);
  border-radius: 14px;
}

.workflow-step {
  display: flex;
  align-items: center;
  gap: 12px;
}

.workflow-step-num {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.workflow-step-content {
  display: flex;
  flex-direction: column;
}

.workflow-step-content strong {
  font-size: 0.95rem;
}

.workflow-step-content span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.workflow-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Checklist */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition);
}

.checklist-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.checklist-item input {
  display: none;
}

.checkmark {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.checklist-item input:checked + .checkmark {
  background: #10b981;
  border-color: #10b981;
}

.checklist-item input:checked + .checkmark::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.checklist-item:has(input:checked) {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

.checklist-text {
  font-size: 0.95rem;
  line-height: 1.5;
}

.checklist-text strong {
  color: var(--text-primary);
}

/* Progress Bar */
.progress-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-fill.team {
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
}

.progress-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Notes Area */
.notes-area {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  transition: all var(--transition);
}

.notes-area:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(187,22,43,0.1);
}

.notes-area::placeholder {
  color: var(--text-muted);
}

.save-status {
  margin-left: 16px;
  font-size: 0.85rem;
  color: #10b981;
}

/* Floating Assistant Widget */
.assistant-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1500;
  font-family: 'Inter', sans-serif;
}

.assistant-widget-toggle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
  transition: all var(--transition);
}

.assistant-widget-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.5);
}

.assistant-widget-toggle .assistant-icon-close {
  display: none;
}

.assistant-widget.active .assistant-widget-toggle .assistant-icon-open {
  display: none;
}

.assistant-widget.active .assistant-widget-toggle .assistant-icon-close {
  display: block;
}

.assistant-widget-panel {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  max-height: 520px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.assistant-widget.active .assistant-widget-panel {
  display: flex;
}

.assistant-widget-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  color: white;
}

.assistant-widget-avatar {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.assistant-widget-header h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 2px 0;
}

.assistant-status {
  font-size: 0.8rem;
  opacity: 0.9;
}

.audio-stop-btn {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.2);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  animation: pulse-audio 1.5s infinite;
}

.audio-stop-btn:hover {
  background: rgba(255,255,255,0.3);
}

@keyframes pulse-audio {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
}

/* Floating stop button (when widget closed but audio playing) */
.floating-stop-btn {
  position: absolute;
  bottom: 74px;
  right: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #ef4444;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
  animation: pulse-recording 1.5s infinite;
  z-index: 1501;
}

.floating-stop-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* Hide floating stop when widget is open */
.assistant-widget.active .floating-stop-btn {
  display: none !important;
}

.assistant-widget-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 320px;
}

.assistant-message {
  max-width: 85%;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.assistant-message.assistant {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.assistant-message.user {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.assistant-message p {
  margin: 0;
}

.assistant-widget-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-tertiary);
}

.assistant-widget-footer input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
}

.assistant-widget-footer input:focus {
  outline: none;
  border-color: #6366F1;
}

.assistant-send-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.assistant-send-btn:hover {
  transform: scale(1.05);
}

.assistant-voice-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.assistant-voice-btn:hover {
  border-color: #6366F1;
  color: #6366F1;
}

.assistant-voice-btn.recording {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  border-color: #ef4444;
  color: white;
  animation: pulse-recording 1.5s infinite;
}

.assistant-voice-btn .stop-icon {
  display: none;
}

.assistant-voice-btn.recording .mic-icon {
  display: none;
}

.assistant-voice-btn.recording .stop-icon {
  display: block;
}

@keyframes pulse-recording {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
}

.voice-visualizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 32px;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border-radius: 16px;
  margin: 8px 0;
}

.voice-visualizer span {
  width: 4px;
  height: 8px;
  background: #6366F1;
  border-radius: 2px;
  animation: voice-bar 0.5s ease infinite;
}

.voice-visualizer span:nth-child(1) { animation-delay: 0s; }
.voice-visualizer span:nth-child(2) { animation-delay: 0.1s; }
.voice-visualizer span:nth-child(3) { animation-delay: 0.2s; }
.voice-visualizer span:nth-child(4) { animation-delay: 0.3s; }
.voice-visualizer span:nth-child(5) { animation-delay: 0.4s; }

@keyframes voice-bar {
  0%, 100% { height: 8px; }
  50% { height: 24px; }
}

.assistant-typing {
  display: flex;
  gap: 4px;
  padding: 14px 18px;
}

.assistant-typing span {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.assistant-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.assistant-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* Mobile adjustments for widget */
@media (max-width: 600px) {
  .assistant-widget {
    bottom: 16px;
    right: 16px;
  }

  .assistant-widget-toggle {
    width: 56px;
    height: 56px;
  }

  .assistant-widget-panel {
    width: calc(100vw - 32px);
    right: -8px;
    bottom: 72px;
    max-height: 70vh;
  }
}


/* Spinner ładowania (np. przy generowaniu promptów) */
@keyframes spin { 
  100% { transform: rotate(360deg); } 
}

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

.spinner circle { 
  stroke: var(--accent); 
  stroke-dasharray: 80; 
  stroke-dashoffset: 60; 
}
/* --- KARTY GENERATYWNE: HOVER + PEŁNA TREŚĆ --- */

.gen-card {
    /* Wysokość startowa (zgrabny kafelek) */
    height: 360px !important;
    cursor: pointer;
    
    /* Płynna animacja zmiany wysokości */
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Zabezpieczenie perspektywy dla efektu 3D */
    perspective: 1000px;
}

/* --- WYRÓWNANIE PRZODU KART --- */

.gen-card .flip-card-front {
    /* 1. Zmieniamy 'space-between' na 'flex-start'. 
       Dzięki temu ikona i tytuł zawsze będą na samej górze. */
    justify-content: flex-start !important; 
    
    padding: 24px;
    display: flex;
    flex-direction: column;
}

/* 2. Ustawiamy sztywne odstępy dla elementów wewnątrz, 
   żeby w każdej karcie wyglądało to tak samo */

/* Kontener ikony */
.gen-card .flip-card-front > div:first-child {
    margin-bottom: 20px !important; /* Stały odstęp pod ikoną */
    flex-shrink: 0; /* Ikona nie może się kurczyć */
}

/* Tytuł */
.gen-card .flip-card-front strong {
    margin-bottom: 12px !important;
    display: block;
}

/* Opis (paragraf) */
.gen-card .flip-card-front p {
    margin-bottom: 12px !important;
    flex-grow: 0; /* Nie rozciągaj się na siłę */
}

/* 3. "Magiczna" linia, która wypycha napis "Kliknij..." na sam dół karty */
.gen-card .flip-card-front .click-hint {
    margin-top: auto !important; 
    padding-top: 10px;
}
@media (max-width: 600px) {
  .nav-container {
    padding: 0 20px;
  }


  main {
    padding: 0 20px;
  }

  section {
    padding: 80px 0;
  }

  .hero {
    min-height: calc(100vh - 72px);
  }

  /* --- POPRAWKA ASYSTENTA NA MOBILE --- */
  .assistant-widget {
    /* Podnosimy wyżej (90px), żeby uciec spod paska Safari/Chrome */
    bottom: 90px !important; 
    right: 20px !important;
    /* Najwyższy możliwy index, żeby nic go nie przykryło */
    z-index: 99999 !important; 
  }

  .assistant-widget-toggle {
    width: 60px;
    height: 60px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4); /* Mocniejszy cień dla kontrastu */
  }

  .assistant-widget-panel {
    width: calc(100vw - 32px);
    right: -4px; /* Poprawka centrowania panelu */
    bottom: 80px; /* Panel też wyżej */
    max-height: 60vh;
  }
  /* ------------------------------------ */

  .btn {
    padding: 14px 24px;
    font-size: 0.95rem;
  }

  .generator-box {
    padding: 24px;
  }

  .generator-header {
    flex-direction: column;
    gap: 16px;
  }

  .prompt-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* --- Style dla etykiet w promptach --- */
.prompt-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(187, 22, 43, 0.1);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 8px;
  vertical-align: middle;
  user-select: none; /* Użytkownik nie zaznaczy tego myszką */
  border: 1px solid rgba(187, 22, 43, 0.2);
  transform: translateY(-1px);
}

/* Opcjonalnie: Różne kolory dla różnych typów (jeśli chcesz) */
.prompt-label.ctx { color: #0ea5e9; background: rgba(14, 165, 233, 0.1); border-color: rgba(14, 165, 233, 0.2); }
.prompt-label.task { color: #10b981; background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); }

/* Style dla ukrytych wyników */
.result-box {
  display: none; /* Domyślnie ukryte */
  margin-top: 16px;
  padding: 16px;
  background: rgba(16, 185, 129, 0.1); /* Zielonkawa poświata sukcesu */
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text-primary);
  animation: fadeIn 0.3s ease;
}

.btn-reveal {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  margin-top: 12px;
  width: 100%;
  transition: all 0.3s ease;
}

.btn-reveal:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(187, 22, 43, 0.05);
}

/* =========================================
   GLOBALNA NAPRAWA (Wklej to na samym dole)
   ========================================= */

/* 1. ODBLOKOWANIE WIDOCZNOŚCI (Dla PC i Mobile)
   To naprawia "znikającą" sekcję Grafika wszędzie. 
   Nadpisujemy opacity: 0 z linii 158. */
section, #visual {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

/* =========================================
   SCALONE MEDIA QUERIES (MOBILE < 1000px)
   Zawiera: Nawigację, Fixy Układu oraz Parasol AI
   ========================================= */

@media (max-width: 1000px) {
  
  /* --- 1. Nawigacja i Układ Ogólny --- */
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  section {
    padding: 60px 0 !important;
  }

  /* --- 2. Zakładki i Akordeony --- */
  .vertical-tabs {
    display: none;
  }

  .mobile-accordion {
    display: block;
  }

  .dept-tabs {
    gap: 6px;
  }

  .dept-tab {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .vtabs-content {
    overflow: visible !important;
    height: auto !important;
  }

  /* --- 3. Fixy Układu (Grid -> Flex Kolumnowy) --- */
  /* To naprawia problem "znikającej" sekcji Grafika i układa kafelki pionowo */
  .tools-grid, 
  .visual-gallery {
      display: flex !important;
      flex-direction: column !important;
      gap: 24px !important;
  }

  /* Zabezpieczenie szerokości kart */
  .visual-gallery {
      grid-template-columns: 1fr !important;
  }
  
  /* --- 4. Generator Promptów --- */
  .generator-section {
      overflow: visible !important;
      height: auto !important;
  }

  .generator-box {
      padding: 24px !important;
  }

  /* --- 5. NOWOŚĆ: Fix dla "Parasola AI" (Struktura Technologii) --- */
  /* Układa koła i opis jedno pod drugim, zamiast ściskać je obok siebie */
  .ai-structure-container {
      display: flex !important; /* Nadpisuje Grid */
      flex-direction: column;
      gap: 0;
      margin: 20px 0;
  }

  .ai-visual {
      min-height: 400px;
      transform: scale(0.85); /* Lekkie pomniejszenie okręgów */
      margin-bottom: -20px;
  }

  .ai-explanation-box {
      min-height: auto;
      padding: 24px;
      margin-top: 20px;
  }

  /* Ukrywamy linię łączącą na mobile, bo przy scrollowaniu i tak się rozjedzie */
  .connector-overlay {
      display: none;
  }
}

/* --- AI STRUCTURE (Nested Circles & Curved Text) --- */

@keyframes ripple-hint {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(255, 255, 255, 0); /* Rozchodząca się fala */
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}
.ai-structure-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin: 60px 0;
  position: relative; /* Dla connector-overlay */
}

.ai-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  position: relative;
}

/* Base Circle Style */
.ai-circle {
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  
  /* KLUCZOWE DLA UX: */
  cursor: pointer !important; /* Wymusza łapkę */
  position: relative;
  border: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0,0,0,0.05);
  /* Płynne przejścia dla hovera */
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  
  /* Dodajemy naszą animację "fali" */
  animation: ripple-hint 4s infinite;
}

[data-theme="light"] .ai-circle {
  border-color: rgba(0, 0, 0, 0.2); /* Wyraźny szary obrys */
}
.ai-circle:hover {
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 0 15px rgba(255,255,255,0.05);
}

/* SVG Curved Labels Styles */
.curved-label {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Kliknięcia przechodzą do koła */
}

.curved-label text {
    fill: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: fill 0.3s;
}

.circle-label-straight {
    /* Dla najmniejszego koła GenAI */
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    z-index: 2;
    pointer-events: none;
}

/* Specific Sizes & Colors */
/* Specific Sizes & Colors (Idealnie koncentryczne) */
.circle-ai {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.05) 100%);
  /* Flexbox centruje w poziomie, margin-top centruje w pionie */
  align-items: flex-start; 
  animation-delay: 0s;
}

.circle-ml {
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.05) 0%, rgba(96, 165, 250, 0.1) 100%);
  border-color: rgba(96, 165, 250, 0.2);
  animation-delay: 1s;
  
  /* (380 - 280) / 2 = 50px */
  margin-top: 50px; 
}
.label-ml text { fill: rgba(96, 165, 250, 0.7); }

.circle-dl {
  width: 190px; height: 190px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.1) 0%, rgba(167, 139, 250, 0.2) 100%);
  border-color: rgba(167, 139, 250, 0.3);
  animation-delay: 2s;
  
  /* (280 - 190) / 2 = 45px */
  margin-top: 45px;
}
.label-dl text { fill: rgba(167, 139, 250, 0.8); }

.circle-genai {
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.4) 100%);
  border-color: #10b981;
  
  /* (190 - 100) / 2 = 45px */
  margin-top: 45px;
  
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
  align-items: center; /* Tekst na środku koła */
  justify-content: center;
  animation-delay: 3s;
}

/* Active States & Label Highlighting */
.ai-circle.active-ring > .curved-label text { fill: var(--text-primary) !important; }
.circle-ml.active-ring > .curved-label text { fill: #60a5fa !important; }
.circle-dl.active-ring > .curved-label text { fill: #a78bfa !important; }

.ai-circle.active-ring { border-width: 2px; transform: scale(1.02); }
.circle-ai.active-ring { border-color: var(--text-primary); box-shadow: 0 0 20px rgba(255,255,255,0.1); }
.circle-ml.active-ring { border-color: #60a5fa; box-shadow: 0 0 20px rgba(96, 165, 250, 0.2); }
.circle-dl.active-ring { border-color: #a78bfa; box-shadow: 0 0 20px rgba(167, 139, 250, 0.2); }
.circle-genai.active-ring { border-color: #10b981; box-shadow: 0 0 30px rgba(16, 185, 129, 0.4); transform: scale(1.1); }


/* --- ANIMOWANA LINIA ŁĄCZĄCA --- */
.connector-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Żeby nie blokowało kliknięć pod spodem */
    z-index: 5;
}

.connector-line-animate {
    opacity: 1 !important;
    stroke-dasharray: 1000; /* Wystarczająco długa wartość */
    stroke-dashoffset: 1000;
    animation: drawLine 0.8s forwards ease-in-out;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

/* Right Side Content - NAPRAWIONE */
.ai-explanation-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  min-height: 420px;
  position: relative;
  z-index: 10;
}

.ai-level-content {
  display: none !important; /* Wymuś ukrycie */
  animation: fadeIn 0.4s ease;
}

.ai-level-content.active {
  display: block !important; /* Wymuś pokazanie tylko aktywnego */
}

/* Reszta stylów tekstowych bez zmian */
.level-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.level-header h4 { margin: 0; font-size: 1.5rem; }

.level-note {
  margin-top: 20px;
  padding: 12px 16px;
  border-left: 3px solid var(--text-secondary);
  background: var(--bg-tertiary);
  font-size: 0.9rem;
  border-radius: 4px;
}

/* --- Style dla list w boksie z definicjami --- */

.example-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 24px;
  margin-bottom: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Linia ozdobna obok napisu PRZYKŁADY (opcjonalnie) */
.example-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  opacity: 0.5;
}

.aligned-list {
  /* Kluczowe dla wyrównania do lewej */
  padding-left: 18px; 
  margin: 0;
  list-style-type: disc;
}

.aligned-list li {
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  padding-left: 4px; /* Odsunięcie tekstu od kropki */
}

/* Kolorowanie kropek (bullets) zgodnie z kolorem sekcji */
#level-ml .aligned-list li::marker { color: #60a5fa; }
#level-dl .aligned-list li::marker { color: #a78bfa; }
#level-genai .aligned-list li::marker { color: #10b981; }

/* --- TIMELINE V3: FLEXBOX & REVEAL (POPRAWIONE) --- */

.timeline-v3-container {
  position: relative;
  overflow-x: auto;
  padding: 0;
  height: 600px;
  cursor: grab;
  scrollbar-width: none;
  display: flex;
  align-items: center;
  /* Dodajemy scroll-behavior dla płynności przy nawigacji JS */
  /*scroll-behavior: smooth; */
  scroll-snap-type: x mandatory;
}
.timeline-v3-container::-webkit-scrollbar { display: none; }
.timeline-v3-container:active { cursor: grabbing; }

.timeline-track {
  display: flex;
  align-items: center;
  /* ZMIANA: Zwiększony odstęp, aby karty 320px się nie nakładały */
  gap: 380px; 
  padding: 0 50vw; /* Bufor startowy i końcowy */
  min-width: max-content;
  position: relative;
  height: 100%;
}

/* WARSTWA LINII POZIOMEJ */
.timeline-line-layer {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 0;
  pointer-events: none;
}

.main-line {
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.15);
  position: absolute;
  top: 1px;
}

/* KULKA ŚLEDZĄCA (Skaner) */
.progress-ball {
  width: 24px; height: 24px; /* Nieco większa dla lepszej widoczności */
  background: var(--accent);
  border-radius: 50%;
  border: 4px solid var(--bg-primary); /* Kolor tła zamiast white dla efektu wycięcia */
  position: absolute;
  top: 50%; left: 0;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 30px var(--accent);
  z-index: 10;
  transition: box-shadow 0.3s ease;
}

/* POJEDYNCZY PUNKT NA OSI */
.timeline-item {
  position: relative;
  width: 2px; /* Punkt jest wąską linią referencyjną */
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  scroll-snap-align: center;
}

/* KROPKA (Marker) */
.timeline-marker {
  width: 16px; height: 16px;
  background: var(--bg-primary);
  border: 3px solid var(--text-muted);
  border-radius: 50%;
  z-index: 5;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Sprężysty efekt */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* DATA - ZAWSZE WIDOCZNA, PRZYGASZONA */
.timeline-date-label {
  position: absolute;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-muted);
  opacity: 0.3;
  transition: all 0.4s ease;
  white-space: nowrap;
  left: 50%;
  transform: translateX(-50%);
}

/* KARTA - UKRYTA (MGŁA) */
.timeline-content-card {
	.timeline-content-card {
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE10+/Edge */
    user-select: none;         /* Standard */
}
  position: absolute;
  width: 300px; /* Nieco węższa dla zgrabniejszego wyglądu */
  
  /* Tło: Półprzezroczysty ciemny z lekkim rozmyciem (Glassmorphism) */
  background: rgba(20, 20, 23, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  
  /* Obramowanie: Subtelne, z jaśniejszą górą dla efektu 3D */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top-color: rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  
  padding: 20px 24px;
  cursor: pointer;
  z-index: 2;
  left: 50%;
  margin-left: -150px; /* Połowa szerokości (300/2) */
  
  /* Cień dla głębi */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  
  /* STAN UKRYTY (Domyślny) */
  opacity: 0.2;
  filter: blur(4px) grayscale(100%);
  transform: scale(0.9);
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none; /* Klikalne dopiero po aktywacji */
}

/* TYPOGRAFIA WEWNĄTRZ KARTY */

.timeline-content-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  /* Subtelny gradient na tekście nagłówka */
  background: linear-gradient(to right, #fff, #ccc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; 
  /* Fallback dla przeglądarek bez clip:text */
  background-clip: text;
}

.timeline-content-card p {
  font-size: 0.85rem;
  color: #a1a1aa; /* Zinc-400 - czytelny szary */
  margin-bottom: 16px;
  line-height: 1.6; /* Większy oddech między liniami */
}

/* STYLIZACJA TAGÓW (np. "Teoria", "NLP") */
.timeline-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  
  /* Wygląd techniczny badge'a */
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

/* Interakcja z kartą po najechaniu (tylko gdy aktywna) */
.timeline-item.activated .timeline-content-card:hover {
  border-color: var(--accent);
  transform: scale(1.02) translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.timeline-item.activated .timeline-content-card:hover h4 {
  background: var(--accent); /* Nagłówek zmienia się na czerwony */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.timeline-item.activated .timeline-content-card:hover .timeline-tag {
  background: rgba(187, 22, 43, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

/* --- POZYCJONOWANIE (Bez zmian logicznych, tylko dopasowanie) --- */

.timeline-content-card.top {
  bottom: 50%;
  margin-bottom: 60px; /* Odsunięcie od osi */
}

.timeline-content-card.bottom {
  top: 50%;
  margin-top: 60px; /* Odsunięcie od osi */
}

/* Linie łączące (Dopasowane do nowego marginu) */
.timeline-content-card::before {
  content: ''; 
  position: absolute; 
  left: 50%; 
  width: 1px; /* Cieńsza, bardziej elegancka linia */
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.3)); 
  height: 60px; 
  opacity: 0.3; 
  transition: opacity 0.5s;
  transform: translateX(-50%);
}

.timeline-content-card.bottom::before {
  background: linear-gradient(to top, transparent, rgba(255,255,255,0.3)); 
}

/* POZYCJONOWANIE GÓRA/DÓŁ */
/* Karta GÓRA */
.timeline-content-card.top {
  bottom: 50%;
  margin-bottom: 70px; /* Odsunięcie od osi */
}
.timeline-item:has(.top) .timeline-date-label {
  top: 50%; margin-top: 50px;
}

/* Karta DÓŁ */
.timeline-content-card.bottom {
  top: 50%;
  margin-top: 70px; /* Odsunięcie od osi */
}
.timeline-item:has(.bottom) .timeline-date-label {
  bottom: 50%; margin-bottom: 50px;
}

/* LINIE ŁĄCZĄCE (PIONOWE) */
.timeline-content-card::before {
  content: ''; 
  position: absolute; 
  left: 50%; 
  width: 2px;
  background: var(--border); 
  height: 70px; /* Musi odpowiadać margin-bottom/top karty */
  opacity: 0.3; 
  transition: opacity 0.5s, background 0.5s;
  /* ZMIANA: Idealne centrowanie cienkiej linii */
  transform: translateX(-50%);
}

/* Łącznik dla karty górnej - wychodzi z dołu karty */
.timeline-content-card.top::before { 
  top: 100%; 
}

/* Łącznik dla karty dolnej - wychodzi z góry karty */
.timeline-content-card.bottom::before { 
  bottom: 100%; 
}

/* --- AKTYWACJA (GDY KULKA NAJEDZIE) --- */
.timeline-item.activated .timeline-content-card {
  opacity: 1;
  filter: blur(0) grayscale(0);
  transform: scale(1);
  pointer-events: auto;
  border-color: var(--border-hover);
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  z-index: 20; /* Wyciągamy na wierzch */
}

.timeline-item.activated .timeline-date-label {
  opacity: 1; 
  color: var(--text-primary); 
  transform: translateX(-50%) scale(1.1);
}

.timeline-item.activated .timeline-marker {
  background: var(--accent); 
  border-color: white; 
  transform: translate(-50%, -50%) scale(1.4);
  box-shadow: 0 0 20px var(--accent);
}

/* Podświetlenie linii łączącej */
.timeline-item.activated .timeline-content-card::before {
  opacity: 1; 
  background: linear-gradient(to bottom, var(--accent), transparent);
}
.timeline-item.activated .timeline-content-card.bottom::before {
  background: linear-gradient(to top, var(--accent), transparent);
}

/* Hover na odkrytą kartę */
.timeline-item.activated .timeline-content-card:hover {
  border-color: var(--accent); 
  transform: scale(1.03) translateY(-5px);
}

/* Specjalne style dla przyszłości (zielony) */
.timeline-item.future .timeline-marker { border-color: #10b981; }
.timeline-item.future.activated .timeline-marker { background: #10b981; box-shadow: 0 0 20px #10b981; }
.timeline-item.future.activated .timeline-content-card { border-color: rgba(16, 185, 129, 0.3); }
.timeline-item.future.activated .timeline-content-card::before { background: linear-gradient(to bottom, #10b981, transparent); }

/* --- TIMELINE MODAL STYLING (IMPROVED) --- */

/* Kontener modala - dodajemy subtelną poświatę i lepsze tło */
.timeline-modal-content {
  background: #0f0f10; /* Bardzo ciemny szary, nie czysty czarny */
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.5), 
    0 0 0 1px rgba(255, 255, 255, 0.05); /* Subtelny obrys */
  border-radius: 24px;
  max-width: 550px; /* Nieco węższy dla lepszej czytelności tekstu */
  overflow: hidden;
  position: relative;
}

/* Ozdobny pasek na górze (Gradient akcentu) */
.timeline-modal-content::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #ff6b7a);
}

/* Nagłówek modala */
.t-modal-header {
  padding: 40px 40px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Badge z rokiem - wygląda nowocześnie i technicznie */
.t-modal-year {
  display: inline-block;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(187, 22, 43, 0.15); /* Półprzezroczysty czerwony */
  color: #ff6b7a; /* Jaśniejszy czerwony dla czytelności */
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  border: 1px solid rgba(187, 22, 43, 0.3);
  font-family: 'SF Mono', monospace; /* Techniczny font (opcjonalnie) */
}

/* Tytuł - biały, duży, czytelny */
.t-modal-title {
  color: #ffffff;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Treść - szara, z dużym oddechem */
.t-modal-body {
  padding: 0 40px 40px 40px;
  color: #d4d4d8; /* Jasny szary (Zinc-300) */
  font-size: 1.05rem;
  line-height: 1.8; /* Kluczowe dla czytelności! */
  font-weight: 400;
}

/* Przycisk zamknięcia - bardziej elegancki */
.t-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.05); /* Lekkie tło */
  border: none;
  border-radius: 50%; /* Okrągły kształt */
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  display: flex; /* Centrowanie ikony X */
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10; /* Musi być na wierzchu */
}

.t-modal-close:hover {
  background: rgba(255,255,255,0.15);
  color: white;
  transform: rotate(90deg); /* Obrót przy najechaniu */
}

/* =========================================
   POPRAWKI DLA LIGHT MODE (OSI CZASU)
   ========================================= */

/* 1. Główna linia pozioma (Oś) - zmiana z białej na ciemną */
[data-theme="light"] .main-line {
  background: rgba(0, 0, 0, 0.15);
}

/* 2. Daty (np. 1950, 1956) - muszą być ciemne */
[data-theme="light"] .timeline-date-label {
  color: var(--text-primary); /* Używa globalnego koloru tekstu (czarny/szary) */
  opacity: 0.5; /* Nieco mocniejsze w jasnym trybie */
}

/* 3. Linie pionowe łączące karty z osią */
/* Domyślnie są białym gradientem, musimy zmienić na czarny gradient */

[data-theme="light"] .timeline-content-card::before {
  /* Dla kart górnych (linia idzie w dół) */
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.2));
}

[data-theme="light"] .timeline-content-card.bottom::before {
  /* Dla kart dolnych (linia idzie w górę) */
  background: linear-gradient(to top, transparent, rgba(0,0,0,0.2));
}

/* 4. Karty w trybie jasnym (Opcjonalnie) 
   Jeśli chcesz, aby karty też stały się jasne (białe szkło), odkomentuj poniższe.
   Jeśli wolisz, żeby zostały czarne (dla kontrastu), zostaw zakomentowane.
*/

[data-theme="light"] .timeline-content-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .timeline-content-card h4 {
  /* Reset gradientu tekstu na zwykły ciemny kolor */
  background: none;
  -webkit-text-fill-color: initial;
  color: #111;
}

[data-theme="light"] .timeline-content-card p {
  color: #555;
}

[data-theme="light"] .timeline-tag {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #444;
}

/* Hover w jasnym trybie */
[data-theme="light"] .timeline-item.activated .timeline-content-card:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* =========================================
   LIGHT MODE: TIMELINE & MODAL FIX
   Naprawa wyglądu kart i okien na jasnym tle
   ========================================= */

/* --- 1. KARTY (Timeline Cards) w Light Mode --- */
[data-theme="light"] .timeline-content-card {
  /* Zmieniamy tło z ciemnego na mleczno-białe */
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.08);
  border-top-color: rgba(255, 255, 255, 0.6);
  
  /* Lżejszy cień, żeby nie wyglądało jak "brudne" */
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.02),
    0 12px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .timeline-content-card h4 {
  /* Tytuł na ciemny kolor (zamiast białego) */
  color: #18181b;
  background: none;
  -webkit-text-fill-color: initial; /* Reset gradientu tekstu */
}

[data-theme="light"] .timeline-content-card p {
  color: #52525b; /* Ciemniejszy szary dla czytelności */
}

/* Tagi (np. "Teoria") w Light Mode */
[data-theme="light"] .timeline-tag {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
  color: #444;
}

/* Hover na kartę w Light Mode */
[data-theme="light"] .timeline-item.activated .timeline-content-card:hover {
  background: #ffffff; /* Pełna biel przy najechaniu */
  border-color: var(--accent);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

/* --- 2. MODAL (Okienko szczegółów) w Light Mode --- */
[data-theme="light"] .timeline-modal-content {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15); /* Delikatniejszy cień */
}

/* Tytuł w modalu */
[data-theme="light"] .t-modal-title {
  color: #111111;
  text-shadow: none; /* Usuwamy cień pod tekstem */
}

/* Treść w modalu */
[data-theme="light"] .t-modal-body {
  color: #4b5563; /* Szary (Gray-600) */
}

/* Przycisk zamknięcia (X) w modalu */
[data-theme="light"] .t-modal-close {
  background: rgba(0, 0, 0, 0.05);
  color: #333;
}

[data-theme="light"] .t-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #000;
}

/* Badge z rokiem w modalu */
[data-theme="light"] .t-modal-year {
  background: rgba(187, 22, 43, 0.1); /* Zostawiamy akcent, ale tło jaśniejsze */
  color: var(--accent);
  border-color: rgba(187, 22, 43, 0.2);
}

/* --- PROGRESS BAR ROZDZIAŁU --- */
.chapter-progress {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 32px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.progress-track {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.5s ease;
}

/* --- FLIPCARDS (Karty obracane) --- */
.flip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.flip-card {
    background-color: transparent;
    height: 220px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 16px;
}

.flip-card.flipped .flip-card-inner,
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border);
}

.flip-card-front {
    background-color: var(--bg-secondary);
}

.flip-card-back {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    transform: rotateY(180deg);
    border-color: var(--accent);
}

.flip-card-front .icon-box {
    font-size: 3rem;
    margin-bottom: 16px;
}

.flip-card-front h4 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.flip-card-front span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.flip-card-back p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

/* --- TABS (Zakładki) --- */
.tabs-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.tabs-header {
    display: flex;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.02);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: rgba(187, 22, 43, 0.05);
}

.tab-content {
    display: none;
    padding: 32px;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

.check-list, .cross-list {
    list-style: none;
    padding: 0;
}

.check-list li, .cross-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.cross-list li::before {
    content: '✕';
    position: absolute;
    left: 0;
    color: #ef4444;
    font-weight: bold;
}

/* --- ACCORDION (Stylizacja) --- */
.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8rem;
    margin-right: 12px;
    color: var(--text-muted);
}

.accordion-item:hover .step-badge {
    border-color: var(--accent);
    color: var(--accent);
}

.prompt-example {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid #10b981;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* --- FLASHCARDS (Quiz Widget) --- */
.flashcard-widget {
    perspective: 1000px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    height: 300px;
}

.flashcard-container {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.flashcard-container.is-flipped {
    transform: rotateY(180deg);
}

.flashcard-face {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.flashcard-face.front {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.flashcard-face.back {
    background: var(--bg-tertiary);
    border-color: var(--accent);
    transform: rotateY(180deg);
}

.card-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 24px;
    font-weight: 700;
}

.flashcard-face p {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.5;
}

.click-hint {
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.6;
}

.fc-controls {
    margin-top: 32px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* --- SCROLL-BASED PROGRESS BAR --- */
.sticky-progress {
    position: sticky;
    top: 80px; /* Poniżej nawigacji */
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    margin-bottom: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--accent);
}

/* --- SECTOR MATRIX (GRID) --- */
.sector-matrix-container {
    display: grid;
    /* Przywracamy oryginalny podział 50/50, dzięki temu kafelki będą duże */
    grid-template-columns: repeat(2, 1fr); 
    gap: 32px;
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 20px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    
    /* JEDYNA NOWA LINIJKA - zapobiega kurczeniu się kontenera */
    min-height: 350px; 
}

.sector-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2x2 grid */
    gap: 12px;
}

.sector-tile {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    aspect-ratio: 0.1/0.1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sector-tile:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.sector-tile.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.sector-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.sector-name {
    font-size: 0.75rem;
    font-weight: 600;
}

.sector-display {
    margin-top: 0px !important; /* Duży odstęp od kafelków */
	margin-left: 0px !important; /* Duży odstęp od kafelków */
    position: relative;
    z-index: 5;
    
    /* Dodajemy tło i cień, żeby tekst był czytelny nawet jakby coś najechało */
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.matrix-grid {
    margin-bottom: 32px !important;
}

.sector-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.sector-content.active {
    display: block;
}

.display-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tag-highlight {
    background: rgba(187, 22, 43, 0.15);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.display-list {
    margin-left: 20px;
    color: var(--text-secondary);
}

.display-list li {
    margin-bottom: 8px;
}

/* --- HORIZONTAL SCANNER CAROUSEL (Fixed Layout) --- */
.case-study-wrapper {
    position: relative;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Ukrywa pasek przewijania kontenera rodzica */
}

.case-study-carousel {
    display: flex;
    gap: 32px;
    overflow-x: auto;
    /* Padding: Lewy=24px (start), Prawy=50vw (miejsce na dojazd ostatniej karty) */
    padding: 40px 50vw 40px 24px; 
    scroll-behavior: auto;
    scrollbar-width: none;
    scroll-snap-type: none; /* Wyłączone przyciąganie dla płynności */
	cursor: grab; /* Łapka domyślna */
    user-select: none; /* Zapobiega zaznaczaniu tekstu podczas ciągnięcia */
    /* Upewnij się, że overflow jest ustawiony (powinno już być w Twoim CSS) */
    overflow-x: auto; 
    scrollbar-width: none; /* Ukrywa pasek przewijania (opcjonalne) */
}
.case-study-carousel.active {
    cursor: grabbing; /* Łapka zaciśnięta podczas ciągnięcia */
    cursor: -webkit-grabbing;
}
.case-study-carousel::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.case-card {
    /* Sztywne wymiary są kluczowe dla obliczeń JS */
    width: 280px;      /* Zmienione z min/max-width na width */
    min-width: 280px; 
    flex-shrink: 0;    /* Zapobiega ściskaniu kart */
    
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    
    /* Efekt Focus/Blur */
    opacity: 0.3;
    filter: blur(2px) grayscale(100%);
    transform: scale(0.95);
    transition: all 0.3s ease-out;
}

/* --- STAN AKTYWNY (JS) --- */
.case-card.active {
    opacity: 1;
    filter: blur(0) grayscale(0);
    transform: scale(1);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    z-index: 10;
}

/* --- FORMATOWANIE TREŚCI (Przywrócone) --- */
.case-logo {
    font-weight: 800;
    font-size: 1.4rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.case-card.active .case-logo.walmart { color: #0071dc; }
.case-card.active .case-logo.unilever { color: #1f36c7; }
.case-card.active .case-logo.cola { color: #f40009; }
.case-card.active .case-logo.ing { color: #ff6200; }

.case-body h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.case-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.case-stat {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
}

.stat-val {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 4px;
}

.case-card.active .stat-val {
    color: var(--accent);
}

.stat-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* --- TOOL DASHBOARD --- */
.tool-dashboard {
    display: flex;
    gap: 20px;
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 8px;
    border: 1px solid var(--border);
    min-height: 350px;
}

.tool-sidebar {
    width: 140px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-opt {
    padding: 12px 16px;
    background: transparent;
    border: none;
    text-align: left;
    color: var(--text-secondary);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-opt:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.tool-opt.active {
    background: var(--bg-tertiary);
    color: var(--accent);
    font-weight: 600;
}

.tool-viewport {
    flex: 1;
    background: var(--bg-tertiary);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.tool-screen {
    display: none;
    animation: slideInRight 0.3s ease;
}

.tool-screen.active {
    display: block;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.screen-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.app-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    color: white;
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-pill {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* --- SCENARIO GAME --- */
.scenario-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
}

.scenario-question {
    margin-bottom: 24px;
}

.scenario-question h4 {
    color: var(--accent);
    margin-bottom: 8px;
}

.scenario-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scen-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.scen-btn:hover {
    border-color: var(--accent);
    background: rgba(187, 22, 43, 0.05);
}

.btn-letter {
    width: 32px;
    height: 32px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-muted);
}

.scen-btn:hover .btn-letter {
    background: var(--accent);
    color: white;
}

.scenario-feedback {
    margin-top: 24px;
    padding: 20px;
    border-radius: 12px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.feedback-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    color: #10b981;
}

.feedback-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 800px) {
    .sector-matrix-container {
        display: flex;
        flex-direction: column;
        gap: 32px; /* Odstęp między gridem a tekstem na mobile */
    }
    
    .sector-display {
        margin-top: 24px !important;
    }
}
@media (max-width: 768px) {
    .sector-matrix-container {
        grid-template-columns: 1fr;
    }
    
    .sector-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .tool-dashboard {
        flex-direction: column;
    }
    
    .tool-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 8px;
    }
    
    .tool-opt {
        white-space: nowrap;
    }
}

/* --- MODULE 4: SECURITY STYLES --- */

/* 1. RADAR ZAGROŻEŃ */
.radar-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    background: #050505; /* Bardzo ciemne tło dla kontrastu */
    border: 1px solid #333;
    border-radius: 24px;
    padding: 32px;
    overflow: hidden;
}

.radar-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.radar-circles {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    border: 1px solid rgba(16, 185, 129, 0.3); /* Zielony hakerski */
    background: radial-gradient(circle, rgba(16,185,129,0.05) 0%, rgba(0,0,0,0) 70%);
}

.r-circle {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px dashed rgba(16, 185, 129, 0.2);
}

.c1 { width: 100px; height: 100px; }
.c2 { width: 200px; height: 200px; }
.c3 { width: 298px; height: 298px; border-style: solid; }

.radar-scan {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(16, 185, 129, 0.4) 60deg, transparent 61deg);
    animation: radar-spin 4s linear infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes radar-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.radar-blip {
    position: absolute;
    width: 32px; height: 32px;
    background: #ef4444; /* Czerwony punkt */
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    padding: 0;
}

.radar-blip:hover {
    transform: scale(1.2);
}

.blip-icon { font-size: 14px; }

/* Pozycje punktów na radarze */
.blip-1 { top: 20%; left: 30%; }
.blip-2 { top: 60%; right: 20%; }
.blip-3 { bottom: 25%; left: 40%; }

.blip-ping {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; height: 100%;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.5);
    animation: blip-pulse 2s infinite;
    z-index: -1;
}

@keyframes blip-pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

/* Prawa strona radaru (Opisy) */
.threat-display {
    padding-left: 20px;
    border-left: 1px solid var(--border);
}

.threat-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.threat-content.active {
    display: block;
}

.threat-icon-lg {
    font-size: 3rem;
    margin-bottom: 16px;
}

.threat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.threat-level {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.threat-level.critical { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.threat-level.high { background: rgba(249, 115, 22, 0.2); color: #f97316; }
.threat-level.medium { background: rgba(234, 179, 8, 0.2); color: #eab308; }

.threat-action {
    margin-top: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #10b981;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
}

/* 2. SYMULATOR ANONIMIZACJI */
.redaction-game-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.redaction-toolbar {
    padding: 16px 24px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-verify {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-verify:hover { background: var(--accent-hover); }

.redaction-paper {
    padding: 32px;
    font-family: 'Courier New', monospace; /* Styl maszyny do pisania */
    line-height: 1.8;
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.redact-word {
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    border: 1px dashed rgba(16, 185, 129, 0.3);
    transition: all 0.2s;
}

.redact-word:hover {
    background: rgba(16, 185, 129, 0.1);
}

.redact-word.censored {
    background: #000; /* Czarny pasek cenzury */
    color: #000;
    border: 1px solid #000;
    cursor: default;
}

.redaction-feedback {
    padding: 16px 24px;
    min-height: 20px;
    font-weight: 600;
    text-align: center;
    border-top: 1px solid var(--border);
}

/* 3. DEEPFAKE INFO */
.deepfake-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.df-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.df-visual {
    height: 100px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.wave-visual {
    width: 100%; height: 100%;
    background: linear-gradient(90deg, #333 0%, #10b981 50%, #333 100%);
    opacity: 0.3;
}

.df-content { padding: 24px; }

.df-info-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* RESPONSIVENESS */
@media (max-width: 800px) {
    .radar-wrapper, .deepfake-container {
        grid-template-columns: 1fr;
    }
    .radar-container {
        width: 250px; height: 250px;
    }
    .r-circle.c3 { width: 248px; height: 248px; }
    .threat-display { border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 24px; }
}
/* --- DEEPFAKE SIMULATOR STYLES --- */

.deepfake-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
}

/* Telefon / Ekran */
.df-phone {
    background: #000;
    border-radius: 24px;
    border: 4px solid #333;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
}

.df-screen {
    background: linear-gradient(180deg, #1a1a1d 0%, #0a0a0b 100%);
    border-radius: 16px;
    padding: 24px 16px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.caller-avatar {
    width: 64px; height: 64px;
    background: #333;
    border-radius: 50%;
    font-size: 32px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px;
    border: 2px solid rgba(255,255,255,0.1);
}

.caller-text strong { display: block; font-size: 1.1rem; color: #fff; }
.caller-text span { font-size: 0.8rem; color: #888; animation: blink 2s infinite; }

@keyframes blink { 50% { opacity: 0.5; } }

/* Fale głosowe (Animacja) */
.voice-waves {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 40px;
    margin: 32px 0;
    opacity: 0.3; /* Domyślnie cicho */
}

.voice-waves .bar {
    width: 4px;
    height: 100%;
    background: #10b981;
    border-radius: 2px;
    transform: scaleY(0.2);
    transition: transform 0.2s;
}

/* Klasa dodawana przez JS podczas "rozmowy" */
.voice-waves.animating .bar {
    animation: soundWave 0.8s ease-in-out infinite;
}
.voice-waves.animating .bar:nth-child(odd) { animation-duration: 0.6s; }
.voice-waves.animating .bar:nth-child(2n) { animation-duration: 1.1s; }

@keyframes soundWave {
    0%, 100% { transform: scaleY(0.2); background: #10b981; }
    50% { transform: scaleY(1); background: #34d399; }
}

/* Efekt GLITCH (gdy wykryto deepfake) */
.voice-waves.glitch .bar {
    background: #ef4444 !important;
    animation: glitchWave 0.2s infinite !important;
}

@keyframes glitchWave {
    0% { transform: scaleY(1); }
    25% { transform: scaleY(0.4); }
    50% { transform: scaleY(0.8); }
    75% { transform: scaleY(0.2); }
    100% { transform: scaleY(0.6); }
}

/* Wynik analizy */
.analysis-result {
    margin-top: auto;
    width: 100%;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.8rem;
    color: #aaa;
    display: none; /* Ukryte domyślnie */
    border: 1px solid rgba(255,255,255,0.1);
}

.analysis-result.alert {
    display: block;
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
    font-weight: bold;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Przyciski */
.df-controls {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-df-action {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    transition: transform 0.2s;
}

.btn-df-action:hover { transform: translateY(-2px); }

.btn-df-action.analyze { background: #3b82f6; color: white; }
.btn-df-action.reject { background: #ef4444; color: white; }

/* Prawa strona */
.df-education {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.df-tip-box {
    background: var(--bg-tertiary);
    padding: 24px;
    border-radius: 16px;
}

.df-tip-box.highlight {
    border: 1px solid #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.df-tip-box h4 { margin-top: 0; font-size: 1rem; }

/* Responsywność */
@media (max-width: 800px) {
    .deepfake-wrapper { grid-template-columns: 1fr; }
    .df-phone { max-width: 320px; margin: 0 auto; }
}

/* =========================================
   LIGHT MODE FIXES (POPRAWKI DLA TRYBU JASNYM)
   ========================================= */

/* --- 1. RADAR ZAGROŻEŃ (Naprawione klasy) --- */
[data-theme="light"] .radar-wrapper {
    background: #f8fafc; /* Jasne tło kontenera */
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Ważne: Zmiana koloru tekstów na ciemny, żeby były widoczne na jasnym tle */
[data-theme="light"] .radar-wrapper h4 {
    color: #1e293b;
}

[data-theme="light"] .radar-wrapper p {
    color: #475569;
}

/* Naprawa widoczności kręgów (używamy klasy .r-circle z Twojego HTML) */
[data-theme="light"] .r-circle {
    border-color: rgba(16, 185, 129, 0.2); /* Delikatna zieleń */
}

/* Dopasowanie skanera */
[data-theme="light"] .radar-scan {
    background: conic-gradient(from 0deg, transparent 0deg, rgba(16, 185, 129, 0.4) 360deg);
}

/* Ikona tarczy */
[data-theme="light"] .radar-wrapper .threat-icon-lg {
    filter: none;
    text-shadow: none;
}

/* Punkty na radarze (Blipy) */
[data-theme="light"] .radar-blip {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* --- 2. GRA W ANONIMIZACJĘ (Twoje style - są OK) --- */
[data-theme="light"] .redaction-game-container {
    background: #ffffff;
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

[data-theme="light"] .redaction-toolbar {
    background: #f9fafb;
    border-bottom-color: rgba(0,0,0,0.05);
}

[data-theme="light"] .redaction-toolbar span {
    color: #1f2937; /* Kolor tekstu statusu */
}

[data-theme="light"] .redaction-paper {
    background: #ffffff;
    color: #1f2937;
}

[data-theme="light"] .redact-word {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.05);
    color: #064e3b; /* Ciemny zielony tekst dla kontrastu */
}

[data-theme="light"] .redact-word:hover {
    background: rgba(16, 185, 129, 0.2);
    cursor: pointer;
}

/* Styl po zamazaniu (kliknięciu) */
[data-theme="light"] .redact-word.censored {
    background: #000000;
    color: #000000;
    border-color: #000000;
}

/* --- 3. SYMULATOR DEEPFAKE (Light Mode) --- */
[data-theme="light"] .deepfake-wrapper {
    background: #ffffff;
    border-color: rgba(0,0,0,0.1);
}

/* Telefon zostawiamy ciemny (to fizyczne urządzenie), ale zmieniamy cień */
[data-theme="light"] .df-phone {
    box-shadow: 0 20px 50px rgba(0,0,0,0.15); /* Delikatniejszy cień na jasnym tle */
    border-color: #e5e7eb; /* Jaśniejsza ramka obudowy */
}

/* Prawa strona symulatora (Edukacja) */
[data-theme="light"] .df-tip-box {
    background: #f3f4f6; /* Jasny szary (Zinc-100) */
    color: #374151;
}

[data-theme="light"] .df-tip-box h4 {
    color: #111827;
}

[data-theme="light"] .df-tip-box.highlight {
    background: #ecfdf5; /* Jasny miętowy */
    border-color: #10b981;
}

/* --- 4. POPRAWKI DLA CASE STUDIES (Moduł 3) --- */
/* Karty w trybie jasnym potrzebują cienia, bo nie mają kontrastu tła */
[data-theme="light"] .case-card {
    background: #ffffff;
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

[data-theme="light"] .case-card.active {
    background: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1); /* Miękki, duży cień */
}

[data-theme="light"] .case-logo {
    border-bottom-color: rgba(0,0,0,0.05);
}

[data-theme="light"] .case-stat {
    border-top-color: rgba(0,0,0,0.05);
}

/* --- 5. LOGO I STOPKA --- */
[data-theme="light"] .logo-placeholder {
    background: #e5e7eb;
    color: #6b7280;
    border-color: #d1d5db;
}

/* --- MODULE 5: LEGAL & ETHICS --- */

/* 1. PIRAMIDA RYZYKA */
/* --- NOWA STYLIZACJA PIRAMIDY (Cyber-Tech Style) --- */

.pyramid-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* Kontener samej piramidy */
.pyramid-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px; /* Mały odstęp między blokami wygląda nowocześniej */
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3)); /* Cień pod całą bryłą */
}

/* Wspólne style dla poziomów */
.pyramid-level {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 70px; /* Wyższe paski, żeby tekst się mieścił */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    
    /* Wygląd domyślny (nieaktywny) - Ciemny z kolorowym obrysem na dole */
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(4px);
    border-bottom: 3px solid transparent; 
    
    /* Typografia */
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    
    /* Zabezpieczenie przed zaznaczaniem tekstu przy klikaniu */
    user-select: none; 
}

/* Ikona na szczycie */
.p-icon { font-size: 1.2rem; margin-top: 4px; display: none; }
.level-1 .p-icon { display: block; } /* Pokaż ikonę tylko na górze */
.level-1 .p-label { font-size: 0.75rem; } /* Mniejszy tekst na szczycie */

/* --- KSZTAŁTY I KOLORY POZIOMÓW (Dopasowane proporcje) --- */

/* 1. NIEDOPUSZCZALNE (Szczyt - poszerzony, aby tekst wszedł) */
.level-1 {
    width: 250px;
    
    /* ZMIANA: Tworzymy idealny trójkąt (szpic na środku: 50% 0) */
    clip-path: polygon(50% 0, 100% 100%, 0% 100%);
    
    border-bottom-color: #ef4444;
    
    /* ZMIANA: Zwiększamy padding od góry, aby wypchnąć tekst w dół,
       tam gdzie trójkąt jest szerszy (inaczej tekst się utnie) */
    padding-top: 200px; 
    padding-bottom: 8px;
    
    white-space: nowrap;
    
    /* Centrowanie Flexbox (dziedziczone z .pyramid-level, ale dla pewności) */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; /* Treść przyklejona do dołu */
}
/* Stan Aktywny / Hover */
.level-1:hover, .level-1.active {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.8) 0%, rgba(185, 28, 28, 0.9) 100%);
    color: white;
    filter: drop-shadow(0 0 15px rgba(239, 68, 68, 0.6));
    z-index: 10;
    transform: scale(1.09);
}

/* 2. WYSOKIE RYZYKO (Dopasowane do szczytu) */
.level-2 { 
    width: 340px; /* +60px względem góry */
    clip-path: polygon(12% 0, 88% 0, 100% 100%, 0% 100%);
    border-bottom-color: #f97316;
}
.level-2:hover, .level-2.active {
    background: linear-gradient(180deg, rgba(249, 115, 22, 0.8) 0%, rgba(194, 65, 12, 0.9) 100%);
    color: white;
    filter: drop-shadow(0 0 15px rgba(249, 115, 22, 0.5));
    z-index: 9;
    transform: scale(1.05);
}

/* 3. OGRANICZONE RYZYKO */
.level-3 { 
    width: 440px; /* +60px względem wyższego poziomu */
    clip-path: polygon(10% 0, 90% 0, 100% 100%, 0% 100%);
    border-bottom-color: #eab308;
}
.level-3:hover, .level-3.active {
    background: linear-gradient(180deg, rgba(234, 179, 8, 0.8) 0%, rgba(161, 98, 7, 0.9) 100%);
    color: white;
    filter: drop-shadow(0 0 15px rgba(234, 179, 8, 0.5));
    z-index: 8;
    transform: scale(1.05);
}

/* 4. MINIMALNE RYZYKO (Podstawa) */
.level-4 { 
    width: 500px; /* +60px względem wyższego poziomu */
    clip-path: polygon(8% 0, 92% 0, 100% 100%, 0% 100%);
    border-bottom-color: #10b981;
}
.level-4:hover, .level-4.active {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.8) 0%, rgba(4, 120, 87, 0.9) 100%);
    color: white;
    filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.5));
    z-index: 7;
    transform: scale(1.05);
}
/* --- PANEL INFORMACYJNY PO PRAWEJ --- */
.legal-info-panel {
    border-left: 1px solid var(--border);
    padding-left: 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.legal-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* Kolorowe akcenty nagłówków */
.legal-header.unacceptable h4 { color: #ef4444; text-shadow: 0 0 10px rgba(239,68,68,0.3); }
.legal-header.high h4 { color: #f97316; text-shadow: 0 0 10px rgba(249,115,22,0.3); }
.legal-header.limited h4 { color: #eab308; text-shadow: 0 0 10px rgba(234,179,8,0.3); }
.legal-header.minimal h4 { color: #10b981; text-shadow: 0 0 10px rgba(16,185,129,0.3); }

.legal-header h4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.legal-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-top: 12px;
}

/* RESPONSIVENESS */
@media (max-width: 900px) {
    .pyramid-wrapper {
        grid-template-columns: 1fr;
        padding: 24px;
        gap: 40px;
    }
    
    .legal-info-panel {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--border);
        padding-top: 24px;
    }
    
    /* Skalowanie piramidy na mobile */
    .pyramid-container { transform: scale(0.85); }
}

/* --- BRAKUJĄCY KOD ODPOWIADAJĄCY ZA PRZEŁĄCZANIE TREŚCI --- */

.legal-content {
    display: none; /* KLUCZOWE: Ukrywa wszystkie treści domyślnie */
    animation: fadeIn 0.4s ease; /* Dodaje ładne wejście */
}

.legal-content.active {
    display: block; /* Pokazuje TYLKO treść z klasą 'active' */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* FIX DLA JASNEGO MOTYWU */
[data-theme="light"] .pyramid-level {
    background: rgba(0,0,0,0.05);
    color: #555;
    text-shadow: none;
}
[data-theme="light"] .pyramid-level:hover,
[data-theme="light"] .pyramid-level.active {
    color: white; /* Tekst na aktywnym zawsze biały */
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-red { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.badge-orange { background: rgba(249, 115, 22, 0.2); color: #f97316; }
.badge-yellow { background: rgba(234, 179, 8, 0.2); color: #eab308; }
.badge-green { background: rgba(16, 185, 129, 0.2); color: #10b981; }

/* 2. COPYRIGHT QUIZ */
.copyright-court {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.court-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.court-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.court-icon { font-size: 2rem; margin-bottom: 16px; }

.court-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-court {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-court:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.court-feedback {
    margin-top: 16px;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    font-size: 0.9rem;
    display: none; /* Ukryte domyślnie */
    border-left: 3px solid var(--accent);
    animation: fadeIn 0.3s ease;
}

/* RESPONSIVENESS */
@media (max-width: 800px) {
    .pyramid-wrapper { flex-direction: column; }
    .legal-info-panel { border-left: none; border-top: 1px solid var(--border); padding-left: 0; padding-top: 24px; width: 100%; }
}

/* --- LIGHT MODE OVERRIDES --- */
[data-theme="light"] .pyramid-wrapper,
[data-theme="light"] .court-card {
    background: #ffffff;
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

[data-theme="light"] .pyramid-level {
    color: rgba(0,0,0,0.6);
}
[data-theme="light"] .pyramid-level.active {
    color: #fff;
}
[data-theme="light"] .court-feedback {
    background: #f3f4f6;
    color: #374151;
}
[data-theme="light"] .btn-court:hover {
    background: #f9fafb;
    color: #000;
}

/* --- MODUŁ 6: QUIZ KOŃCOWY --- */

.quiz-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* Pasek Postępu */
.quiz-progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    margin-bottom: 32px;
    overflow: hidden;
}

.quiz-progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.5s ease;
}

/* Karta Pytania */
.quiz-question-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.quiz-option-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    padding: 16px 20px;
    border-radius: 12px;
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
}

.quiz-option-btn:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* Stan zaznaczenia */
.quiz-option-btn.selected {
    background: rgba(59, 130, 246, 0.15); /* Niebieski tint */
    border-color: #3b82f6;
    color: white;
}

.circle-check {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    flex-shrink: 0;
}
.quiz-option-btn.selected .circle-check {
    background: #3b82f6;
    border-color: #3b82f6;
}

/* Checkbox (dla wielokrotnego wyboru) */
.square-check {
    width: 20px; height: 20px;
    border-radius: 4px;
    border: 2px solid var(--text-muted);
    flex-shrink: 0;
}
.quiz-option-btn.selected .square-check {
    background: #3b82f6;
    border-color: #3b82f6;
}

/* Przycisk Dalej */
.btn-next-q {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    float: right;
    transition: opacity 0.3s;
}
.btn-next-q:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

/* Ekran Wyników */
.quiz-results {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.score-circle {
    width: 120px; height: 120px;
    border-radius: 50%;
    border: 6px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin: 0 auto 24px;
    font-size: 3rem;
    font-weight: 800;
    color: white;
    background: rgba(59, 130, 246, 0.1);
}

.score-circle small { font-size: 1rem; color: var(--text-muted); }

.feedback-list {
    text-align: left;
    margin-top: 32px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.feedback-item {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border-left: 4px solid #333;
}

.feedback-item.correct { border-left-color: #10b981; }
.feedback-item.wrong { border-left-color: #ef4444; }

.feedback-q { font-weight: 700; margin-bottom: 8px; display: block; }
.feedback-ans { font-size: 0.9rem; color: var(--text-secondary); }

/* Styl dla przycisku "Sprawdź się ponownie" */
/* Używamy ID #btnRestartQuiz dla pewności, że styl nadpisze domyślne ustawienia */
#btnRestartQuiz {
    /* Reset domyślnego wyglądu przycisku */
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    
    /* Układ i odstępy */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 28px;
    margin-top: 32px;
    border-radius: 8px;
    
    /* Tekst */
    color: var(--text-secondary, #a1a1aa);
    font-family: inherit; /* Dziedzicz czcionkę z body */
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    /* Interakcja */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stan po najechaniu (Hover) */
#btnRestartQuiz:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent, #3b82f6); /* Użyj zmiennej accent lub domyślnego niebieskiego */
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.5);
}

/* Styl dla ikony SVG wewnątrz przycisku */
#btnRestartQuiz svg {
    width: 18px;
    height: 18px;
    color: currentColor; /* Ikona przyjmuje kolor tekstu */
    transition: transform 0.5s ease;
}

/* Obrót ikony po najechaniu */
#btnRestartQuiz:hover svg {
    transform: rotate(-180deg);
    color: var(--accent, #3b82f6);
}

/* Responsywność */
@media (max-width: 768px) {
    #btnRestartQuiz {
        width: 100%;
        margin-top: 24px;
    }
}
/* 4. Przycisk odpowiedzi (STYLE BAZOWE) */
.quiz-option-btn {
    cursor: pointer;
    padding: 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.checkbox-indicator {
    width: 20px;
    height: 20px;
    border: 2px solid #64748b; /* Szary obrys domyślny */
    flex-shrink: 0;
}

.opt-text {
    pointer-events: none;
    font-size: 1rem;
}

/* --- TRYB CIEMNY (High Contrast Fix) --- */
[data-theme="dark"] .quiz-instruction {
    color: #94a3b8; /* Jasny szaroniebieski (bardzo czytelny na czarnym) */
}

[data-theme="dark"] .quiz-option-btn {
    background: rgba(255, 255, 255, 0.05); /* Lekko jasne tło */
    border-color: rgba(255, 255, 255, 0.1);
    color: #f1f5f9; /* PRAWIE BIAŁY TEKST - KLUCZOWE DLA KONTRASTU */
}

[data-theme="dark"] .quiz-option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .checkbox-indicator {
    border-color: #94a3b8;
}

/* --- TRYB JASNY --- */
[data-theme="light"] .quiz-instruction {
    color: #64748b; /* Ciemnoszary */
}

[data-theme="light"] .quiz-option-btn {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #1e293b; /* Ciemny tekst */
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

[data-theme="light"] .quiz-option-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

/* --- STAN ZAZNACZENIA (Wspólny) --- */
.quiz-option-btn.selected {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: #3b82f6 !important;
    color: #3b82f6 !important; /* Niebieski tekst po zaznaczeniu */
}

.quiz-option-btn.selected .checkbox-indicator {
    background: #3b82f6;
    border-color: #3b82f6;
}

/* Light Mode Fixes */
[data-theme="light"] .quiz-wrapper { background: #fff; border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .quiz-option-btn { background: #f9fafb; color: #374151; }
[data-theme="light"] .quiz-option-btn:hover { background: #f3f4f6; }
[data-theme="light"] .score-circle { color: #3b82f6; }

/* --- SŁOWNIK MENEDŻERA AI (Karty Rozwijane) --- */

.dict-card {
    /* Na start: Mały, zgrabny kafelek z samym hasłem */
    height: 220px !important; 
    cursor: pointer;
    perspective: 1000px;
    
    /* Płynna animacja wzrostu */
    transition: height 0.4s ease-in-out;
}

/* Stan ROZWINIĘTY (po najechaniu lub kliknięciu) */
.dict-card:hover, .dict-card.flipped {
    /* Duża wysokość, żeby zmieścić definicję */
    height:  550px !important; 
	width:  250px !important; 
    z-index: 20; /* Wyciągnij ponad inne elementy */
}

/* Mechanizm obracania */
.dict-card:hover .flip-card-inner, .dict-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

/* TYŁ KARTY (Definicja) */
.dict-card .flip-card-back {
    align-items: flex-start;
    text-align: left;
    padding: 24px;
    
    /* Zabezpieczenie: jeśli definicja jest OGROMNA, pojawi się suwak, 
       ale przy height: 400px zazwyczaj nie będzie potrzebny. */
    overflow-y: auto; 
    
    /* Wyśrodkowanie w pionie dla krótszych definicji */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* PRZÓD KARTY (Hasło) */
.dict-card .flip-card-front {
    /* Wyśrodkowanie hasła idealnie na środku */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* MOBILE */
@media (max-width: 600px) {
    .dict-card { height: 200px !important; }
    /* Na telefonie karty muszą być jeszcze wyższe po otwarciu */
    .dict-card:hover, .dict-card.flipped { height: 450px !important; }
}

/* --- POPRAWKA TYŁU KARTY SŁOWNIKA --- */

/* 1. Wymuszamy duży rozmiar ikony na odwrocie */
.dict-card .flip-card-back .icon-box {
    font-size: 3rem !important;  /* Kluczowe: duża ikona */
    width: 80px !important;      /* Sztywna szerokość kontenera */
    height: 80px !important;     /* Sztywna wysokość */
    margin: 0 auto 16px auto !important; /* Wyśrodkowanie */
    
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05); /* Delikatne tło */
    border-radius: 16px;
    color: var(--text-primary);
}

/* 2. Wymuszamy wyśrodkowanie i rozmiar tytułu */
.dict-card .flip-card-back h4 {
    text-align: center !important;
    font-size: 1.5rem !important;
    width: 100%;
    display: block;
}

/* 3. Wymuszamy wyśrodkowanie małego podpisu pod tytułem */
.dict-card .flip-card-back span {
    text-align: center !important;
    display: block;
    width: 100%;
}

/* 4. Linia oddzielająca (jeśli użyłeś diva z border-bottom w HTML) */
.dict-card .flip-card-back > div:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}







/* =========================================
   WYNIK QUIZU - WYKRES KOŁOWY I DETALE
   ========================================= */

/* --- KONTENER GŁÓWNY --- */
.result-chart-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    position: relative;
    width: 100%;
    /* Usunięto content: 'ZALICZENIE' z before/after */
}

/* 2. Sam wykres (Koło) */
.result-chart {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 0 auto;
}

/* SVG - obracamy o -90deg, żeby pasek startował od samej góry (godz. 12:00) */
.result-chart svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg); 
    overflow: visible; /* Ważne, żeby znacznik mógł wystawać poza SVG */
}

.bg-ring {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05); /* Ciemne tło paska */
    stroke-width: 4; /* Nieco grubszy dla lepszego wyglądu */
}

.progress-ring {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 565; /* Obwód koła dla r=90 */
    stroke-dashoffset: 565; /* Start od 0 */
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 3. TREŚĆ W ŚRODKU (Naprawa nakładania się) --- */
.chart-content {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    
    /* TE LINIE ODPOWIADAJĄ ZA UKŁAD PIONOWY: */
    display: flex;
    flex-direction: column; /* <--- To ustawia elementy jeden POD drugim */
    justify-content: center;
    align-items: center;
    z-index: 10;
    gap: 8px; /* Odstęp między napisem a liczbą */
}

.score-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin: 0; /* Reset marginesów, używamy gap w rodzicu */
}

#percentText {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.result-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

/* Upewniamy się, że ikona w środku się nie obraca */
.result-icon svg {
    width: 100%;
    height: 100%;
    transform: none !important; 
}

/* Kolory */
.passed .progress-ring { stroke: #10b981; }
.passed .result-icon { color: #10b981; }
.failed .progress-ring { stroke: #ef4444; }
.failed .result-icon { color: #ef4444; }

/* --- 4. ZNACZNIK ZALICZENIA (PASSING MARKER) --- */
/* --- ZNACZNIK ZALICZENIA (POPRAWIONA POZYCJA LINII) --- */

.passing-marker {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 5;
    
    /* Ustawienie na godzinę ~8:00 (80%) */
    transform: rotate(198deg) !important;
}

/* Kropka - dokładnie na krawędzi */
.marker-dot {
    position: absolute;
    top: 50%; 
    right: -5px; /* Delikatnie wysunięta poza obrys */
    width: 10px; height: 10px;
    background: var(--bg-secondary); /* Tło w kolorze strony, żeby zakryć linię pod spodem */
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    transform: translateY(-50%);
    z-index: 2; /* Kropka nad linią */
}

/* Linia - ODSUNIĘTA OD KOŁA */
.marker-line {
    position: absolute;
    top: 50%; 
    
    /* Długość linii */
    width: 80px; 
    
    /* KLUCZOWA POPRAWKA:
       Ustawiamy right na minusową wartość WIĘKSZĄ niż szerokość linii.
       Dzięki temu linia zaczyna się DOPIERO ZA KROPKĄ, na zewnątrz koła.
       -80px (szerokość) - 5px (odstęp) = -85px
    */
    right: -85px; 
    
    height: 1px;
    background: var(--text-muted);
    opacity: 0.6;
    transform: translateY(-50%);
    z-index: 1;
}

/* Etykieta tekstu */
/* Etykieta tekstu */
.marker-label {
    position: absolute;
    top: 50%; 
    
    /* ZMIANA: Zbliżamy tekst do linii. 
       Było -195px, teraz -135px (dobrane do długości linii 80px) */
    right: -135px; 
    
    width: 100px;
    text-align: right; /* Wyrównanie do linii */
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.3;
    
    /* Prostowanie tekstu */
    transform: translateY(-50%) rotate(-198deg) !important;
    
    /* Punkt obrotu przyklejony do prawej krawędzi kontenera tekstu */
    transform-origin: center right;
}

.marker-label strong {
    color: var(--text-primary);
    text-transform: uppercase;
    display: block;
}
/* Ukrycie znacznika na bardzo wąskich ekranach, żeby nie wychodził poza ekran */
@media (max-width: 420px) {
    .passing-marker { display: none; }
}

/* --- LANGUAGE SWITCHER --- */
/* --- LANGUAGE SWITCHER (PRZEŁĄCZNIK JĘZYKA) --- */
.lang-switch {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-right: 12px; /* Odstęp od przycisku motywu */
  align-items: center;
}

.lang-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit; /* Dziedziczenie czcionki Inter */
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  line-height: 1;
}

.lang-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

/* Styl dla aktywnego języka */
.lang-btn.active {
  background: var(--accent); /* Czerwony kolor z motywu */
  color: white;
  box-shadow: 0 2px 10px var(--accent-glow); /* Delikatna poświata */
}

/* Korekta dla wersji mobilnej (żeby przyciski były równe) */
.mobile-menu .lang-btn {
    width: 100%;
    padding: 12px;
    font-size: 0.9rem;
}