/* style.css - Neo-Brutalist Meesho Automation Extension Theme */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
  /* Color Tokens */
  --color-bg-main: #fdfbf0;           /* Cream background */
  --color-surface: #ffffff;           /* Card base */
  --color-surface-raised: #ffdb33;    /* Meesho bright yellow */
  --color-border: #000000;            /* Heavy black border */
  --color-text-main: #000000;         /* Pure black text */
  --color-text-muted: #4a4a4a;        /* Charcoal body text */
  --color-text-light: #8a8a8a;       /* Muted gray for crossed-out price */
  --color-accent-red: #ff4747;        /* Red discount badge */

  /* Spacing Scale Tokens */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;

  /* Motion */
  --motion-fast: 150ms;
}

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

body {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  background-color: var(--color-bg-main);
  color: var(--color-text-main);
  padding: var(--space-6) var(--space-4);
  line-height: 1.5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* App Container */
.app-container {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Main Content Area */
main {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Center Align Hero Section */
.hero-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
}

/* Neo-Brutalist Heading */
.hero-heading {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.hero-heading .brand-line {
  font-size: 42px;
  letter-spacing: -0.5px;
}

.hero-heading .highlight-box {
  background-color: #000000;
  color: var(--color-surface-raised);
  padding: var(--space-1) var(--space-4);
  font-size: 46px;
  display: inline-block;
  transform: rotate(-1.5deg);
  border: 3px solid #000000;
}

/* Subtitle description */
.hero-desc {
  font-size: 18px;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Trust Badge */
.trust-badge {
  display: inline-flex;
  align-items: center;
  background-color: var(--color-surface-raised);
  border: 3px solid var(--color-border);
  padding: var(--space-2) var(--space-4);
  font-weight: 700;
  font-size: var(--font-size-xs);
  gap: var(--space-2);
  box-shadow: 3px 3px 0px var(--color-border);
}

/* Social icons overlapping design */
.avatar-group {
  display: flex;
  align-items: center;
}

.avatar-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  margin-right: -6px;
}

.avatar-dot:nth-child(1) { background-color: #3b82f6; }
.avatar-dot:nth-child(2) { background-color: #10b981; }
.avatar-dot:nth-child(3) { background-color: #ef4444; }

/* Price Display */
.price-display {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 700;
  margin: var(--space-2) 0;
}

.price-old {
  font-size: 20px;
  color: var(--color-text-light);
  text-decoration: line-through;
}

.price-new {
  font-size: 36px;
  color: var(--color-text-main);
}

.price-discount {
  background-color: var(--color-accent-red);
  color: #ffffff;
  padding: var(--space-1) var(--space-2);
  font-size: 14px;
  border: 2px solid var(--color-border);
}

/* Neo-Brutalist Button Styling */
.btn-buy {
  background-color: var(--color-surface-raised);
  color: var(--color-text-main);
  border: 3px solid var(--color-border);
  font-size: 20px;
  font-weight: 700;
  padding: var(--space-3) var(--space-6);
  cursor: pointer;
  box-shadow: 4px 4px 0px var(--color-border);
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.btn-buy:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--color-border);
}

.btn-buy:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px var(--color-border);
}

.btn-buy:focus-visible {
  outline: 3px solid var(--color-border);
  outline-offset: 3px;
}

.payment-subtext {
  font-size: 13px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Grid of Clickable Cards */
.clickable-sections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-top: var(--space-4);
}

@media (max-width: 600px) {
  .clickable-sections-grid {
    grid-template-columns: 1fr;
  }
}

/* Clickable Section Card */
.course-card {
  background-color: var(--color-surface);
  border: 3px solid var(--color-border);
  box-shadow: 5px 5px 0px var(--color-border);
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  cursor: pointer;
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, background-color var(--motion-fast) ease;
  text-align: left;
  position: relative;
  text-decoration: none !important;
  color: inherit !important;
}

.course-card * {
  text-decoration: none !important;
}

.course-card:hover {
  background-color: var(--color-surface-raised);
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0px var(--color-border);
}

.course-card:active {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0px var(--color-border);
}

.course-card:focus-visible {
  outline: 3px solid var(--color-border);
  outline-offset: 4px;
}

/* Card Header Icon & Tags */
.card-header-icon {
  font-size: 32px;
  margin-bottom: var(--space-3);
  display: block;
}

.card-tag {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background-color: #000000;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: var(--space-1) var(--space-2);
  text-transform: uppercase;
}

.course-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--color-text-main);
}

.course-card p {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-4);
}

/* Card Thumbnail Placeholder */
.card-thumbnail-placeholder {
  border: 2px dashed var(--color-border);
  background-color: var(--color-bg-main);
  padding: var(--space-4);
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  border-radius: 2px;
  margin-bottom: var(--space-4);
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: background-color var(--motion-fast) ease;
}

.course-card:hover .card-thumbnail-placeholder {
  background-color: #ffffff;
}

/* Card Thumbnail Image */
.card-thumbnail-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border: 2px solid var(--color-border);
  border-radius: 4px;
  margin-bottom: var(--space-4);
  box-shadow: 3px 3px 0px var(--color-border);
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.course-card:hover .card-thumbnail-img {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0px var(--color-border);
}

/* Expandable Subsection Content (Accordion style) */
.subsections-accordion {
  display: none;
  margin-top: var(--space-3);
  border-top: 2px solid var(--color-border);
  padding-top: var(--space-3);
}

.subsections-accordion.active {
  display: block;
}

/* Accordion list */
.accordion-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.accordion-item {
  border: 2px solid var(--color-border);
  background-color: #ffffff;
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 2px 2px 0px var(--color-border);
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.accordion-item:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--color-border);
}

