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

:root {
  --primary-color: #0d6efd;
  --secondary-color: #f8f9fa;
  --text-dark: #2c3e50;
  --text-light: #6c757d;
  --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #e4ebf5 100%);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
  --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
}

header {
  background: var(--primary-color);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 10%, transparent 10%);
  background-size: 20px 20px;
  animation: move-bg 20s linear infinite;
  z-index: 1;
}

@keyframes move-bg {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

header p {
  font-size: 1.2rem;
  opacity: 0.9;
  position: relative;
  z-index: 2;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.module-section {
  margin-bottom: 4rem;
}

.module-title {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  display: inline-block;
}

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

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.15);
}

.card:hover::after {
  transform: scaleX(1);
}

.card-number {
  position: absolute;
  top: -20px;
  right: -10px;
  font-size: 6rem;
  font-weight: 700;
  color: rgba(13, 110, 253, 0.05);
  z-index: 0;
}

.card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.card p {
  color: var(--text-light);
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
  flex-grow: 1;
}

.tag {
  display: inline-block;
  background: rgba(13, 110, 253, 0.1);
  color: var(--primary-color);
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  width: fit-content;
}

footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
  margin-top: auto;
}

/* Layout for Post with Sidebar TOC */
.post-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .post-layout {
    grid-template-columns: 1fr;
  }
}

/* Sidebar TOC */
.sidebar-toc {
  position: sticky;
  top: 2rem;
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--glass-border);
}

.sidebar-toc h3 {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.sidebar-toc ul {
  list-style: none;
  padding: 0;
}

.sidebar-toc li {
  margin-bottom: 0.8rem;
}

.sidebar-toc a {
  text-decoration: none;
  color: var(--text-dark);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.sidebar-toc a:hover {
  color: var(--primary-color);
  font-weight: 600;
}

/* Media Controls */
.media-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--secondary-color);
  padding: 1rem;
  border-radius: 50px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.control-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0 1.2rem;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 25px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: all 0.2s ease;
}

.control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(13, 110, 253, 0.3);
}

.control-btn.stop {
  background: #dc3545;
}

.lang-select {
  padding: 0 0.6rem;
  height: 42px;
  border-radius: 25px;
  border: 1px solid #ccc;
  font-family: inherit;
  outline: none;
}

/* Media Container */
.media-container {
  position: relative;
  text-align: center;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border: 1px solid var(--glass-border);
  background: #000;
}

.media-container img {
  max-width: 100%;
  display: block;
}

/* CSS Cropped Images for Screenshots */
.crop-container {
  overflow: hidden;
  position: relative;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border: 1px solid #ddd;
  margin: 1rem 0 2rem 0;
}

.crop-app-switcher { height: 80px; }
.crop-app-switcher img { position: absolute; top: 0; left: auto; right: 0; height: 993px; max-width: none; }

.crop-sidebar { height: 500px; width: 250px; }
.crop-sidebar img { position: absolute; top: -50px; left: 0; height: 993px; max-width: none; }

.crop-search { height: 80px; }
.crop-search img { position: absolute; top: 0; left: -500px; height: 993px; max-width: none; }

.crop-filters { height: 400px; }
.crop-filters img { position: absolute; top: -150px; left: auto; right: 0; height: 993px; max-width: none; }

