/* ==========================================================================
   Rychloviny Hub - Styling & Design System
   Matches Official Rychloviny.cz Design Language & Logo Geometry
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&family=Space+Grotesk:wght@600;700;800&family=Syne:wght@700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-dark: #07090e;
  --bg-surface: #0f1420;
  --bg-card: rgba(18, 24, 38, 0.78);
  --bg-card-hover: rgba(26, 35, 56, 0.88);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #00d2ff;
  --accent-blue: #3b82f6;
  --accent-purple: #a855f7;
  --accent-pink: #ec4899;

  --border-light: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(0, 210, 255, 0.4);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  /* Official Font Variables from www.rychloviny.cz */
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Space Grotesk', 'Outfit', sans-serif;
  --font-display: 'Syne', 'Space Grotesk', sans-serif;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Atmospheric Mesh & Logo Ring Orbs */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  animation: floatOrb 20s infinite ease-in-out alternate;
}

.orb-1 {
  width: 650px;
  height: 650px;
  background: var(--accent-cyan);
  top: -120px;
  left: -120px;
}

.orb-2 {
  width: 750px;
  height: 750px;
  background: var(--accent-purple);
  bottom: -150px;
  right: -150px;
  animation-delay: -7s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-40px, 70px) scale(0.95); }
}

/* Background Watermark Rychloviny Circular Rings */
.ambient-bg::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(0, 210, 255, 0.04);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 100px rgba(0, 210, 255, 0.02) inset;
}

/* ==========================================================================
   CINEMATIC INTRO & HYPERSPACE OVERLAY
   ========================================================================== */

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #020307;
  overflow: hidden;
  transition: opacity 0.8s ease-out, visibility 0.8s;
}

.intro-overlay.fading {
  opacity: 0;
  pointer-events: none;
}

#intro-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Minimalist Start Screen Overlay */
.intro-start-screen {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 3, 6, 0.65);
  backdrop-filter: blur(8px);
  cursor: pointer;
  padding: 24px;
}

.start-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 46px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 0 40px rgba(0, 210, 255, 0.55);
  transition: var(--transition-smooth);
}

.start-btn:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 0 60px rgba(0, 210, 255, 0.8);
}

/* Interactive RPG Dialogue Choice Modal */
.dialogue-choices-container {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 3, 6, 0.55);
  backdrop-filter: blur(8px);
  padding: 24px;
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.dialogue-choices-container.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.choices-box {
  background: rgba(13, 17, 28, 0.92);
  border: 1px solid rgba(0, 210, 255, 0.35);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 0 50px rgba(0, 210, 255, 0.25);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.choices-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-cyan);
  text-align: center;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.choice-input-wrapper {
  display: flex;
  gap: 8px;
}

.choice-input-wrapper input {
  flex: 1;
  background: rgba(6, 9, 17, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.choice-input-wrapper input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.25);
}

.choice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.choice-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.input-submit-btn {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  border: none;
  font-weight: 700;
  white-space: nowrap;
}

.input-submit-btn:hover {
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
}

.story-choice-btn {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
  border-color: rgba(0, 210, 255, 0.4);
}

.story-choice-btn:hover {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.4) 0%, rgba(168, 85, 247, 0.4) 100%);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 25px rgba(0, 210, 255, 0.35);
}

.exit-choice-btn {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.exit-choice-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.35);
}

/* Interactive Gate Interaction Prompt */
.gate-prompt {
  position: absolute;
  bottom: 110px;
  z-index: 15;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.gate-prompt.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.gate-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 38px;
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.35) 0%, rgba(168, 85, 247, 0.35) 100%);
  border: 1.5px solid var(--accent-cyan);
  border-radius: var(--radius-full);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 40px rgba(0, 210, 255, 0.5);
  transition: var(--transition-smooth);
  backdrop-filter: blur(12px);
}

.gate-btn:hover {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.6) 0%, rgba(168, 85, 247, 0.6) 100%);
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 0 60px rgba(0, 210, 255, 0.75);
}

/* Cinematic Letterbox Bars */
.cinematic-bar-top,
.cinematic-bar-bottom {
  position: absolute;
  left: 0;
  width: 100%;
  height: 70px;
  background: #000;
  z-index: 5;
}
.cinematic-bar-top { top: 0; }
.cinematic-bar-bottom { bottom: 0; }

