/* 
  INNEREVO - PORTAL DE ESTUDIANTES STYLESHEET
  Yellow (#FFD300), Cream (#FAF0C9), White (#FFFFFF), Dark (#111111)
  Clean, high-end dashboard styling.
*/

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

:root {
  --yellow: #FFD300;
  --cream: #FAF0C9;
  --white: #FFFFFF;
  --black: #111111;
  --font-title: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --border: 1px solid var(--black);
  --shadow: none;
  --shadow-hover: none;
}

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

body {
  background-color: var(--cream);
  color: var(--black);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--cream);
}
::-webkit-scrollbar-thumb {
  background: var(--yellow);
  border: 1px solid var(--cream);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--black);
}

/* LOGIN SCREEN */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background-color: var(--yellow);
}

.login-card {
  background: var(--white);
  border: var(--border);
  box-shadow: none;
  width: 100%;
  max-width: 450px;
  padding: 3.5rem 2.5rem;
  clip-path: polygon(0 0, 100% 1%, 98% 99%, 1% 100%);
  text-align: center;
}

.login-logo {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  margin-bottom: 0.5rem;
}

.login-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 2.5rem;
  display: block;
}

.login-form {
  text-align: left;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 1rem;
  border: var(--border);
  background-color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--black);
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  background-color: var(--white);
  box-shadow: none;
}

.login-btn {
  width: 100%;
  background-color: var(--black);
  color: var(--white);
  font-family: var(--font-title);
  font-weight: 700;
  text-transform: uppercase;
  padding: 1.1rem;
  border: var(--border);
  box-shadow: none;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: var(--transition);
  margin-top: 1rem;
}

.login-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: none;
}

.login-btn:active {
  transform: translate(1px, 1px);
  box-shadow: none;
}

.login-error {
  margin-top: 1.5rem;
  background-color: #ffe6e6;
  border: 1px solid #ff9999;
  color: #cc0000;
  padding: 0.8rem;
  font-size: 0.85rem;
  font-weight: 500;
  display: none;
}

/* PORTAL DASHBOARD SHELL */
.portal-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.portal-sidebar {
  width: 280px;
  background-color: var(--white);
  border-right: var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 10;
}

.sidebar-brand {
  padding: 2.5rem 2rem;
  border-bottom: 1px solid var(--black);
  display: flex;
  flex-direction: column;
}

.sidebar-title {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.sidebar-subtitle {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #666;
  margin-top: 0.2rem;
}

.sidebar-menu {
  list-style: none;
  padding: 1.5rem 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
}

.menu-item a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  text-decoration: none;
  color: var(--black);
  font-family: var(--font-title);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: var(--transition);
  cursor: pointer;
}

.menu-item a svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--black);
  stroke-width: 2.2px;
  transition: var(--transition);
}

.menu-item:hover a {
  background-color: var(--cream);
  border: var(--border);
  box-shadow: none;
  transform: translate(-2px, -2px);
}

.menu-item.active a {
  background-color: var(--yellow);
  border: var(--border);
  box-shadow: none;
}

.sidebar-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--black);
}

.logout-btn {
  width: 100%;
  background: none;
  border: var(--border);
  color: var(--black);
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.8rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.logout-btn:hover {
  background-color: #ffcccc;
  box-shadow: none;
  transform: translate(-1px, -1px);
}

/* Main Dashboard Panel */
.portal-main {
  flex-grow: 1;
  margin-left: 280px;
  padding: 3rem 4rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--black);
}

.portal-welcome h1 {
  font-size: 2.2rem;
  letter-spacing: -0.02em;
}

.portal-welcome p {
  font-size: 0.95rem;
  color: #555;
  margin-top: 0.3rem;
}

.student-badge {
  background-color: var(--white);
  border: var(--border);
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: none;
}

/* TAB VIEWS (Hidden by default, shown when .active) */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

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

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

/* DASHBOARD OVERVIEW VIEWS */
.overview-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.welcome-banner {
  background-color: var(--white);
  border: var(--border);
  padding: 3.5rem 3rem;
  box-shadow: none;
  clip-path: polygon(0 0, 100% 1%, 99% 99%, 1% 100%);
  margin-bottom: 3rem;
}

.welcome-banner h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.welcome-banner p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #444;
}

.tools-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.tool-card {
  background-color: var(--white);
  border: var(--border);
  padding: 2rem;
  box-shadow: none;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
}

.tool-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: none;
}

.tool-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.tool-card-icon {
  width: 40px;
  height: 40px;
  background-color: var(--cream);
  border: 1px solid var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-card-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--black);
  stroke-width: 2px;
  fill: none;
}

.tool-card-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #666;
}

.tool-card-body h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.tool-card-body p {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.4;
}

.sidebar-status-pane {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.status-box {
  background-color: var(--white);
  border: var(--border);
  padding: 2rem;
  box-shadow: none;
}

.status-box h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--black);
  padding-bottom: 0.5rem;
}

.progress-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.progress-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-label {
  font-size: 0.9rem;
  font-weight: 600;
}

.progress-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background-color: var(--cream);
  border: 1px solid var(--black);
  padding: 2px 6px;
}

/* PLACEHOLDER STATES FOR MODULES (To be replaced in subsequent phases) */
.module-placeholder {
  background-color: var(--white);
  border: var(--border);
  padding: 6rem 4rem;
  box-shadow: none;
  text-align: center;
  clip-path: polygon(1% 0%, 99% 1%, 98% 99%, 0% 98%);
}

.module-placeholder-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  display: block;
}

.module-placeholder h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.module-placeholder p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2.5rem auto;
  line-height: 1.6;
  color: #555;
}

/* Custom difference cursor matching main brand */
.custom-cursor {
  width: 16px;
  height: 16px;
  border: 1px solid var(--white);
  background-color: var(--white);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: width 0.2s, height 0.2s;
}

.custom-cursor-dot {
  width: 4px;
  height: 4px;
  background-color: var(--white);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
}

.custom-cursor.hovered {
  width: 40px;
  height: 40px;
  background-color: transparent;
  border-color: var(--white);
}

/* =========================================
   SKOOL MODULE STYLES (CLASSROOM & COMMUNITY)
   ========================================= */

.skool-header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--black);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.skool-nav-tabs {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  flex-wrap: wrap;
}

.skool-tab-btn {
  background-color: var(--cream);
  border: 1px solid var(--black);
  padding: 0.6rem 1.4rem;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skool-tab-btn:hover {
  background-color: #f7e6a1;
  transform: translateY(-2px);
  box-shadow: none;
}

.skool-tab-btn.active {
  background-color: var(--yellow);
  box-shadow: none;
}

.skool-subtab-content {
  display: none;
}

.skool-subtab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Classroom 2-Column Layout */
.skool-classroom-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  align-items: start;
}

.skool-lesson-pane {
  background-color: var(--white);
  border: var(--border);
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

.skool-video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background-color: var(--black);
  border-bottom: 1px solid var(--black);
  overflow: hidden;
}

