/* CSS Custom Properties - LEKTORA Design System */
:root {
  /* Light theme colors */
  --background: hsl(0 0% 100%);
  --foreground: hsl(0 0% 3.9%);
  --primary: hsl(0 0% 9%);
  --secondary: hsl(0 0% 96.1%);
  --muted: hsl(0 0% 45.1%);
  --border: hsl(0 0% 89.8%);
  
  /* Accent colors */
  --accent: hsl(221 83% 53%);
  --accent-hover: hsl(221 83% 45%);
  --accent-light: hsl(221 83% 95%);
  
  /* Status colors */
  --success: hsl(142 76% 36%);
  --warning: hsl(25 95% 53%);
  --destructive: hsl(0 84.2% 60.2%);
  
  /* Typography */
  --font-primary: 'Gidole', 'DM Sans', sans-serif;
  --font-secondary: 'DM Sans', sans-serif;
  
  /* Shadows */
  --shadow-small: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-medium: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-large: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Dark theme colors */
[data-theme="dark"] {
  --background: hsl(0 0% 3.9%);
  --foreground: hsl(0 0% 98%);
  --primary: hsl(0 0% 98%);
  --secondary: hsl(0 0% 14.9%);
  --muted: hsl(0 0% 63.9%);
  --border: hsl(0 0% 14.9%);
  --accent-hover: hsl(221 83% 60%);
  --accent-light: hsl(221 83% 10%);
  --destructive: hsl(0 62.8% 30.6%);
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-secondary);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  transition: all 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

/* Logo styling */
.logo {
  display: flex;
  align-items: center;
}

.logo-image {
  height: 50px;
  width: auto;
  filter: brightness(0) saturate(100%) invert(6%) sepia(0%) saturate(1%) hue-rotate(0deg) brightness(94%) contrast(106%);
  transition: all 0.3s ease;
}

/* Dark theme logo filter */
[data-theme="dark"] .logo-image {
  filter: brightness(0) saturate(100%) invert(98%) sepia(98%) saturate(0%) hue-rotate(338deg) brightness(102%) contrast(102%);
}

.logo h1 {
  font-family: var(--font-primary);
  font-size: 2rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.2;
}

.logo .accent {
  color: var(--accent);
}

/* Theme toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
  background: var(--accent-light);
}

/* Main content */
.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
}

.redirect-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 3rem;
  text-align: center;
  max-width: 600px;
  width: 100%;
  box-shadow: var(--shadow-large);
  transition: all 0.3s ease;
}

.redirect-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

/* Icon */
.icon-wrapper {
  margin-bottom: 2rem;
}

.icon-wrapper i {
  font-size: 3rem;
  color: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Typography */
.title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.message {
  margin-bottom: 2rem;
}

.message p {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.message strong {
  color: var(--accent);
  font-weight: 600;
}

/* New URL display */
.new-url {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--accent-light);
  border-radius: 0.5rem;
  border: 1px solid var(--accent);
}

.url-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.url-link:hover {
  transform: translateY(-2px);
  color: var(--accent-hover);
}

.url-logo {
  width: 32px;
  height: 32px;
  filter: brightness(0) saturate(100%) invert(30%) sepia(94%) saturate(1786%) hue-rotate(221deg) brightness(91%) contrast(91%);
  transition: all 0.3s ease;
}

/* Dark theme URL logo filter */
[data-theme="dark"] .url-logo {
  filter: brightness(0) saturate(100%) invert(49%) sepia(97%) saturate(1786%) hue-rotate(221deg) brightness(110%) contrast(91%);
}

.url-link:hover .url-logo {
  transform: scale(1.1);
  filter: brightness(0) saturate(100%) invert(26%) sepia(94%) saturate(1786%) hue-rotate(221deg) brightness(85%) contrast(91%);
}

[data-theme="dark"] .url-link:hover .url-logo {
  filter: brightness(0) saturate(100%) invert(53%) sepia(97%) saturate(1786%) hue-rotate(221deg) brightness(115%) contrast(91%);
}

/* Countdown section */
.countdown-section {
  margin-bottom: 2rem;
}

.countdown-text {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 1rem;
}

.countdown-text span {
  color: var(--accent);
  font-weight: 600;
  font-size: 1.125rem;
}

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--secondary);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 100%;
  border-radius: 3px;
  animation: countdown 10s linear forwards;
}

@keyframes countdown {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* Buttons */
.buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-family: var(--font-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-secondary:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

/* Tagline */
.tagline {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.tagline p {
  color: var(--muted);
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tagline i {
  color: var(--destructive);
}

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

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.redirect-card {
  animation: fadeInDown 0.6s ease-out;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .header {
    padding: 1.5rem 0;
  }
  
  .logo-image {
    height: 42px;
  }
  
  .logo h1 {
    font-size: 1.5rem;
  }
  
  .redirect-card {
    padding: 2rem;
    margin: 1rem 0;
  }
  
  .title {
    font-size: 1.5rem;
  }
  
  .message p {
    font-size: 1rem;
  }
  
  .url-link {
    font-size: 1.125rem;
  }
  
  .url-logo {
    width: 28px;
    height: 28px;
  }
  
  .buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .logo-image {
    height: 36px;
  }
  
  .logo h1 {
    font-size: 1.25rem;
  }
  
  .redirect-card {
    padding: 1.5rem;
    margin: 0.5rem 0;
  }
  
  .title {
    font-size: 1.25rem;
  }
  
  .icon-wrapper i {
    font-size: 2.5rem;
  }
  
  .theme-toggle {
    width: 36px;
    height: 36px;
  }
  
  .url-logo {
    width: 24px;
    height: 24px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus states */
.btn:focus,
.theme-toggle:focus,
.url-link:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-light);
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --border: hsl(0 0% 50%);
  }
  
  [data-theme="dark"] {
    --border: hsl(0 0% 70%);
  }
}

/* Loading state for cancelled redirect */
.cancelled {
  opacity: 0.6;
}

.cancelled .progress-fill {
  animation-play-state: paused;
}

.cancelled .countdown-text {
  color: var(--warning);
}

.cancelled .countdown-text::after {
  content: " (zrušeno)";
  font-weight: 600;
}