/* LocalMoney Smart Contract Masterclass - Styles */
:root {
  --cosmwasm-color: #f97316;
  --solidity-color: #627eea;
  --solana-color: #14f195;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-code: #0d1117;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border-color: #334155;
  --accent: #3b82f6;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 0 2rem;
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-logo span {
  background: linear-gradient(135deg, var(--cosmwasm-color), var(--solidity-color), var(--solana-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: all 0.2s;
}

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

/* Main Content */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 2rem 4rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 0;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--cosmwasm-color), var(--solidity-color), var(--solana-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

/* Module Cards */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.module-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.module-number {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.module-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.module-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.module-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 500;
}

.tag-cosmwasm {
  background: rgba(249, 115, 22, 0.2);
  color: var(--cosmwasm-color);
}

.tag-solidity {
  background: rgba(98, 126, 234, 0.2);
  color: var(--solidity-color);
}

.tag-solana {
  background: rgba(20, 241, 149, 0.2);
  color: var(--solana-color);
}

/* Page Header */
.page-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.page-header .subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.breadcrumb {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

/* Content Sections */
section {
  margin-bottom: 3rem;
}

section h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

section h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 1rem;
  color: var(--text-primary);
}

section p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Code Comparison */
.code-comparison {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (max-width: 1200px) {
  .code-comparison {
    grid-template-columns: 1fr;
  }
}

.code-panel {
  background: var(--bg-code);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.code-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.code-panel-header h4 {
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.code-panel-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-panel.cosmwasm .dot { background: var(--cosmwasm-color); }
.code-panel.solidity .dot { background: var(--solidity-color); }
.code-panel.solana .dot { background: var(--solana-color); }

.code-panel pre {
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.5;
}

.code-panel code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Syntax Highlighting */
.keyword { color: #ff79c6; }
.type { color: #8be9fd; }
.function { color: #50fa7b; }
.string { color: #f1fa8c; }
.number { color: #bd93f9; }
.comment { color: #6272a4; }
.attribute { color: #ffb86c; }
.operator { color: #ff79c6; }
.variable { color: #f8f8f2; }

/* Concept Box */
.concept-box {
  background: var(--bg-card);
  border-left: 4px solid var(--accent);
  padding: 1.5rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
}

.concept-box h4 {
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.concept-box p {
  margin-bottom: 0;
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.comparison-table th,
.comparison-table td {
  padding: 1rem;
  text-align: left;
  border: 1px solid var(--border-color);
}

.comparison-table th {
  background: var(--bg-card);
  font-weight: 600;
}

.comparison-table th:nth-child(2) { color: var(--cosmwasm-color); }
.comparison-table th:nth-child(3) { color: var(--solidity-color); }
.comparison-table th:nth-child(4) { color: var(--solana-color); }

.comparison-table td {
  background: var(--bg-code);
}

.comparison-table code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

/* Interactive Elements */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: all 0.2s;
}

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

.tab-btn.active {
  color: var(--text-primary);
  background: var(--accent);
}

.tab-content {
  display: none;
}

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

/* Quiz */
.quiz {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
}

.quiz h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.quiz-question {
  margin-bottom: 1.5rem;
}

.quiz-question p {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-code);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.quiz-option:hover {
  border-color: var(--accent);
}

.quiz-option input {
  display: none;
}

.quiz-option .radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-option.selected .radio {
  border-color: var(--accent);
  background: var(--accent);
}

.quiz-option.correct {
  border-color: var(--solana-color);
  background: rgba(20, 241, 149, 0.1);
}

.quiz-option.incorrect {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.quiz-submit {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.quiz-submit:hover {
  background: #2563eb;
}

.quiz-result {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  display: none;
}

.quiz-result.show {
  display: block;
}

.quiz-result.success {
  background: rgba(20, 241, 149, 0.1);
  border: 1px solid var(--solana-color);
  color: var(--solana-color);
}

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

/* Progress Bar */
.progress-container {
  margin: 2rem 0;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.progress-bar {
  height: 8px;
  background: var(--bg-card);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cosmwasm-color), var(--solidity-color), var(--solana-color));
  border-radius: 4px;
  transition: width 0.3s;
}

/* Navigation Buttons */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s;
}

.nav-btn:hover {
  border-color: var(--accent);
  background: var(--bg-code);
}

.nav-btn.next {
  margin-left: auto;
}

/* Callouts */
.callout {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
}

.callout-icon {
  font-size: 1.5rem;
}

.callout.info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid var(--accent);
}

.callout.warning {
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid var(--cosmwasm-color);
}

.callout.tip {
  background: rgba(20, 241, 149, 0.1);
  border: 1px solid var(--solana-color);
}

/* Diagram */
.diagram {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 2rem;
  margin: 1.5rem 0;
  text-align: center;
}

.diagram svg {
  max-width: 100%;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

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

.animate-in {
  animation: fadeIn 0.5s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
  }

  main {
    padding: 70px 1rem 2rem;
  }

  .code-comparison {
    grid-template-columns: 1fr;
  }
}