.skool-video-wrapper iframe,
.skool-video-wrapper video,
.skool-video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.skool-video-placeholder {
  background: linear-gradient(135deg, #111 0%, #222 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
  padding: 2rem;
  text-align: center;
}

.skool-video-placeholder svg {
  width: 64px;
  height: 64px;
  fill: var(--yellow);
  margin-bottom: 1rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.skool-video-placeholder svg:hover {
  transform: scale(1.1);
}

.skool-lesson-header {
  padding: 1.8rem 2rem;
  border-bottom: 1px solid var(--black);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  background-color: #fff8e1;
}

.skool-lesson-title-area h2 {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.skool-lesson-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #666;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.complete-lesson-btn {
  background-color: var(--white);
  border: 1px solid var(--black);
  padding: 0.7rem 1.2rem;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.complete-lesson-btn:hover {
  background-color: #e8f5e9;
}

.complete-lesson-btn.completed {
  background-color: #4caf50;
  color: var(--white);
}

.skool-lesson-subtabs {
  display: flex;
  border-bottom: 1px solid var(--black);
  background-color: var(--cream);
  overflow-x: auto;
}

.skool-subtab-item {
  padding: 1rem 1.8rem;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border-right: 1px solid var(--black);
  transition: var(--transition);
  white-space: nowrap;
}

.skool-subtab-item:hover {
  background-color: #fceea6;
}

.skool-subtab-item.active {
  background-color: var(--white);
  box-shadow: none;
}

.skool-subtab-body {
  padding: 2rem;
}

/* Lesson Notes & Description */
.lesson-notes-content h3 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
}

.lesson-notes-content h3:first-child {
  margin-top: 0;
}

.lesson-notes-content p {
  line-height: 1.7;
  color: #333;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.lesson-notes-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.lesson-notes-content li {
  margin-bottom: 0.5rem;
}

.timestamp-pill {
  font-family: var(--font-mono);
  background-color: var(--yellow);
  border: 1px solid var(--black);
  padding: 2px 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-block;
  margin-right: 0.5rem;
  box-shadow: none;
}

/* Downloads List */
.resources-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.resource-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--cream);
  border: 1px solid var(--black);
  padding: 1rem 1.5rem;
  transition: var(--transition);
}

.resource-card:hover {
  transform: translateX(4px);
  background-color: #fef5d1;
}

.resource-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.resource-icon {
  font-size: 1.8rem;
}

.resource-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.resource-size {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #666;
}

.resource-download-btn {
  background-color: var(--yellow);
  border: 1px solid var(--black);
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--black);
  text-decoration: none;
  box-shadow: none;
  transition: var(--transition);
}

.resource-download-btn:hover {
  background-color: var(--black);
  color: var(--yellow);
}

/* Modules Sidebar Right */
.skool-modules-sidebar {
  background-color: var(--white);
  border: var(--border);
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

.skool-sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--black);
  background-color: var(--cream);
}

.skool-sidebar-header h3 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.progress-bar-container {
  width: 100%;
  height: 14px;
  background-color: var(--white);
  border: 1px solid var(--black);
  position: relative;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: #4caf50;
  width: 35%;
  transition: width 0.4s ease;
}

.progress-stats-text {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-top: 0.5rem;
  font-weight: 700;
}

.modules-list-accordion {
  display: flex;
  flex-direction: column;
}

.module-group {
  border-bottom: 1px solid var(--black);
}

.module-group:last-child {
  border-bottom: none;
}

.module-header {
  padding: 1.2rem 1.5rem;
  background-color: var(--white);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  transition: background-color 0.2s;
}

.module-header:hover {
  background-color: #fcf6dc;
}

.module-header.expanded {
  background-color: var(--yellow);
}

.module-header-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.module-chevron {
  transition: transform 0.3s;
}

.module-header.expanded .module-chevron {
  transform: rotate(180deg);
}

.module-lessons-list {
  display: none;
  list-style: none;
  background-color: #fafaf8;
  border-top: 1px solid var(--black);
}

.module-header.expanded + .module-lessons-list {
  display: block;
}

.lesson-item {
  padding: 1rem 1.5rem 1rem 2.8rem;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  transition: background-color 0.2s;
}

.lesson-item:last-child {
  border-bottom: none;
}

.lesson-item:hover {
  background-color: #f0eedc;
}

.lesson-item.active {
  background-color: #fffae6;
  font-weight: 700;
  border-left: 1px solid var(--black);
}

.lesson-item-status {
  width: 18px;
  height: 18px;
  border: 1px solid var(--black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  background-color: var(--white);
  flex-shrink: 0;
}

.lesson-item.completed .lesson-item-status {
  background-color: #4caf50;
  color: var(--white);
}

.lesson-item.active .lesson-item-status {
  background-color: var(--yellow);
}

/* =========================================
   SKOOL COMMUNITY & DISCUSSION FEED
   ========================================= */

.skool-community-feed {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-composer {
  background-color: var(--white);
  border: var(--border);
  padding: 1.8rem;
  box-shadow: none;
}

.composer-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.user-avatar {
  width: 44px;
  height: 44px;
  background-color: var(--yellow);
  border: 1px solid var(--black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.composer-input {
  width: 100%;
  border: 1px solid var(--black);
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
  min-height: 80px;
  background-color: var(--cream);
}

.composer-input:focus {
  outline: none;
  background-color: var(--white);
  box-shadow: none;
}

.composer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.tag-selector {
  border: 1px solid var(--black);
  padding: 0.5rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background-color: var(--white);
  cursor: pointer;
}

.post-card {
  background-color: var(--white);
  border: var(--border);
  padding: 1.8rem;
  box-shadow: none;
}

.post-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.post-author-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.post-author-name {
  font-weight: 700;
  font-size: 1rem;
}

.post-author-role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background-color: var(--cream);
  border: 1px solid var(--black);
  padding: 1px 6px;
}

.post-author-role.admin {
  background-color: var(--yellow);
  font-weight: 700;
}

.post-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #777;
}

.post-content {
  font-size: 0.98rem;
  line-height: 1.6;
  color: #333;
  margin-bottom: 1.5rem;
}

.post-actions {
  display: flex;
  gap: 1.5rem;
  border-top: 1px solid #eee;
  padding-top: 1rem;
}

.action-btn {
  background: none;
  border: none;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #555;
  transition: color 0.2s;
}

.action-btn:hover {
  color: var(--black);
}

.action-btn.liked {
  color: #e91e63;
}

/* Leaderboard view */
.leaderboard-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--white);
  border: var(--border);
  box-shadow: none;
  padding: 2rem;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.leaderboard-table th {
  background-color: var(--cream);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--black);
}

.leaderboard-table tr:hover {
  background-color: #faf8ec;
}

.rank-badge {
  width: 28px;
  height: 28px;
  border: 1px solid var(--black);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  background-color: var(--white);
}

