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

:root {
  --bg-color: #0c0c14;
  --bg-accent: #11111a;
  --bg-sidebar: #0f1016;
  --text-main: #f5f5f7;
  --text-muted: #8b8b9a;
  
  --border-color: rgba(255, 255, 255, 0.05);
  --border-hover: rgba(255, 255, 255, 0.12);
  
  --accent-color: #4f46e5;
  --accent-hover: #4338ca;

  --card-radius: 1.25rem;
  --grid-gap: 1.5rem;
  
  /* Badges */
  --badge-hot: #e11d48;
  --badge-tutorial: #8b5cf6;
  --badge-new: #10b981;
  --badge-tips: #f59e0b;
}

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

body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page-wrapper {
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  gap: 2rem;
}

/* Navigation Menu */
.main-nav {
  width: 100%;
  background: rgba(15, 16, 22, 0.85);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.nav-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  position: relative;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
  padding-bottom: 0.25rem;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-color);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.65, 0, 0.35, 1);
  box-shadow: 0 0 8px var(--accent-color);
  border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-button {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid var(--border-color);
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-button:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

/* Sidebar Styles */
.sidebar {
  background-color: transparent;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 600;
  border-bottom: 2px solid rgba(255,255,255,0.05);
  padding-bottom: 0.75rem;
}

.news-list {
  display: flex;
  flex-direction: column;
}

.news-item {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: color 0.2s ease;
}

.news-item:hover .news-title {
  color: var(--accent-hover);
}

.news-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.news-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.4;
}

/* Videos List */
.video-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
}

.video-thumb {
  width: 90px;
  height: 60px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  position: relative;
  flex-shrink: 0;
}

.video-thumb::after {
  content: '▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.6);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
}

.video-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.video-title {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.video-views {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Subscribe Box */
.subscribe-box {
  background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
  border-radius: var(--card-radius);
  padding: 2rem;
  text-align: center;
  margin-top: 2rem;
}

.subscribe-box h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.subscribe-box p {
  font-size: 0.85rem;
  color: #c7d2fe;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.subscribe-box input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.2);
  color: white;
  margin-bottom: 1rem;
  font-family: inherit;
}

.subscribe-box button {
  width: 100%;
  padding: 0.8rem;
  border-radius: 8px;
  border: none;
  background: white;
  color: #3730a3;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.subscribe-box button:hover {
  transform: translateY(-2px);
}

/* Bento Area */
.bento-area {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 360px repeat(3, 240px);
  grid-auto-rows: 240px;
  gap: var(--grid-gap);
}

/* Bento Card Base */
.bento-card {
  position: relative;
  background-color: var(--bg-accent);
  border-radius: var(--card-radius);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--border-color);
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(79, 70, 229, 0.4), 0 0 20px rgba(79, 70, 229, 0.2);
  border-color: rgba(79, 70, 229, 0.4);
}

.bento-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
  transition: transform 0.5s ease;
}

.bento-card:hover .bento-bg {
  transform: scale(1.05);
}

.bento-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(5,5,10,0.95) 0%, rgba(5,5,10,0.3) 50%, rgba(5,5,10,0) 100%);
  z-index: 2;
}

.bento-content {
  position: relative;
  z-index: 3;
  padding: 1.5rem;
  width: 100%;
}

.bento-badge {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 3;
}

.badge-hot { background: var(--badge-hot); color: white; }
.badge-tutorial { background: var(--badge-tutorial); color: white; }
.badge-new { background: var(--badge-new); color: white; }
.badge-tips { background: var(--badge-tips); color: white; }

/* Typografia w kafelkach */
.article-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.article-meta {
  font-size: 0.8rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-meta span.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

/* Specific Card Layouts (The Grid) */
.col-span-2 { grid-column: span 2; }
.col-span-1 { grid-column: span 1; }
.row-span-2 { grid-row: span 2; }
.row-span-1 { grid-row: span 1; }

.hero-article .article-title {
  font-size: 2.2rem;
}
.hero-article .bento-content {
  padding: 2.5rem;
}
.hero-article .bento-badge {
  top: 2.5rem;
  left: 2.5rem;
}

/* Responsywność */
@media (max-width: 1400px) {
  .page-wrapper {
    grid-template-columns: 250px 1fr;
  }
  .sidebar-right {
    display: none;
  }
}

@media (max-width: 1024px) {
  .page-wrapper {
    grid-template-columns: 1fr;
  }
  .sidebar-left {
    display: none;
  }
  .bento-area {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-card[style*="grid-column: 3 / 4"] {
    grid-column: span 1 !important;
  }
  .bento-card[style*="grid-column: 4 / 5"] {
    grid-column: span 1 !important;
  }
}

@media (max-width: 640px) {
  .bento-area {
    grid-template-columns: 1fr;
  }
  .col-span-2, .col-span-1 {
    grid-column: span 1;
  }
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 100%;
  max-width: 400px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  z-index: 1000;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.8);
  animation: slideInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
}

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

@media (max-width: 640px) {
  .cookie-banner {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: calc(100% - 2rem);
  }
}

.cookie-content h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.cookie-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  gap: 1rem;
}

.button-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  flex: 1;
}

.button-secondary:hover {
  background: rgba(255,255,255,0.05);
}

/* Footer Section */
.main-footer {
  width: 100%;
  border-top: 1px solid var(--border-color);
  background-color: transparent;
  padding: 4rem 2rem 2rem;
  margin-top: 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 1rem;
  max-width: 250px;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}
