/* KS3 Computing Lessons - Fun & Engaging Theme! 🎨 */

/* Import a fun, readable font */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

/* Global styling */
body {
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 25%, #fce7f3 50%, #e0f2fe 75%, #f0f9ff 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Main content area */
main, .quarto-layout-row, .page-columns {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.15);
  margin: 20px;
  padding: 30px;
}

.content {
  background: transparent;
}

/* Headings with fun colors */
h1 {
  color: #667eea;
  font-weight: 800;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  border-bottom: 4px solid #f093fb;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

h2 {
  color: #764ba2;
  font-weight: 700;
  margin-top: 30px;
  padding-left: 15px;
  border-left: 5px solid #4facfe;
}

h3 {
  color: #00f2fe;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Code cells with fun styling */
.cell {
  margin-bottom: 1.5rem;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.cell > .sourceCode {
  margin-bottom: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px;
  border-radius: 15px 15px 0 0;
}

.cell-output > pre {
  margin-bottom: 0;
  background: #f8f9fa;
  border-left: 5px solid #4facfe;
  padding: 15px;
  border-radius: 0 0 15px 15px;
}

.cell-output > pre, .cell-output > .sourceCode > pre, .cell-output-stdout > pre {
  margin-left: 0;
  margin-top: 0;
  background: #f8f9fa;
  border-left: 5px solid #00f2fe;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  padding: 15px;
  font-family: 'Courier New', monospace;
}

.cell-output > .sourceCode {
  border: none;
  background: #f8f9fa;
  margin-top: 0;
}

/* Links with fun hover effects */
a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}

a:hover {
  color: #764ba2;
  border-bottom: 2px solid #f093fb;
  transform: scale(1.05);
  display: inline-block;
}

/* Description blocks */
div.description {
  padding: 15px 20px;
  padding-top: 10px;
  font-style: italic;
  font-size: 135%;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-left: 5px solid #4facfe;
  border-radius: 10px;
  margin: 20px 0;
  color: #764ba2;
  font-weight: 600;
}

/* Lists with fun bullets */
ul, ol {
  padding-left: 25px;
}

li {
  margin-bottom: 10px;
  line-height: 1.8;
}

li::marker {
  color: #667eea;
  font-weight: bold;
}

/* Blockquotes */
blockquote {
  border-left: 5px solid #f093fb;
  background: linear-gradient(90deg, rgba(240, 147, 251, 0.1) 0%, transparent 100%);
  padding: 15px 20px;
  margin: 20px 0;
  border-radius: 10px;
  font-style: italic;
  color: #764ba2;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 20px 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px;
  font-weight: 700;
}

td {
  padding: 12px 15px;
  border-bottom: 1px solid #e0e0e0;
}

tr:hover {
  background: rgba(102, 126, 234, 0.1);
}

/* Navbar styling */
.navbar, .navbar-default {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border-radius: 0 0 15px 15px;
}

.navbar-brand, .navbar-nav > li > a {
  font-weight: 800;
  font-size: 1.3rem;
  color: white !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.navbar-nav > li > a:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 10px;
}

/* Sidebar */
.sidebar {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Buttons and interactive elements */
button, .btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  color: white;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

button:hover, .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* Code blocks */
pre code {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 15px;
  border-radius: 10px;
  display: block;
  overflow-x: auto;
}

code {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  padding: 3px 6px;
  border-radius: 5px;
  font-family: 'Courier New', monospace;
  font-weight: 600;
}

/* Fun emoji styling */
.emoji {
  font-size: 1.2em;
  display: inline-block;
  animation: bounce 2s infinite;
}

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

/* Fun callout boxes */
.callout {
  border-radius: 15px;
  padding: 20px;
  margin: 20px 0;
  border-left: 5px solid;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.callout-note {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-color: #667eea;
}

.callout-tip {
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.1) 0%, rgba(0, 242, 254, 0.1) 100%);
  border-color: #4facfe;
}

.callout-warning {
  background: linear-gradient(135deg, rgba(240, 147, 251, 0.1) 0%, rgba(255, 200, 87, 0.1) 100%);
  border-color: #f093fb;
}

/* Fun badges and tags */
.badge, .tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
  font-size: 0.85em;
  margin: 0 5px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Fun scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #764ba2 0%, #f093fb 100%);
}

/* Selection color */
::selection {
  background: rgba(102, 126, 234, 0.3);
  color: #764ba2;
}

/* Fun divider lines */
hr {
  border: none;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, #667eea 20%, #764ba2 50%, #f093fb 80%, transparent 100%);
  border-radius: 3px;
  margin: 30px 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .quarto-layout-row, main, .page-columns {
    margin: 10px;
    padding: 20px;
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .cell {
    margin-bottom: 1rem;
  }
}