.rank-1 { background-color: #ffd700; }
.rank-2 { background-color: #c0c0c0; }
.rank-3 { background-color: #cd7f32; }

/* Responsive Skool layout */
@media (max-width: 900px) {
  .skool-classroom-layout {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   ANKI SM-2 REPETITION ENGINE STYLES
   ========================================= */

.anki-top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--black);
  padding-bottom: 1.2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.anki-stats-banner {
  background-color: var(--white);
  border: var(--border);
  box-shadow: none;
  padding: 1.5rem 2rem;
  margin-bottom: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  align-items: center;
}

.anki-stat-item {
  border-right: 1px solid var(--black);
  padding-right: 1.5rem;
}

.anki-stat-item:last-child {
  border-right: none;
  padding-right: 0;
}

.anki-stat-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #666;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.anki-stat-value {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--black);
}

.anki-decks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.anki-deck-card {
  background-color: var(--white);
  border: var(--border);
  box-shadow: none;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.anki-deck-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: none;
}

.anki-deck-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.anki-deck-icon {
  width: 46px;
  height: 46px;
  background-color: var(--yellow);
  border: 1px solid var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: none;
}

.anki-deck-title {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
  font-weight: 700;
}

.anki-deck-subtitle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #666;
}

.anki-counters-row {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
  padding: 0.8rem;
  background-color: var(--cream);
  border: 1px solid var(--black);
  justify-content: space-around;
}

.anki-counter {
  text-align: center;
}

.anki-counter-num {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
}

.anki-counter-num.new { color: #1976d2; }
.anki-counter-num.learn { color: #f57c00; }
.anki-counter-num.review { color: #388e3c; }

.anki-counter-lbl {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  color: #555;
  margin-top: 0.2rem;
}

/* STUDY MODE VIEW */
.anki-study-view {
  display: none;
  max-width: 760px;
  margin: 0 auto;
  animation: fadeIn 0.3s ease;
}

.anki-study-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--black);
  flex-wrap: wrap;
  gap: 1rem;
}

.anki-session-counters {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  gap: 1rem;
  background-color: var(--cream);
  border: 1px solid var(--black);
  padding: 0.5rem 1rem;
  box-shadow: none;
}

.anki-flashcard-box {
  background-color: var(--white);
  border: var(--border);
  box-shadow: none;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}

.anki-card-content-area {
  padding: 3.5rem 2.5rem;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.anki-card-text {
  font-size: 2rem;
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--black);
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.anki-audio-btn {
  background-color: var(--cream);
  border: 1px solid var(--black);
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  box-shadow: none;
}

.anki-audio-btn:hover {
  background-color: var(--yellow);
  transform: translateY(-2px);
}

.anki-card-divider {
  width: 80%;
  height: 2px;
  background-color: var(--black);
  margin: 2rem auto;
}

.anki-card-back-text {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2e7d32;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.anki-card-example {
  font-size: 1.05rem;
  color: #555;
  font-style: italic;
  max-width: 550px;
  margin: 0 auto;
  line-height: 1.6;
}

.anki-answer-trigger-bar {
  background-color: var(--yellow);
  border-top: 1px solid var(--black);
  padding: 1.2rem;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
  transition: background-color 0.2s;
}

.anki-answer-trigger-bar:hover {
  background-color: #f7df6e;
}

.anki-grades-bar {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--black);
  background-color: var(--cream);
}

.anki-grade-btn {
  padding: 1.2rem 0.5rem;
  border: none;
  border-right: 1px solid var(--black);
  background: none;
  cursor: pointer;
  font-family: var(--font-title);
  font-weight: 700;
  transition: background-color 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.anki-grade-btn:last-child {
  border-right: none;
}

.anki-grade-btn:hover {
  background-color: var(--white);
}

.grade-label {
  font-size: 1rem;
}

.grade-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #555;
  font-weight: 600;
}

.grade-again { border-top: 1px solid #d32f2f; }
.grade-hard { border-top: 1px solid #f57c00; }
.grade-good { border-top: 1px solid #388e3c; }
.grade-easy { border-top: 1px solid #1976d2; }

/* MODAL STYLES */
.anki-modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.anki-modal-card {
  background-color: var(--white);
  border: 1px solid var(--black);
  box-shadow: none;
  width: 100%;
  max-width: 580px;
  padding: 2.5rem;
  animation: fadeIn 0.3s ease;
}

.anki-form-group {
  margin-bottom: 1.5rem;
}

.anki-form-group label {
  display: block;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.anki-form-input,
.anki-form-select {
  width: 100%;
  border: 1px solid var(--black);
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  background-color: var(--cream);
}

.anki-form-input:focus,
.anki-form-select:focus {
  outline: none;
  background-color: var(--white);
/* =========================================
   LINGQ IMMERSIVE TEXT READER STYLES
   ========================================= */

.lingq-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--black);
  padding-bottom: 1.2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* STATS BANNER */
.lingq-stats-bar {
  background-color: var(--white);
  border: 2px solid var(--black);
  padding: 1rem 1.5rem;
  margin-bottom: 1.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  box-shadow: 4px 4px 0 var(--black);
}

.lingq-stat-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.lingq-stat-item .stat-icon {
  font-size: 1.6rem;
  background: var(--cream);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--black);
  border-radius: 6px;
}

.lingq-stat-item .stat-num {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.1;
}

.lingq-stat-item .stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #666;
  text-transform: uppercase;
}

/* FILTERS & SUBNAV */
.lingq-filters-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--cream);
  border: 2px solid var(--black);
  padding: 0.8rem 1rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.lingq-subnav-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.lingq-tab-btn {
  background: var(--white);
  border: 2px solid var(--black);
  padding: 0.5rem 1rem;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 2px 2px 0 var(--black);
}

.lingq-tab-btn:hover,
.lingq-tab-btn.active {
  background-color: var(--yellow);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--black);
}

.lingq-filter-controls {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.lingq-filter-select {
  background: var(--white);
  border: 2px solid var(--black);
  padding: 0.5rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

/* LIBRARY GRID & CARDS */
.lingq-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.8rem;
  margin-bottom: 3.5rem;
}

.lingq-story-card {
  background-color: var(--white);
  border: 2px solid var(--black);
  box-shadow: 4px 4px 0 var(--black);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
}

.lingq-story-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--black);
}

.lingq-story-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.lingq-flag-badge {
  background-color: var(--yellow);
  border: 2px solid var(--black);
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.lingq-story-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  color: var(--black);
}

.lingq-story-excerpt {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.5;
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* LESSON PROGRESS BAR (On cards and reader top) */
.lingq-lesson-progress-wrapper {
  background: #f1f3f4;
  border: 1px solid var(--black);
  padding: 6px 8px;
  margin-bottom: 1.2rem;
}

.lingq-lesson-progress-bar {
  height: 8px;
  background: #e0e0e0;
  border: 1px solid var(--black);
  display: flex;
  overflow: hidden;
}

.prog-known { background: #4caf50; }
.prog-yellow { background: #ffb300; }
.prog-blue { background: #42a5f5; }

/* READER VIEW LAYOUT */
.lingq-reader-header {
  border-bottom: 2px solid var(--black);
  padding-bottom: 1rem;
  margin-bottom: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.lingq-page-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--cream);
  border: 2px solid var(--black);
  padding: 0.7rem 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 2px 2px 0 var(--black);
}

.page-nav-btn {
  background: var(--white);
  border: 2px solid var(--black);
  padding: 0.4rem 0.8rem;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s;
}

.page-nav-btn:hover { background: var(--yellow); }

.btn-complete-page {
  background: #4caf50;
  color: var(--white);
  border: 2px solid var(--black);
  padding: 0.5rem 1.2rem;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--black);
  transition: transform 0.15s;
}

.btn-complete-page:hover {
  background: #388e3c;
  transform: translate(-1px, -1px);
}

.lingq-reader-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  align-items: start;
  animation: fadeIn 0.3s ease;
  margin-bottom: 2rem;
}

@media (max-width: 1024px) {
  .lingq-reader-layout {
    grid-template-columns: 1fr;
  }
}

.lingq-reader-content-box {
  background-color: var(--white);
  border: 2px solid var(--black);
  box-shadow: 4px 4px 0 var(--black);
  padding: 2.5rem;
  min-height: 480px;
}

.lingq-text-area {
  font-family: var(--font-body);
  font-size: 1.45rem;
  line-height: 2.8;
  color: var(--black);
  word-break: break-word;
}

/* WORD SPANS AND STATUSES */
.lingq-word {
  display: inline-block;
  padding: 2px 5px;
  margin: 3px 1px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  border: 1px solid transparent;
}

.lingq-word:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Status Blue: New Word */
.lingq-word.status-blue {
  background-color: #d0e8ff;
  border-color: #64b5f6;
  color: #0d47a1;
  font-weight: 600;
}

/* Status Yellows: Levels 1 to 4 */
.lingq-word.status-yellow-1 {
  background-color: #fff8e1;
  border-color: #ffe082;
  color: #ff8f00;
  font-weight: 700;
}

.lingq-word.status-yellow-2 {
  background-color: #ffecb3;
  border-color: #ffd54f;
  color: #f57c00;
  font-weight: 700;
}

.lingq-word.status-yellow-3 {
  background-color: #ffe082;
  border-color: #ffca28;
  color: #e65100;
  font-weight: 700;
}

.lingq-word.status-yellow-4 {
  background-color: #ffca28;
  border-color: #ffb300;
  color: #bf360c;
  font-weight: 800;
}

/* Status Known: White/Normal */
.lingq-word.status-known {
  background-color: transparent;
  color: var(--black);
  border-bottom: 1px dotted #bbb;
}

/* Status Ignored: Strikethrough or muted */
.lingq-word.status-ignored {
  background-color: transparent;
  color: #9e9e9e;
  text-decoration: line-through;
}

.lingq-word.active-word {
  border: 2px solid var(--black) !important;
  box-shadow: 2px 2px 0 var(--black);
  transform: scale(1.08);
  z-index: 2;
}

/* RIGHT INSPECTOR SIDEBAR */
.lingq-inspector-sidebar {
  background-color: var(--white);
  border: 2px solid var(--black);
  box-shadow: 4px 4px 0 var(--black);
  padding: 1.8rem;
  position: sticky;
  top: 1.5rem;
}

.lingq-inspector-header {
  border-bottom: 2px solid var(--black);
  padding-bottom: 1rem;
  margin-bottom: 1.2rem;
}

.lingq-inspected-word {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1.1;
}

.lingq-inspected-context {
  background-color: var(--cream);
  border-left: 3px solid var(--black);
  padding: 0.8rem 1rem;
  font-style: italic;
  font-size: 0.92rem;
  color: #333;
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

.lingq-dict-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  max-height: 200px;
  overflow-y: auto;
}

.lingq-dict-pill {
  background-color: var(--cream);
  border: 1.5px solid var(--black);
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.15s;
}

.lingq-dict-pill:hover {
  background-color: var(--yellow);
}

.lingq-status-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.lingq-lvl-btn {
  background-color: var(--cream);
  border: 1.5px solid var(--black);
  padding: 0.5rem 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.lingq-lvl-btn:hover,
.lingq-lvl-btn.active {
  background-color: var(--yellow);
  box-shadow: 2px 2px 0 var(--black);
  transform: translateY(-1px);
}

.btn-known-white {
  flex: 1;
  background: #e8f5e9;
  color: #2e7d32;
  border: 1.5px solid var(--black);
  padding: 0.6rem;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-known-white:hover {
  background: #c8e6c9;
  box-shadow: 2px 2px 0 var(--black);
}

.btn-ignore-trash {
  background: #ffebee;
  color: #c62828;
  border: 1.5px solid var(--black);
  padding: 0.6rem 0.8rem;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-ignore-trash:hover {
  background: #ffcdd2;
  box-shadow: 2px 2px 0 var(--black);
}

.lingq-save-anki-btn {
  background-color: #2e7d32;
  color: var(--white);
  border: 2px solid var(--black);
  padding: 0.9rem;
  width: 100%;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--black);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.lingq-save-anki-btn:hover {
  background-color: #1b5e20;
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--black);
}

/* BOTTOM AUDIO FOOTER */
.lingq-audio-footer {
  background: var(--cream);
  border: 2px solid var(--black);
  padding: 0.8rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  box-shadow: 4px 4px 0 var(--black);
  position: sticky;
  bottom: 1rem;
  z-index: 10;
}

.audio-control-btn {
  background: var(--yellow);
  border: 2px solid var(--black);
  padding: 0.5rem 1.2rem;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--black);
}

.audio-control-btn:hover {
  transform: translate(-1px, -1px);
}

.audio-speed-btn {
  background: var(--white);
  border: 2px solid var(--black);
  padding: 0.5rem 0.8rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.audio-timeline-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 200px;
}

.audio-slider {
  flex: 1;
  accent-color: var(--black);
  cursor: pointer;
}

/* =========================================
   DUOLINGO GAMIFIED GAME ENGINE STYLES
   ========================================= */

.duo-stats-header {
  background-color: var(--duo-bg);
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 2px solid var(--duo-gray);
  border-radius: 20px;
  box-shadow: 0 4px 0 var(--duo-gray);
}

.duo-stat-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
}

.duo-stat-pill.xp { color: var(--duo-blue); }
.duo-stat-pill.gems { color: #ffc800; }
.duo-stat-pill.streak { color: #ff9600; }
.duo-stat-pill.hearts { color: var(--duo-red); }

.duo-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
  padding: 1rem;
}

.duo-mode-card {
  background-color: var(--duo-bg);
  border: 2px solid var(--duo-gray);
  border-radius: 24px;
  box-shadow: 0 6px 0 var(--duo-gray);
  padding: 2.5rem 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

.duo-mode-card:hover {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--duo-gray);
}

.duo-mode-card:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 var(--duo-gray);
}

.duo-mode-icon {
  font-size: 4rem;
  margin-bottom: 1.2rem;
  display: inline-block;
  animation: floatDuo 3s ease-in-out infinite;
}

.duo-mode-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--duo-text);
  margin-bottom: 0.8rem;
  font-family: var(--font-title);
}

.duo-mode-desc {
  font-size: 1rem;
  color: #777;
  line-height: 1.5;
  margin-bottom: 2rem;
  font-weight: 600;
}

.duo-btn {
  background-color: var(--duo-blue);
  color: white;
  border: none;
  border-bottom: 4px solid var(--duo-blue-dark);
  border-radius: 16px;
  padding: 1.1rem 2rem;
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.duo-btn:active {
  transform: translateY(4px);
  border-bottom-width: 0px;
  margin-bottom: 4px; /* compensate */
}

.duo-btn:disabled {
  background-color: var(--duo-gray);
  border-bottom-color: var(--duo-gray-dark);
  color: var(--duo-gray-dark);
  cursor: not-allowed;
}

.duo-btn.green {
  background-color: var(--duo-green);
  border-bottom-color: var(--duo-green-dark);
}

.duo-btn.red {
  background-color: var(--duo-red);
  border-bottom-color: var(--duo-red-dark);
}

.duo-btn-outline {
  background-color: transparent;
  color: var(--duo-gray-dark);
  border: 2px solid var(--duo-gray);
  border-bottom: 4px solid var(--duo-gray);
  border-radius: 16px;
  padding: 1.1rem 2rem;
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.1s;
}
.duo-btn-outline:hover {
  background-color: #f7f7f7;
}

/* ACTIVE GAME CONTAINER */
.duo-game-container {
  background-color: var(--duo-bg);
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-bottom: 140px; /* space for fixed footer */
}

.duo-progress-topbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  padding: 1rem 0;
}

.duo-close-btn {
  font-size: 1.8rem;
  color: var(--duo-gray-dark);
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.2s;
  padding: 0;
}

.duo-close-btn:hover { color: var(--duo-text); }

.duo-progress-track {
  flex-grow: 1;
  height: 20px;
  background-color: var(--duo-gray);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.duo-progress-bar-fill {
  height: 100%;
  background-color: var(--duo-green);
  width: 20%;
  border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}
.duo-progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 10px;
  right: 10px;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.duo-question-header {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--duo-text);
  margin-bottom: 2.5rem;
}

.duo-target-prompt {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.duo-prompt-bubble {
  background-color: var(--duo-bg);
  border: 2px solid var(--duo-gray);
  border-radius: 16px;
  padding: 1.2rem 1.6rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--duo-text);
  position: relative;
  flex-grow: 1;
}
.duo-prompt-bubble::before {
  content: '';
  position: absolute;
  left: -10px;
  bottom: 20px;
  width: 16px;
  height: 16px;
  background-color: var(--duo-bg);
  border-left: 2px solid var(--duo-gray);
  border-bottom: 2px solid var(--duo-gray);
  transform: rotate(45deg);
}

.duo-mascot-img {
  font-size: 4.5rem;
  animation: floatDuo 4s ease-in-out infinite;
}

/* SENTENCE BUILDER DROPZONE & CHIPS */
.duo-sentence-dropzone {
  border-bottom: 2px solid var(--duo-gray);
  min-height: 70px;
  padding: 0.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 3rem;
}

.duo-chips-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  min-height: 80px;
}

.duo-word-chip {
  background-color: var(--duo-bg);
  border: 2px solid var(--duo-gray);
  border-bottom: 4px solid var(--duo-gray);
  border-radius: 14px;
  padding: 0.8rem 1.2rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--duo-text);
  cursor: pointer;
  transition: all 0.1s;
  user-select: none;
}

.duo-word-chip:hover {
  background-color: #f7f7f7;
}

.duo-word-chip:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
  margin-top: 2px;
}