/* Intro Narrative Subtitles & Game Typewriter */
.intro-content {
  position: absolute;
  bottom: 85px;
  z-index: 6;
  text-align: center;
  max-width: 840px;
  padding: 16px 28px;
  background: rgba(6, 9, 17, 0.75);
  border: 1px solid rgba(0, 210, 255, 0.15);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.intro-content.visible {
  opacity: 1;
}

.intro-subtitle {
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #f8fafc;
  line-height: 1.6;
  text-shadow: 0 0 15px rgba(0, 210, 255, 0.35);
}

.intro-subtitle:not(:empty)::after {
  content: '▋';
  display: inline-block;
  color: var(--accent-cyan);
  margin-left: 6px;
  animation: blinkCursor 0.8s infinite;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.intro-controls {
  position: absolute;
  top: 90px;
  right: 32px;
  z-index: 10;
}

.skip-btn {
  background: rgba(15, 20, 32, 0.7);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
  backdrop-filter: blur(8px);
}

.skip-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   MAIN HUB DASHBOARD
   ========================================================================== */

.hub-dashboard {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hub-dashboard.active {
  opacity: 1;
  transform: scale(1);
}

/* Official Rychloviny.cz Header Styling */
.hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(7, 9, 14, 0.75);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-fast);
}

.brand-container:hover {
  transform: scale(1.02);
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  max-height: 36px;
  object-fit: contain;
  display: inline-block;
  filter: drop-shadow(0 0 12px rgba(0, 210, 255, 0.6));
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1;
}

.text-gradient {
  background: linear-gradient(135deg, #00d2ff 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  color: var(--accent-cyan);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 4px;
}

/* RSS Feed Rotator Header Widget */
.rss-rotator-widget {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(18, 24, 38, 0.6);
  border: 1px solid var(--border-light);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  max-width: 540px;
  backdrop-filter: blur(8px);
}

.rss-badge {
  background: rgba(0, 210, 255, 0.15);
  color: var(--accent-cyan);
  font-family: var(--font-heading);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.rss-content-wrapper {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1;
}

.rss-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.rss-link:hover {
  color: var(--accent-cyan);
}

.rss-nav-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rss-nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: var(--transition-fast);
}

.rss-nav-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* Top Right Header Utility Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-control-btn {
  background: rgba(18, 24, 38, 0.7);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.icon-control-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(30, 41, 59, 0.8);
}

.icon-control-btn.active {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.2);
}

.header-clock {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

/* Main Body Section */
.hub-main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 60px 32px 80px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-section {
  text-align: center;
  margin-bottom: 50px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Levitating Projects Grid Wall */
.projects-grid-wall {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  perspective: 1200px;
}

/* Levitating Project Card Evoking Logo Geometry */
.project-card {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(20px);
  transform-style: preserve-3d;
  animation: levitate 6s ease-in-out infinite alternate;
  will-change: transform;
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-smooth);
}

.project-card::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 1px solid rgba(0, 210, 255, 0.08);
  pointer-events: none;
  transition: border-color var(--transition-smooth), transform var(--transition-smooth);
}

.project-card:hover::after {
  border-color: rgba(0, 210, 255, 0.25);
  transform: scale(1.15);
}

@keyframes levitate {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.project-card:hover {
  border-color: var(--card-accent, var(--accent-cyan));
  box-shadow: 0 20px 40px -15px var(--card-glow, rgba(0, 210, 255, 0.25));
}

.card-glow-halo {
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: var(--card-gradient);
  opacity: 0;
  transition: opacity var(--transition-smooth);
  z-index: 0;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  padding: 1px;
  pointer-events: none;
}

.project-card:hover .card-glow-halo {
  opacity: 1;
}

.card-inner {
  position: relative;
  z-index: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transform-style: preserve-3d;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.card-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 25px rgba(0, 210, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.card-icon-box svg {
  width: 26px;
  height: 26px;
}

.card-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.card-badge.online {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.card-badge.online .badge-dot {
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.card-body {
  flex: 1;
  margin-bottom: 28px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: #fff;
  letter-spacing: -0.01em;
}

.card-tagline {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
}

.card-domain {
  font-size: 0.82rem;
  font-family: monospace;
  color: var(--accent-cyan);
  margin-bottom: 16px;
  opacity: 0.85;
}

.card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feature-tag {
  font-size: 0.74rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.card-footer {
  margin-top: auto;
}

.card-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
  transition: var(--transition-fast);
}

.card-action-btn.primary {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-color: rgba(255, 255, 255, 0.15);
}

.project-card:hover .card-action-btn.primary {
  background: var(--card-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 20px var(--card-glow);
}

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

/* Footer */
.hub-footer {
  padding: 30px 40px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* Responsive Rules */
@media (max-width: 768px) {
  .hub-header {
    padding: 16px 20px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .rss-rotator-widget {
    order: 3;
    width: 100%;
    max-width: 100%;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .projects-grid-wall {
    grid-template-columns: 1fr;
  }

  .hub-footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