.accordion-item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-main);
}

.accordion-item-duration {
  font-size: 12px;
  background-color: var(--color-bg-main);
  padding: 2px 6px;
  border: 1px solid var(--color-border);
  font-weight: 700;
}

/* Locked Card States */
.course-card.locked {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.course-card.locked:hover {
  background-color: var(--color-surface);
  transform: none;
  box-shadow: 5px 5px 0px var(--color-border);
}

/* Two-column Course Portal Layout (images.html) */
.course-portal-layout {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 1250px;
  margin: 0 auto;
  gap: var(--space-6);
  padding: var(--space-4);
  align-items: flex-start;
}

/* Sidebar Styling */
.portal-sidebar {
  width: 320px;
  flex-shrink: 0;
  background-color: var(--color-surface);
  border: 3px solid var(--color-border);
  box-shadow: 5px 5px 0px var(--color-border);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.sidebar-back-link a {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-main);
  text-decoration: none;
  display: inline-block;
  border-bottom: 2px solid transparent;
}

.sidebar-back-link a:hover {
  border-bottom-color: var(--color-border);
}

.sidebar-header-area h1 {
  font-size: 28px;
  margin-bottom: var(--space-3);
  color: var(--color-text-main);
}

/* Progress Bar Track matching mockup style */
.progress-container {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.progress-label {
  font-size: 12px;
  font-weight: 700;
  background-color: var(--color-text-main);
  color: var(--color-surface-raised);
  padding: 2px 6px;
  border-radius: 20px;
  min-width: 38px;
  text-align: center;
  border: 1px solid var(--color-border);
}

.progress-bar-track {
  flex: 1;
  height: 12px;
  background-color: #e5e5e5;
  border: 2px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--color-surface-raised);
  width: 0%;
  transition: width 0.3s ease;
}

/* Sidebar Dropdown Navigation */
.sidebar-dropdown-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.dropdown-section {
  display: flex;
  flex-direction: column;
}

.dropdown-trigger {
  width: 100%;
  text-align: left;
  background-color: transparent;
  border: none;
  box-shadow: none;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 4px;
  transition: background-color var(--motion-fast) ease;
}

.dropdown-trigger:hover {
  background-color: rgba(0, 0, 0, 0.05);
  transform: none;
  box-shadow: none;
}

.dropdown-trigger:active {
  transform: none;
  box-shadow: none;
}

.chevron-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: transform var(--motion-fast) ease;
}

