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

:root {
  --cramit-red: #e53834;
  --cramit-orange: #ec5c20;
  --cramit-yellow: #ff9100;
  --cramit-blue: #0055ff;
  --cramit-green: #2cb573;
  --cramit-black: #1d1b1b;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: #f9fafb;
  color: #1f2937;
  line-height: 1.6;
  min-height: 100vh;
}

/* Dark mode */
.dark body {
  background: #121212;
  color: #e5e5e5;
}

/* Navigation */
.cramit-nav {
  background: linear-gradient(90deg, #0055ff, #2cb573);
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cramit-logo {
  text-decoration: none;
}

.logo-text {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.5px;
}

.cta-btn {
  background: white;
  color: #0055ff;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Tool Header */
.tool-header {
  text-align: center;
  margin-bottom: 3rem;
}

.tool-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--cramit-blue);
  margin-bottom: 1rem;
}

.tool-description {
  font-size: 1.125rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
}

.dark .tool-description {
  color: #9ca3af;
}

/* Brand Stripe */
.brand-stripe {
  display: flex;
  justify-content: center;
  margin: 1rem auto 2rem;
  gap: 0;
}

.brand-stripe > div {
  height: 6px;
  width: 4rem;
}

.stripe-red { background: #e53834; border-radius: 999px 0 0 999px; }
.stripe-orange { background: #ec5c20; }
.stripe-yellow { background: #ff9100; }
.stripe-blue { background: #0055ff; }
.stripe-green { background: #2cb573; border-radius: 0 999px 999px 0; }

/* Tool Content */
.tool-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.dark .tool-content {
  background: #1f2937;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Add Subject Section */
.add-subject-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #e5e7eb;
}

.dark .add-subject-section {
  border-bottom-color: #374151;
}

.add-subject-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
}

.dark .add-subject-section h2 {
  color: #f9fafb;
}

.form-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.subject-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  transition: border-color 0.2s;
}

.subject-input:focus {
  outline: none;
  border-color: var(--cramit-blue);
}

.dark .subject-input {
  background: #374151;
  border-color: #4b5563;
  color: #f9fafb;
}

.dark .subject-input:focus {
  border-color: var(--cramit-blue);
}

.limit-input {
  width: 120px;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  text-align: center;
  transition: border-color 0.2s;
}

.limit-input:focus {
  outline: none;
  border-color: var(--cramit-blue);
}

.dark .limit-input {
  background: #374151;
  border-color: #4b5563;
  color: #f9fafb;
}

.add-btn {
  padding: 0.75rem 1.5rem;
  background: var(--cramit-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.add-btn:hover {
  background: #0046dd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 85, 255, 0.3);
}

.add-btn:active {
  transform: translateY(0);
}

.helper-text {
  font-size: 0.875rem;
  color: #6b7280;
  font-style: italic;
}

.dark .helper-text {
  color: #9ca3af;
}

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

/* Subject Card */
.subject-card {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s;
}

.dark .subject-card {
  background: #111827;
  border-color: #374151;
}

.subject-card.warning {
  border-color: var(--cramit-yellow);
  background: #fffbeb;
}

.dark .subject-card.warning {
  background: rgba(255, 145, 0, 0.1);
  border-color: var(--cramit-yellow);
}

.subject-card.danger {
  border-color: var(--cramit-red);
  background: #fef2f2;
}

.dark .subject-card.danger {
  background: rgba(229, 56, 52, 0.1);
  border-color: var(--cramit-red);
}

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

.subject-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  flex: 1;
}

.dark .subject-name {
  color: #f9fafb;
}

.delete-btn {
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s;
}

.delete-btn:hover {
  color: var(--cramit-red);
}

.subject-progress {
  margin-bottom: 1rem;
}

.progress-bar-container {
  background: #e5e7eb;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.dark .progress-bar-container {
  background: #374151;
}

.progress-bar {
  height: 100%;
  background: var(--cramit-green);
  transition: width 0.3s, background-color 0.3s;
  border-radius: 999px;
}

.progress-bar.warning {
  background: var(--cramit-yellow);
}

.progress-bar.danger {
  background: var(--cramit-red);
}

.progress-text {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.dark .progress-text {
  color: #9ca3af;
}

.progress-text.warning {
  color: var(--cramit-orange);
  font-weight: 600;
}

.progress-text.danger {
  color: var(--cramit-red);
  font-weight: 600;
}

.subject-actions {
  display: flex;
  gap: 0.75rem;
}

.strike-btn,
.undo-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.strike-btn {
  background: var(--cramit-red);
  color: white;
}

.strike-btn:hover {
  background: #d12e2a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(229, 56, 52, 0.3);
}

.strike-btn:disabled {
  background: #d1d5db;
  cursor: not-allowed;
  transform: none;
}

.dark .strike-btn:disabled {
  background: #4b5563;
}

.undo-btn {
  background: #e5e7eb;
  color: #1f2937;
}

.undo-btn:hover {
  background: #d1d5db;
}

.dark .undo-btn {
  background: #374151;
  color: #f9fafb;
}

.dark .undo-btn:hover {
  background: #4b5563;
}

.undo-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.dark .empty-state h3 {
  color: #f9fafb;
}

.empty-state p {
  color: #6b7280;
  font-size: 1rem;
}

.dark .empty-state p {
  color: #9ca3af;
}

/* Stats Summary */
.stats-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #e5e7eb;
}

.dark .stats-summary {
  border-top-color: #374151;
}

.stat-card {
  background: #f9fafb;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  border: 2px solid #e5e7eb;
}

.dark .stat-card {
  background: #111827;
  border-color: #374151;
}

.stat-card.warning {
  background: #fffbeb;
  border-color: var(--cramit-yellow);
}

.dark .stat-card.warning {
  background: rgba(255, 145, 0, 0.1);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--cramit-blue);
  margin-bottom: 0.25rem;
}

.stat-card.warning .stat-number {
  color: var(--cramit-orange);
}

.stat-label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.dark .stat-label {
  color: #9ca3af;
}

/* Clear Section */
.clear-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #e5e7eb;
  text-align: center;
}

.dark .clear-section {
  border-top-color: #374151;
}

.clear-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Poppins', sans-serif;
}

.clear-btn:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.clear-btn:active {
  transform: translateY(0);
}

/* Educational Content Section */
.educational-content {
  margin-top: 4rem;
  padding: 2.5rem;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.dark .educational-content {
  background: #1f2937;
  border-color: #374151;
}

.educational-content > h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--cramit-blue);
  margin-bottom: 2rem;
  text-align: center;
}

.dark .educational-content > h2 {
  color: #60a5fa;
}

.content-section {
  margin-bottom: 2.5rem;
}

.content-section:last-child {
  margin-bottom: 0;
}

.content-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.dark .content-section h3 {
  color: #f9fafb;
  border-bottom-color: #374151;
}

.content-section p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #4b5563;
  margin-bottom: 1rem;
}