/* SPEED MATCH GRID */
.duo-match-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}

.duo-match-card {
  background-color: var(--duo-bg);
  border: 2px solid var(--duo-gray);
  border-bottom: 4px solid var(--duo-gray);
  border-radius: 16px;
  padding: 1.4rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--duo-text);
  cursor: pointer;
  text-align: center;
  transition: all 0.1s;
}

.duo-match-card:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
  margin-top: 2px;
}

.duo-match-card.selected {
  background-color: var(--duo-blue-light);
  border-color: var(--duo-blue);
  border-bottom-color: var(--duo-blue-dark);
  color: var(--duo-blue-dark);
}

.duo-match-card.matched {
  background-color: var(--duo-gray) !important;
  border-color: var(--duo-gray) !important;
  color: #ccc;
  pointer-events: none;
  opacity: 0.5;
  transform: scale(0.95);
  border-bottom-width: 2px;
}

/* LISTENING / MULTIPLE CHOICE OPTIONS */
.duo-choice-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.duo-choice-btn {
  background-color: var(--duo-bg);
  border: 2px solid var(--duo-gray);
  border-bottom: 4px solid var(--duo-gray);
  border-radius: 16px;
  padding: 1.4rem 1.8rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--duo-text);
  cursor: pointer;
  text-align: left;
  transition: all 0.1s;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.duo-choice-btn:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
  margin-top: 2px;
}

