/* Reset a základní styly */
* { 
  margin:0; 
  padding:0; 
  box-sizing:border-box; 
  scroll-behavior:smooth; 
}

body {
  font-family: 'Poppins', sans-serif;
  background: #0d0d0d;
  color: #f5f5f5;
  overflow-x: hidden;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Canvas pozadí - Mobile Fix */
canvas#bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none; /* Důležité: aby šlo klikat na obsah */
  /* Hardwarová akcelerace pro plynulost */
  will-change: transform;
  transform: translateZ(0); 
}

/* Navigace */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem 0;
  background: rgba(13, 13, 13, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  padding: 0.7rem 0;
  background: rgba(13, 13, 13, 0.95);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: #00e5ff;
  text-decoration: none;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.nav-logo a:hover {
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.7);
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: #f5f5f5;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover {
  color: #00e5ff;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #00e5ff;
  transition: width 0.3s;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 5px;
}

.bar {
  width: 25px;
  height: 3px;
  background: #f5f5f5;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 2rem;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  gap: 3rem;
}

.hero-text {
  flex: 1;
  text-align: left;
}

.hero h1 {
  font-size: 3.5rem;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  line-height: 1.2;
  font-weight: 700;
}

.hero h1 span { 
  color: #00e5ff; 
}

/* Neon blink efekt */
.neon {
  color: #00e5ff;
  text-shadow:
    0 0 5px #00e5ff,
    0 0 10px #00e5ff,
    0 0 20px #00e5ff,
    0 0 40px #00e5ff;
  transition: text-shadow 0.05s linear, opacity 0.05s linear;
}

/* Typewriter */
.typewriter {
  font-size: 1.8rem;
  color: #00e5ff;
  height: 2.5rem;
  margin-bottom: 2rem;
  font-weight: 500;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: #00e5ff;
  color: #0d0d0d;
}

.btn-primary:hover {
  background: transparent;
  color: #00e5ff;
  border-color: #00e5ff;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: #00e5ff;
  border: 2px solid #00e5ff;
}

.btn-secondary:hover {
  background: #00e5ff;
  color: #0d0d0d;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
  transform: translateY(-2px);
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.floating-card {
  background: rgba(20, 20, 20, 0.7);
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  width: 140px;
  height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(0, 229, 255, 0.3);
  animation: float 6s ease-in-out infinite;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.floating-card:nth-child(2) {
  animation-delay: 2s;
}

.floating-card:nth-child(3) {
  animation-delay: 4s;
}

.floating-card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 15px 30px rgba(0, 229, 255, 0.4);
  border-color: rgba(0, 229, 255, 0.6);
}

.floating-card i {
  font-size: 2.5rem;
  color: #00e5ff;
  margin-bottom: 0.8rem;
  transition: all 0.3s ease;
}

.floating-card:hover i {
  transform: scale(1.2);
  text-shadow: 0 0 15px rgba(0, 229, 255, 0.7);
}

.floating-card h3 {
  font-size: 0.95rem;
  color: #f5f5f5;
  text-align: center;
  line-height: 1.3;
  font-weight: 500;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #00e5ff;
  font-size: 0.9rem;
  opacity: 0.8;
}

.arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid #00e5ff;
  border-bottom: 2px solid #00e5ff;
  transform: rotate(45deg);
  margin: 5px auto;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: rotate(45deg) translateY(0); }
  40% { transform: rotate(45deg) translateY(-10px); }
  60% { transform: rotate(45deg) translateY(-5px); }
}

/* Sekce */
section {
  padding: 6rem 0;
  position: relative;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: #00e5ff;
  letter-spacing: 1px;
  position: relative;
  font-weight: 600;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: #00e5ff;
  border-radius: 2px;
}

/* O mně */
.about-content {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.about-text {
  flex: 1;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: #ccc;
}

.skills h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #00e5ff;
  font-weight: 600;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.skill-tag {
  background: rgba(0, 229, 255, 0.1);
  color: #00e5ff;
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 1px solid rgba(0, 229, 255, 0.3);
  transition: all 0.3s ease;
  font-weight: 500;
}

.skill-tag:hover {
  background: rgba(0, 229, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 229, 255, 0.2);
}

.about-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.visual-element {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  border: 2px solid rgba(0, 229, 255, 0.3);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.pulse {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 0.3; }
  100% { transform: scale(0.8); opacity: 0.7; }
}

/* Projekty */
.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2.5rem;
  justify-items: center;
}