.dark .content-section p {
  color: #d1d5db;
}

.content-section ul {
  margin: 1rem 0 1.5rem 1.5rem;
  padding-left: 0;
}

.content-section li {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #4b5563;
  margin-bottom: 0.75rem;
  list-style-position: outside;
}

.dark .content-section li {
  color: #d1d5db;
}

.content-section li strong {
  color: #1f2937;
  font-weight: 600;
}

.dark .content-section li strong {
  color: #f9fafb;
}

/* Upgrade Banner */
.upgrade-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: 16px;
  margin: 4rem 0 2rem;
  text-align: center;
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.banner-content {
  max-width: 600px;
  margin: 0 auto;
}

.banner-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.banner-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.banner-description {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  opacity: 0.95;
  line-height: 1.5;
}

.banner-cta {
  display: inline-block;
  background: white;
  color: #667eea;
  padding: 1rem 2.5rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.banner-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.banner-footer {
  margin-top: 1rem;
  font-size: 0.875rem;
  opacity: 0.85;
}

/* Footer */
.cramit-footer {
  background: #1d1b1b;
  color: #e5e5e5;
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: white;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.tool-links,
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tool-links li,
.footer-links li {
  margin-bottom: 0.5rem;
}

.tool-links a,
.footer-links a {
  color: #b0b0b0;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.tool-links a:hover,
.footer-links a:hover {
  color: #2cb573;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #333;
  font-size: 0.875rem;
  color: #808080;
}

.powered-by {
  margin-top: 0.5rem;
}

.cramit-link {
  color: #0055ff;
  text-decoration: none;
  font-weight: 600;
}

.cramit-link:hover {
  color: #2cb573;
}

/* Responsive */
@media (max-width: 768px) {
  .cramit-nav {
    padding: 0.75rem 1rem;
  }

  .logo-text {
    font-size: 1.25rem;
  }

  .cta-btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }

  .container {
    padding: 1.5rem 1rem;
  }

  .tool-header h1 {
    font-size: 2rem;
  }

  .tool-content {
    padding: 1.5rem;
  }

  .form-row {
    flex-direction: column;
  }

  .limit-input {
    width: 100%;
  }

  .brand-stripe > div {
    width: 3rem;
  }

  .upgrade-banner {
    padding: 2rem 1.5rem;
    margin: 3rem 0 1.5rem;
  }

  .banner-title {
    font-size: 1.5rem;
  }

  .banner-description {
    font-size: 1rem;
  }

  .banner-cta {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }

  .cramit-footer {
    padding: 2rem 1.5rem 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .stats-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .subject-actions {
    flex-direction: column;
  }
}