.duo-choice-btn.selected {
  background-color: var(--duo-blue-light);
  border-color: var(--duo-blue);
  border-bottom-color: var(--duo-blue-dark);
  color: var(--duo-blue-dark);
}

/* BIG PLAY AUDIO BUTTON */
.duo-play-audio-btn {
  background-color: var(--duo-blue);
  color: white;
  width: 90px;
  height: 90px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin: 0 auto 2.5rem auto;
  border: none;
  border-bottom: 6px solid var(--duo-blue-dark);
  cursor: pointer;
  transition: all 0.1s;
}

.duo-play-audio-btn:active {
  transform: translateY(4px);
  border-bottom-width: 2px;
  margin-top: 4px;
}

/* BOTTOM FIXED FEEDBACK BANNER */
.duo-feedback-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 2rem;
  border-top: 2px solid;
  animation: slideUpDuo 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: none;
  z-index: 1000;
}

.duo-feedback-wrapper.success {
  display: block;
  background-color: var(--duo-green-light);
  border-top-color: var(--duo-green);
}

.duo-feedback-wrapper.error {
  display: block;
  background-color: var(--duo-red-light);
  border-top-color: var(--duo-red);
}

.duo-feedback-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.duo-feedback-message {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.duo-feedback-emoji {
  font-size: 4rem;
  animation: popDuo 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.duo-feedback-text h2 {
  margin: 0 0 0.2rem 0;
  font-size: 1.8rem;
  font-weight: 800;
}

.duo-feedback-wrapper.success .duo-feedback-text h2 { color: var(--duo-green-dark); }
.duo-feedback-wrapper.error .duo-feedback-text h2 { color: var(--duo-red-dark); }

.duo-feedback-text p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}
.duo-feedback-wrapper.success .duo-feedback-text p { color: var(--duo-green-dark); }
.duo-feedback-wrapper.error .duo-feedback-text p { color: var(--duo-red-dark); }

/* BOTTOM FIXED ACTION BAR (Normal State) */
.duo-action-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 2rem;
  background-color: var(--duo-bg);
  border-top: 2px solid var(--duo-gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 999;
}

/* =========================================
   NOTION DAILY HABITS & CHECKLIST HUB STYLES
   ========================================= */

.notion-container {
  background-color: var(--white);
  padding: 40px 60px;
  max-width: 900px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
  color: #37352f;
  border: none;
  box-shadow: none;
}

.notion-header {
  margin-bottom: 2rem;
  margin-top: 1rem;
}

.notion-page-icon {
  font-size: 78px;
  line-height: 1.1;
  margin-bottom: 12px;
}

.notion-page-title {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.02em;
}

.notion-actions-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(55, 53, 47, 0.09);
  padding-bottom: 8px;
}

.notion-text-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 14px;
  color: rgba(55, 53, 47, 0.65);
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 120ms ease-in 0s;
}

.notion-text-btn:hover {
  background-color: rgba(55, 53, 47, 0.08);
  color: #37352f;
}

.notion-callout {
  display: flex;
  padding: 16px;
  background-color: #f1f1ef;
  border-radius: 4px;
  margin-bottom: 2rem;
}

.notion-callout-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  width: 24px;
  margin-right: 12px;
  font-size: 20px;
}

.notion-callout-content {
  flex-grow: 1;
  font-size: 14px;
}

.notion-progress-track {
  width: 100%;
  height: 6px;
  background-color: rgba(55, 53, 47, 0.16);
  border-radius: 3px;
  overflow: hidden;
}

.notion-progress-fill {
  height: 100%;
  background-color: #37352f;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.notion-category-group {
  margin-bottom: 1.5rem;
}

.notion-category-header {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #37352f;
  padding: 0;
  background: transparent;
}

/* Notion Database Table Styles */
.notion-table-container {
  width: 100%;
  border-top: 1px solid rgba(55, 53, 47, 0.09);
  border-left: 1px solid rgba(55, 53, 47, 0.09);
  border-right: 1px solid rgba(55, 53, 47, 0.09);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
  font-size: 14px;
}

.notion-table-row {
  display: flex;
  border-bottom: 1px solid rgba(55, 53, 47, 0.09);
  transition: background 120ms ease-in 0s;
}