.dropdown-section.active .chevron-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  list-style: none;
  flex-direction: column;
  gap: 2px;
  padding-left: 10px;
  margin-top: 2px;
}

.dropdown-section.active .dropdown-menu {
  display: flex;
}

.subtopic-link {
  width: 100%;
  text-align: left;
  background: none;
  border: 1.5px solid transparent;
  padding: 4px 8px 4px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: all var(--motion-fast) ease;
  display: block;
  border-radius: 20px;
}

.subtopic-link:hover {
  color: var(--color-text-main);
  background-color: rgba(0, 0, 0, 0.03);
}

.subtopic-link.active {
  background-color: #ffe89c;
  color: var(--color-text-main);
  font-weight: 700;
  border: 1.5px solid var(--color-border);
  box-shadow: none;
}

/* Right Content Panel Styling */
.portal-main-content {
  flex: 1;
  min-width: 0;
}

.content-display-card {
  background-color: var(--color-surface);
  border: 3px solid var(--color-border);
  box-shadow: 6px 6px 0px var(--color-border);
  padding: var(--space-6);
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.content-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
}

.content-card-header h2 {
  font-size: 24px;
  color: var(--color-text-main);
}

.check-btn {
  background-color: #ffffff;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0px var(--color-border);
  transition: all var(--motion-fast) ease;
}

.check-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--color-border);
  stroke-width: 3;
}

.check-btn:hover {
  background-color: var(--color-surface-raised);
}

.check-btn.completed {
  background-color: #10b981;
  border-color: var(--color-border);
}

.check-btn.completed svg {
  stroke: #ffffff;
}

.content-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  font-size: 16px;
  color: var(--color-text-muted);
}

.content-card-body strong {
  color: var(--color-text-main);
}

.content-media-placeholder {
  border: 2px dashed var(--color-border);
  background-color: var(--color-bg-main);
  padding: var(--space-8) var(--space-4);
  text-align: center;
  border-radius: 4px;
  margin-top: var(--space-5);
}

.media-inner {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-light);
}

/* Prompt Bank entry cards */
.prompt-entry {
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  margin-top: 28px;
  overflow: hidden;
  box-shadow: 3px 3px 0px var(--color-border);
}

.prompt-img-wrap {
  background: #f0efeb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-bottom: 1.5px solid var(--color-border);
}

.prompt-img-wrap img {
  max-height: 420px;
  max-width: 100%;
  object-fit: contain;
  display: block;
  border-radius: 2px;
}

.prompt-text {
  background: #fdfbf0;
  padding: 16px 20px;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-stack);
  color: var(--color-text-dark);
  margin: 0;
  border: none;
}

/* Responsive portal design */
@media (max-width: 768px) {
  .course-portal-layout {
    flex-direction: column;
    align-items: stretch;
  }
  
  .portal-sidebar {
    width: 100%;
  }
}

/* Content Links & Video Containers */
.content-card-body a {
  color: #7c3aed;
  text-decoration: underline;
  font-weight: 500;
  transition: color var(--motion-fast) ease;
}

.content-card-body a:hover {
  color: #5b21b6;
}

.video-container-loom {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  border-radius: 6px;
  border: 2px solid var(--color-border);
  margin-bottom: var(--space-4);
  box-shadow: 4px 4px 0px var(--color-border);
}

.video-container-loom iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Resources & Attachments */
.resources-section {
  border-top: 2px solid var(--color-border);
  padding-top: var(--space-4);
  margin-top: var(--space-5);
}

.resources-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.resource-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.resource-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  background-color: var(--color-surface);
  color: var(--color-text-main) !important;
  text-decoration: none !important;
  font-weight: 500;
  font-size: 14px;
  transition: all var(--motion-fast) ease;
  box-shadow: 2px 2px 0px var(--color-border);
}

.resource-item:hover {
  background-color: var(--color-surface-raised) !important;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--color-border);
}

.resource-item:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px var(--color-border);
}

.resource-icon-pdf {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ff4747;
  color: #ffffff;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  border: 1.5px solid var(--color-border);
  flex-shrink: 0;
  line-height: 1;
}