/* Karty projektů */
.card {
  background: rgba(20, 20, 20, 0.85);
  border-radius: 15px;
  padding: 2rem;
  border: 1px solid rgba(0, 229, 255, 0.3);
  text-align: left;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow-wrap: break-word;
  position: relative;
  overflow: hidden;
  min-height: 280px;
  backdrop-filter: blur(10px);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(0, 229, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.card:hover::before {
  transform: translateX(100%);
}

.card a { 
  text-decoration: none; 
  color: inherit; 
  display: block; 
  flex-grow: 1;
}

.card:hover {
  transform: translateY(-15px) scale(1.05);
  box-shadow: 0 20px 40px rgba(0, 229, 255, 0.4), 0 0 0 1px rgba(0, 229, 255, 0.2);
  border: 1px solid rgba(0, 229, 255, 0.8);
  background: rgba(30, 30, 30, 0.95);
}

.card-icon {
  font-size: 2.5rem;
  color: #00e5ff;
  margin-bottom: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.card:hover .card-icon {
  transform: scale(1.2) rotate(5deg);
  text-shadow: 0 0 15px rgba(0, 229, 255, 0.7);
}

/* Neon overlay na hover */
.card:hover h3 { 
  text-shadow: 0 0 10px #00e5ff, 0 0 20px #00e5ff, 0 0 30px #00e5ff; 
  transform: translateY(-3px);
}

.card:hover p { 
  text-shadow: 0 0 5px #00e5ff; 
  transform: translateY(-2px);
}

/* Nadpisy karet */
.card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: #00e5ff;
  word-break: break-word;
  transition: all 0.3s ease;
  font-weight: 600;
  line-height: 1.3;
}

.card p {
  font-size: 1.05rem;
  color: #ccc;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.project-status {
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.card:hover .project-status {
  transform: scale(1.05);
}

.project-status.active {
  background: rgba(0, 255, 0, 0.2);
  color: #00ff00;
  border: 1px solid rgba(0, 255, 0, 0.3);
}

.project-status.archived {
  background: rgba(255, 165, 0, 0.2);
  color: #ffa500;
  border: 1px solid rgba(255, 165, 0, 0.3);
}

.project-status.inactive {
  background: rgba(255, 0, 0, 0.2);
  color: #ff5555;
  border: 1px solid rgba(255, 0, 0, 0.3);
}

/* Kontakt */
.contact-content {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.contact-info {
  flex: 1;
}

.contact-info p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: #ccc;
}

.form-explanation {
  background: rgba(20, 20, 20, 0.7);
  border-radius: 10px;
  padding: 1.5rem;
  border: 1px solid rgba(0, 229, 255, 0.2);
  margin-top: 2rem;
  backdrop-filter: blur(10px);
}

.form-explanation h3 {
  color: #00e5ff;
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.form-explanation p {
  font-size: 0.95rem;
  color: #aaa;
  line-height: 1.5;
  margin-bottom: 0;
}

.contact-form {
  flex: 1;
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  background: rgba(20, 20, 20, 0.8);
  color: #f5f5f5;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #00e5ff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
  background: rgba(30, 30, 30, 0.9);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #888;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Styly pro validaci formuláře - OPRAVENÉ */
.form-group input.valid,
.form-group textarea.valid {
  border-color: #00ff00 !important;
  box-shadow: 0 0 5px rgba(0, 255, 0, 0.3) !important;
}

.form-group input.invalid,
.form-group textarea.invalid {
  border-color: #ff5555 !important;
  box-shadow: 0 0 5px rgba(255, 85, 85, 0.3) !important;
}

/* Zajistí, že prázdná pole mají defaultní vzhled */
.form-group input:not(.valid):not(.invalid),
.form-group textarea:not(.valid):not(.invalid) {
  border-color: rgba(0, 229, 255, 0.3) !important;
  box-shadow: none !important;
}

.error-message {
  color: #ff5555;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  display: none;
  font-weight: 500;
}

.form-success {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #00ff00;
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(0, 255, 0, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 0, 0.3);
  animation: fadeIn 0.5s ease;
}

.form-success i {
  font-size: 1.2rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Styly pro našeptávač emailů */
.email-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(30, 30, 30, 0.95);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-top: none;
  border-radius: 0 0 8px 8px;
  z-index: 100;
  display: none;
  backdrop-filter: blur(10px);
  max-height: 150px;
  overflow-y: auto;
}

.email-suggestion {
  padding: 0.8rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ccc;
  font-size: 0.9rem;
}

.email-suggestion:last-child {
  border-bottom: none;
}

.email-suggestion:hover {
  background: rgba(0, 229, 255, 0.2);
  color: #00e5ff;
}

/* Skrolbar pro našeptávač */
.email-suggestions::-webkit-scrollbar {
  width: 6px;
}

.email-suggestions::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.email-suggestions::-webkit-scrollbar-thumb {
  background: #00e5ff;
  border-radius: 3px;
}

.email-suggestions::-webkit-scrollbar-thumb:hover {
  background: #00b8d4;
}

/* Footer */
footer {
  background: rgba(10, 10, 10, 0.95);
  padding: 3rem 0 1rem;
  border-top: 1px solid rgba(0, 229, 255, 0.3);
  backdrop-filter: blur(10px);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo h3 {
  color: #00e5ff;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.footer-logo p {
  color: #888;
  font-size: 0.9rem;
  max-width: 200px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

.footer-links a:hover {
  color: #00e5ff;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: #ccc;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.footer-social a:hover {
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.2);
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #888;
  font-size: 0.9rem;
}

/* Fade-in */
.fade-in { 
  opacity:0; 
  transform:translateY(20px); 
  transition: opacity 0.8s ease-out, transform 0.8s ease-out; 
}

.fade-in.show { 
  opacity:1; 
  transform:translateY(0); 
}

/* Responsivita */
@media screen and (max-width: 992px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  
  .hero-text {
    text-align: center;
  }
  
  .about-content {
    flex-direction: column;
    gap: 2rem;
  }
  
  .contact-content {
    flex-direction: column;
    gap: 2rem;
  }
  
  .project-cards {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
  }
}

@media screen and (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    flex-direction: column;
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(10px);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
    gap: 1.5rem;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero h1 { 
    font-size: 2.5rem; 
  }
  
  .typewriter { 
    font-size: 1.4rem; 
  }
  
  .section-title { 
    font-size: 2rem; 
  }
  
  .project-cards {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
  
  .footer-links {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .floating-card {
    width: 120px;
    height: 120px;
  }
  
  .floating-card i {
    font-size: 2rem;
  }
  
  .floating-card h3 {
    font-size: 0.85rem;
  }
  
  .card {
    padding: 1.5rem;
    min-height: 250px;
  }
}

@media screen and (max-width: 480px) {
  .hero {
    padding: 0 1rem;
  }
  
  .hero h1 { 
    font-size: 2rem; 
  }
  
  .typewriter { 
    font-size: 1.2rem; 
    height: 2rem;
  }
  
  .section-title { 
    font-size: 1.8rem; 
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }
  
  .btn {
    width: 100%;
    text-align: center;
  }
  
  .floating-card {
    width: 100px;
    height: 100px;
    padding: 1rem;
  }
  
  .floating-card i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .floating-card h3 {
    font-size: 0.75rem;
  }
  
  .project-cards {
    grid-template-columns: 1fr;
  }
  
  .card {
    padding: 1.2rem;
    min-height: 220px;
  }
  
  .card h3 {
    font-size: 1.2rem;
  }
  
  .card p {
    font-size: 0.95rem;
  }
  
  .container {
    padding: 0 15px;
  }
  
  section {
    padding: 4rem 0;
  }
  
  .email-suggestions {
    max-height: 120px;
  }
  
  .email-suggestion {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
  }
}

/* Utility třídy */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* Loading animace */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #00e5ff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0d0d0d;
}

::-webkit-scrollbar-thumb {
  background: #00e5ff;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #00b8d4;
}

/* Selection styling */
::selection {
  background: rgba(0, 229, 255, 0.3);
  color: #00e5ff;
}

::-moz-selection {
  background: rgba(0, 229, 255, 0.3);
  color: #00e5ff;
}

/* Focus outline pro přístupnost */
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid #00e5ff;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .navbar,
  .hero-visual,
  .scroll-indicator,
  .footer-social,
  .btn {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .neon {
    color: #0066cc !important;
    text-shadow: none !important;
  }
}