.notion-table-header-row {
  display: flex;
  border-bottom: 1px solid rgba(55, 53, 47, 0.09);
  background-color: rgba(55, 53, 47, 0.02);
  color: rgba(55, 53, 47, 0.65);
}

.notion-table-cell {
  padding: 8px 12px;
  border-right: 1px solid rgba(55, 53, 47, 0.09);
  display: flex;
  align-items: center;
}

.notion-table-cell:last-child {
  border-right: none;
}

.notion-table-row:hover:not(.notion-table-header-row) {
  background-color: rgba(55, 53, 47, 0.08);
}

.notion-task-card {
  display: flex;
  align-items: flex-start;
  padding: 4px 2px;
  margin-bottom: 2px;
  border-radius: 3px;
  transition: background 120ms ease-in 0s;
}

.notion-task-card:hover {
  background-color: rgba(55, 53, 47, 0.08);
}

.notion-checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-grow: 1;
  cursor: pointer;
  user-select: none;
}

.notion-checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(55, 53, 47, 0.4);
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  transition: background 120ms ease-in 0s, border 120ms ease-in 0s;
  border-radius: 3px;
  margin-top: 4px;
}

.notion-task-card:hover .notion-checkbox:not(.completed-check) {
  background-color: rgba(55, 53, 47, 0.08);
}

.notion-task-card.completed .notion-checkbox {
  background-color: #2383E2;
  border-color: #2383E2;
  color: white;
}

.notion-task-title {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #37352f;
}

.notion-task-card.completed .notion-task-title {
  text-decoration: line-through;
  color: rgba(55, 53, 47, 0.5);
}

.notion-xp-badge {
  background-color: rgba(227, 226, 224, 0.5);
  color: #37352f;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  font-family: inherit;
  flex-shrink: 0;
  margin-top: 3px;
}

.notion-task-card.completed .notion-xp-badge {
  background-color: transparent;
  color: rgba(55, 53, 47, 0.5);
}

.notion-add-task-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px;
  color: rgba(55, 53, 47, 0.5);
  font-size: 15px;
  cursor: pointer;
  border-radius: 3px;
  transition: background 120ms ease-in 0s;
  margin-top: 8px;
}

.notion-add-task-row:hover {
  background-color: rgba(55, 53, 47, 0.08);
}

.notion-add-icon {
  font-size: 18px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

/* Modals */
.notion-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(15, 15, 15, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.notion-modal {
  background-color: white;
  width: 100%;
  max-width: 500px;
  border-radius: 6px;
  box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 5px 10px, rgba(15, 15, 15, 0.2) 0px 15px 40px;
  padding: 36px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}

.notion-modal-input-title {
  width: 100%;
  font-size: 28px;
  font-weight: 700;
  border: none;
  outline: none;
  color: #37352f;
  margin-bottom: 24px;
}

.notion-modal-input-title::placeholder {
  color: rgba(55, 53, 47, 0.2);
}

.notion-modal-property {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
}

.notion-prop-label {
  width: 140px;
  color: rgba(55, 53, 47, 0.65);
  display: flex;
  align-items: center;
  gap: 6px;
}

.notion-prop-value {
  flex-grow: 1;
  border: none;
  background: transparent;
  color: #37352f;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  padding: 4px 6px;
  border-radius: 3px;
  cursor: pointer;
}

.notion-prop-value:hover {
  background-color: rgba(55, 53, 47, 0.08);
}

.notion-modal-footer {
  margin-top: 32px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.notion-btn-secondary {
  background: transparent;
  border: 1px solid rgba(55, 53, 47, 0.16);
  padding: 6px 12px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  color: #37352f;
  cursor: pointer;
}

.notion-btn-secondary:hover {
  background-color: rgba(55, 53, 47, 0.08);
}

.notion-btn-primary {
  background: #2383E2;
  border: none;
  padding: 6px 14px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: white;
  cursor: pointer;
}

.notion-btn-primary:hover {
  background: #0077d4;
}

/* =========================================
   CALENDLY / CAL.COM BOOKING HUB STYLES
   ========================================= */

.cal-container {
  background-color: var(--white);
  border: var(--border);
  box-shadow: none;
  padding: 2.8rem;
  max-width: 980px;
  margin: 0 auto;
}

.cal-header {
  border-bottom: 1px solid var(--black);
  padding-bottom: 1.8rem;
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.cal-iframe-wrap {
  border: 1px solid var(--black);
  box-shadow: none;
  background-color: var(--white);
  overflow: hidden;
  margin-bottom: 2.5rem;
}

/* =========================================
   REAL-TIME CHAT & SUPPORT MESSENGER STYLES (PREMIUM)
   ========================================= */

.chat-container {
  background-color: #fdfdfd;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 24px;
  box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0,0,0,0.02);
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: 760px;
  overflow: hidden;
  position: relative;
  background-image: 
    radial-gradient(at 0% 0%, rgba(255, 211, 0, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.03) 0px, transparent 50%);
}

.chat-topbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--black);
  padding: 1.5rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  z-index: 10;
}

.chat-rooms-bar {
  background-color: rgba(250, 250, 250, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  padding: 1rem 2.5rem;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  z-index: 9;
}

.chat-room-btn {
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 99px;
  padding: 0.6rem 1.4rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.chat-room-btn:hover {
  background-color: rgba(0, 0, 0, 0.03);
  color: var(--black);
}

.chat-room-btn.active {
  background-color: var(--white);
  color: var(--black);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  font-weight: 700;
}

.chat-messages-box {
  flex-grow: 1;
  padding: 2.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background-color: transparent;
  scroll-behavior: smooth;
}

.chat-messages-box::-webkit-scrollbar {
  width: 6px;
}
.chat-messages-box::-webkit-scrollbar-track {
  background: transparent;
}
.chat-messages-box::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.chat-bubble-row {
  display: flex;
  flex-direction: column;
  max-width: 78%;
  animation: slideInChat 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.chat-bubble-row.user {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-bubble-row.edgar {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-meta {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  color: #999;
  margin-bottom: 0.5rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-weight: 500;
}

.chat-bubble {
  padding: 1.1rem 1.4rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.98rem;
  line-height: 1.6;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
  position: relative;
}

.chat-bubble.user {
  background: linear-gradient(135deg, #1A1A1A 0%, #333333 100%);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}

.chat-bubble.edgar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: #111111;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-bottom-left-radius: 4px;
}

.chat-input-bar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  padding: 1.2rem 2.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  z-index: 10;
}

.chat-textarea {
  flex-grow: 1;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  padding: 1rem 1.4rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  resize: none;
  height: 56px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}

.chat-textarea:focus {
  outline: none;
  border-color: rgba(0, 0, 0, 0.2);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04);
}

/* =========================================
   GPTS PERSONALIZADOS STYLES
   ========================================= */

.gpts-container {
  max-width: 1000px;
  margin: 0 auto;
}

.gpts-header {
  margin-bottom: 3rem;
  text-align: center;
}

.gpts-header h2 {
  font-family: var(--font-title);
  font-size: 2.2rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.gpts-header p {
  font-size: 1.05rem;
  color: #555;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
}

.gpts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.gpt-card {
  background: var(--white);
  border: 1px solid rgba(17,17,17,0.08);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.gpt-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.gpt-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--yellow), #ffdf40);
}

.gpt-card.locked::before {
  background: #e0e0e0;
}

.gpt-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.gpt-info {
  flex-grow: 1;
  text-align: center;
  margin-bottom: 2rem;
}

.gpt-info h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-title);
}

.gpt-week {
  display: inline-block;
  background-color: var(--cream);
  color: #8d6e63;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.gpt-card.locked .gpt-week {
  background-color: #f5f5f5;
  color: #999;
}

.gpt-info p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
}

.gpt-action {
  width: 100%;
  text-align: center;
  border-radius: 12px;
  padding: 1rem;
  font-size: 0.95rem;
  border: none;
}

.btn-locked {
  background-color: #f0f0f0;
  color: #999;
  width: 100%;
  text-align: center;
  border-radius: 12px;
  padding: 1rem;
  font-size: 0.95rem;
  border: none;
  cursor: not-allowed;
  font-family: var(--font-title);
  font-weight: 700;
}

/* Responsive portal styles */
@media (max-width: 1024px) {
  .portal-sidebar {
    width: 80px;
  }
  
  .sidebar-brand {
    padding: 1.5rem 1rem;
    align-items: center;
  }
  
  .sidebar-title, .sidebar-subtitle {
    display: none;
  }
  
  .menu-item a {
    padding: 1rem;
    justify-content: center;
  }
  
  .menu-item a span {
    display: none;
  }
  
  .sidebar-footer {
    padding: 1rem;
  }
  
  .logout-btn {
    font-size: 0;
    padding: 0.8rem;
  }
  
  .logout-btn::after {
    content: '✖';
    font-size: 0.9rem;
  }
  
  .portal-main {
    margin-left: 80px;
    padding: 2rem;
  }
  
  .overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .portal-layout {
    flex-direction: column;
  }
  
  .portal-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: var(--border);
  }
  
  .sidebar-menu {
    flex-direction: row;
    padding: 0.8rem;
    overflow-x: auto;
    overflow-y: hidden;
  }
  
  .menu-item a {
    padding: 0.6rem;
  }
  
  .sidebar-footer {
    display: none;
  }
  
  .portal-main {
    margin-left: 0;
    padding: 1.5rem;
  }
  
  .tools-status-grid {
    grid-template-columns: 1fr;
  }
  
  .portal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
  }
}

/* GLOBAL CLEAN AESTHETIC OVERRIDE: NO SHADOWS AND FINE 1PX BORDERS */
*, *::before, *::after {
  box-shadow: none !important;
  text-shadow: none !important;
}

:root {
  --border: 1px solid var(--black) !important;
  --shadow: none !important;
  --shadow-hover: none !important;
}

[style*="border: 2px solid"], [style*="border: 3px solid"], [style*="border: 4px solid"],
.btn, .post-card, .modal-content, .study-header, .stat-pill, .deck-card, .story-card, .reader-header, .game-card, .habit-row, .task-card, .tool-card, .chat-message, .voice-recorder {
  border-width: 1px !important;
}

/* LINGQ SENTENCE AND SENTENCE MODE STYLING */
.lingq-sentence {
  transition: opacity 0.25s ease, background-color 0.25s ease;
  border-radius: 4px;
  padding: 1px 3px;
  cursor: pointer;
  display: inline;
}

.lingq-sentence:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.sentence-mode-active .lingq-sentence {
  opacity: 0.45;
}

.sentence-mode-active .lingq-sentence.active-sentence {
  opacity: 1;
  background-color: rgba(250, 240, 201, 0.5) !important;
  border-bottom: 2px solid var(--yellow);
}

.lingq-sentence.active-sentence {
  background-color: rgba(250, 240, 201, 0.25);
  border-bottom: 2px dashed rgba(0, 0, 0, 0.15);
}


/* Notion Database Table Styles (CSS Grid) */
.notion-grid-table {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(55, 53, 47, 0.09);
  border-left: 1px solid rgba(55, 53, 47, 0.09);
  border-right: 1px solid rgba(55, 53, 47, 0.09);
  border-radius: 3px;
  background-color: white;
  width: 100%;
  font-size: 14px;
}

.notion-grid-row {
  display: grid;
  grid-template-columns: 200px 1fr 120px;
  border-bottom: 1px solid rgba(55, 53, 47, 0.09);
  align-items: center;
}

.notion-grid-row.header {
  background-color: rgba(55, 53, 47, 0.02);
  color: rgba(55, 53, 47, 0.65);
  font-size: 13px;
  font-weight: 500;
}

.notion-grid-row:not(.header):hover {
  background-color: rgba(55, 53, 47, 0.08);
}

.notion-grid-cell {
  padding: 8px 12px;
  border-right: 1px solid rgba(55, 53, 47, 0.09);
  display: flex;
  align-items: center;
  min-height: 40px;
}

.notion-grid-cell:last-child {
  border-right: none;
}

/* =========================================================================
   NOTION HIGH-FIDELITY DATABASE CLONE (DARK MODE)
   ========================================================================= */

.notion-db-wrapper {
  background-color: var(--yellow, #FDF7E5);
  color: #37352f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
  padding: 40px 60px;
  border-radius: 8px;
  min-height: 400px;
}

.notion-db-container {
  max-width: 900px;
  margin: 0 auto;
}

.notion-db-title-row {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.notion-db-title-icon {
  font-size: 40px;
  margin-right: 12px;
}

.notion-db-title {
  font-size: 32px;
  font-weight: 700;
  color: #37352f;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

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

.notion-db-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notion-db-view-title {
  font-size: 20px;
  font-weight: 600;
  color: #37352f;
}

.notion-db-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notion-db-icon-btn {
  color: rgba(55, 53, 47, 0.45);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  padding: 4px 6px;
  transition: background 120ms ease-in;
  font-size: 14px;
}

.notion-db-icon-btn:hover {
  background-color: rgba(55, 53, 47, 0.08);
  color: #37352f;
}

.notion-db-new-btn {
  display: flex;
  align-items: center;
  background-color: #2383e2;
  color: white;
  border: none;
  border-radius: 3px;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease-in;
  margin-left: 8px;
}

.notion-db-new-btn:hover {
  background-color: #1e70c1;
}

.notion-db-table {
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  width: 100%;
  font-size: 14px;
  border-top: 1px solid #e9e9e7;
  border-left: 1px solid #e9e9e7;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05); /* Slight shadow to lift it off the yellow */
  border-radius: 4px;
  overflow: hidden;
}

.notion-db-row {
  display: flex;
  width: 100%;
  min-height: 36px;
  border-bottom: 1px solid #e9e9e7;
  transition: background 120ms ease-in;
  position: relative;
}

.notion-db-row:hover {
  background-color: rgba(55, 53, 47, 0.03);
}

.notion-db-header {
  background-color: #ffffff;
  color: rgba(55, 53, 47, 0.65);
  font-size: 14px;
}

.notion-db-header:hover {
  background-color: #ffffff;
}

.notion-db-cell {
  padding: 8px 12px;
  border-right: 1px solid #e9e9e7;
  display: flex;
  align-items: center;
  position: relative;
}

.notion-db-cell-content {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notion-db-prop-icon {
  width: 14px;
  height: 14px;
  fill: rgba(55, 53, 47, 0.45);
  flex-shrink: 0;
}

/* Drag handle that appears on hover */
.notion-db-drag-handle {
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(55, 53, 47, 0.3);
  opacity: 0;
  cursor: grab;
  padding: 4px;
  transition: opacity 120ms ease-in;
}

.notion-db-row:hover .notion-db-drag-handle {
  opacity: 1;
}

.notion-db-drag-handle:hover {
  background-color: rgba(55, 53, 47, 0.08);
  border-radius: 3px;
}

.notion-db-checkbox-wrap {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(55, 53, 47, 0.45);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  transition: background 120ms ease-in, border-color 120ms ease-in;
}

.notion-db-checkbox-wrap.checked {
  background-color: #2383e2;
  border-color: #2383e2;
}

.notion-db-checkbox-wrap svg {
  width: 10px;
  height: 10px;
  fill: white;
  opacity: 0;
}

.notion-db-checkbox-wrap.checked svg {
  opacity: 1;
}

.notion-db-row-actions {
  position: absolute;
  right: 12px;
  opacity: 0;
  transition: opacity 120ms ease-in;
}

.notion-db-row:hover .notion-db-row-actions {
  opacity: 1;
}

/* The "+ New" row at the bottom of the table */
.notion-db-add-row {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  color: rgba(55, 53, 47, 0.5);
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: background 120ms ease-in;
}

.notion-db-add-row:hover {
  background-color: rgba(55, 53, 47, 0.08);
}

.notion-db-add-icon {
  margin-right: 8px;
  font-weight: 400;
  font-size: 16px;
}

/* ========================================================
   AI MODAL STYLES
======================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 15, 20, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-content {
  background: var(--bg-surface, #1e1e1e);
  border: 1px solid var(--border-color, #333);
  border-radius: var(--radius-xl, 20px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  width: 100%;
  animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

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

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color, #333);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-secondary, #999);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-close-modal:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.btn-ai-tab {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ai-tab:hover {
  color: #fff;
}

.btn-ai-tab.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.openai-modal-content {
  max-width: 1100px;
  width: 95%;
  height: 85vh;
}

.ai-launcher-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 2.2rem;
  margin: 1.5rem auto;
  max-width: 720px;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.ai-launcher-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
}

.ai-launcher-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.8rem 0;
}

.ai-launcher-desc {
  font-size: 0.96rem;
  color: #ccc;
  line-height: 1.6;
  margin: 0 auto 1.8rem auto;
  max-width: 600px;
}

.ai-launcher-btn {
  background-color: var(--yellow, #ffe600);
  color: #000;
  border: 2px solid #000;
  box-shadow: 4px 4px 0 #000;
  padding: 1rem 2.4rem;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-launcher-btn:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 0 #000;
  background-color: #fff033;
}

.ai-safari-note {
  font-size: 0.82rem;
  color: #888;
  margin-top: 1.8rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1.5;
  text-align: left;
}

/* =========================================================
   PANEL DE ADMINISTRACIÓN (GESTOR DE CONTENIDOS DINÁMICOS)
   ========================================================= */
#tab-admin {
  padding: 1.5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.admin-header-strip {
  background-color: var(--yellow, #ffe600);
  border: 2px solid var(--black, #000);
  box-shadow: 4px 4px 0 var(--black, #000);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-header-title h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 0.3rem 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.admin-header-title p {
  margin: 0;
  font-size: 0.9rem;
  color: #333;
  font-family: var(--font-mono, monospace);
}

.admin-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1.5px solid var(--black);
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.admin-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #22c55e;
  border: 1px solid var(--black);
}

.admin-nav-subtabs {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--black);
  padding-bottom: 1rem;
  flex-wrap: wrap;
}

.admin-subtab-btn {
  background-color: #fff;
  border: 2px solid var(--black);
  padding: 0.7rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 2px 2px 0 var(--black);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-subtab-btn:hover {
  background-color: #fffde6;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--black);
}

.admin-subtab-btn.active {
  background-color: var(--black);
  color: #fff;
  box-shadow: 3px 3px 0 var(--yellow);
}

.admin-subtab-pane {
  display: none;
}

.admin-subtab-pane.active {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 450px 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1050px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}

.admin-card {
  background-color: #fff;
  border: 2px solid var(--black);
  box-shadow: 4px 4px 0 var(--black);
  padding: 1.8rem;
  position: relative;
}

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

.admin-card-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.admin-input-group label {
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #333;
  text-transform: uppercase;
}

.admin-input,
.admin-select,
.admin-textarea {
  border: 2px solid var(--black);
  padding: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background-color: #fafafa;
  outline: none;
  transition: all 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.admin-input:focus,
.admin-select:focus,
.admin-textarea:focus {
  background-color: #fff;
  border-color: var(--black);
  box-shadow: 2px 2px 0 var(--yellow);
}

.admin-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.admin-item-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 650px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.admin-item-card {
  background-color: #fcfcfc;
  border: 1.5px solid var(--black);
  padding: 1rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: all 0.15s ease;
}

.admin-item-card:hover {
  background-color: #fffde6;
  transform: translateX(2px);
  box-shadow: -3px 3px 0 var(--black);
}

.admin-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.admin-item-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  background-color: var(--yellow);
  padding: 2px 6px;
  border: 1px solid var(--black);
  align-self: flex-start;
  text-transform: uppercase;
}

.admin-item-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--black);
}

.admin-item-meta {
  font-size: 0.8rem;
  color: #666;
}

.admin-item-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.admin-btn-sm {
  background: #fff;
  border: 1.5px solid var(--black);
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.1s ease;
}

.admin-btn-sm:hover {
  background: var(--yellow);
  transform: translateY(-1px);
  box-shadow: 1px 1px 0 var(--black);
}

.admin-btn-sm.delete:hover {
  background: #ff4d4d;
  color: #fff;
}

/* ========================================================
   OPENAI ASSISTANT MODAL OVERLAY STYLES
======================================================== */
.ai-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.25s ease;
}

.ai-modal-window {
  background: #ffffff;
  border: 3px solid #000000;
  box-shadow: 10px 10px 0px #000000;
  width: 100%;
  max-width: 1050px;
  height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
}

.ai-modal-header {
  background: #f4f4f0;
  border-bottom: 3px solid #000000;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.ai-modal-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #000;
}

.ai-pulse-dot {
  width: 12px;
  height: 12px;
  background: #10a37f;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #10a37f;
  animation: aiPulse 1.5s infinite;
}

@keyframes aiPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 12px #10a37f; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.ai-modal-tabs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn-ai-tab {
  background: #ffffff;
  border: 2px solid #000000;
  padding: 0.5rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.btn-ai-tab:hover {
  background: #e9e9e5;
  transform: translateY(-1px);
}

.btn-ai-tab.active {
  background: #10a37f;
  color: #ffffff;
  border-color: #000000;
  box-shadow: 2px 2px 0px #000000;
}

.ai-modal-close {
  background: #ff4d4d;
  color: #ffffff;
  border: 2px solid #000000;
  padding: 0.5rem 1.1rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  border-radius: 6px;
  box-shadow: 2px 2px 0 #000000;
  transition: all 0.15s ease;
}

.ai-modal-close:hover {
  background: #e60000;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000000;
}

.ai-modal-body {
  flex: 1;
  background: #fdfdfc;
  position: relative;
  width: 100%;
  height: 100%;
}

#ai-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.ai-modal-footer {
  background: #fafaf7;
  border-top: 2px solid #000000;
  padding: 0.75rem 1.5rem;
  font-size: 0.82rem;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.ai-fallback-btn {
  background: #000000;
  color: #ffffff;
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.8rem;
  transition: background 0.15s ease;
}

.ai-fallback-btn:hover {
  background: #333333;
}
