/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  overflow-x: hidden;
}

.container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 0 15px;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeOut 3s ease-in-out 2s forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.dna-loader {
  text-align: center;
  color: white;
}

.dna-helix-loader {
  width: 80px;
  height: 120px;
  position: relative;
  margin: 0 auto 20px;
}

.dna-base {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  animation: dnaRotate 2s linear infinite;
}

@keyframes dnaRotate {
  0% { transform: rotateY(0deg) rotateX(0deg) translateZ(40px); }
  100% { transform: rotateY(360deg) rotateX(360deg) translateZ(40px); }
}

.dna-base.a {
  background: #ff6b6b;
  top: 0;
  left: 0;
  animation-delay: 0s;
}

.dna-base.t {
  background: #4ecdc4;
  top: 0;
  right: 0;
  animation-delay: 0.5s;
}

.dna-base.g {
  background: #45b7d1;
  bottom: 0;
  left: 0;
  animation-delay: 1s;
}

.dna-base.c {
  background: #96ceb4;
  bottom: 0;
  right: 0;
  animation-delay: 1.5s;
}

/* Header */
.main-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.header-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.main-header:hover .header-background {
  opacity: 0.1;
}

.navigation {
  position: relative;
  z-index: 2;
}

.nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-container {
  display: flex;
  gap: 10px;
  align-items: center;
}

.logo-project {
  position: relative;
  width: auto;
  height: 30px;
}

.name-line {
  position: absolute;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #667eea, #764ba2);
  border-radius: 2px;
  animation: mininame-line 3s linear infinite;
}

@keyframes mininame-line {
  0%, 100% { transform: rotateY(0deg); }
  50% { transform: rotateY(360deg); }
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.floating-molecules {
  position: absolute;
  width: 100%;
  height: 100%;
}

.molecule {
  position: absolute;
  font-size: 2rem;
  animation: float 6s ease-in-out infinite;
  opacity: 0.3;
}

.molecule-1 { top: 10%; left: 10%; animation-delay: 0s; }
.molecule-2 { top: 20%; right: 15%; animation-delay: 1s; }
.molecule-3 { top: 60%; left: 5%; animation-delay: 2s; }
.molecule-4 { bottom: 20%; right: 10%; animation-delay: 3s; }
.molecule-5 { top: 40%; left: 80%; animation-delay: 4s; }
.molecule-6 { bottom: 10%; left: 70%; animation-delay: 5s; }
.molecule-7 { bottom: 10%; left: 50%; animation-delay: 4s; }
.molecule-8 { top: 10%; right: 60%; animation-delay: 5s; }

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(120deg); }
  66% { transform: translateY(10px) rotate(240deg); }
}

.hero-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  z-index: 2;
}

.hero-text {
  color: white;
  flex: 1;
  min-width: 300px;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.title-line {
  display: block;
  animation: slideInLeft 1s ease-out forwards;
  opacity: 0;
  transform: translateX(-50px);
}

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.title-line:nth-child(1) { animation-delay: 0.2s; }
.title-line:nth-child(2) { animation-delay: 0.4s; }
.title-line:nth-child(3) { animation-delay: 0.6s; }

.highlight {
  background: linear-gradient(45deg, #ff6b6b, #4ecda5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: fadeInUp 1s ease-out 0.8s forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  to {
    opacity: 0.9;
    transform: translateY(0);
  }
  from {
    transform: translateY(20px);
  }
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  animation: fadeInUp 1s ease-out 1s forwards;
  opacity: 0;
}

.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: white;
  color: #667eea;
  transform: translateY(-3px);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: spin 9s ease-in-out infinite;
  flex: 1;
  min-width: 300px;
}

@keyframes spin {
  0% { transform: translateY(0); }
  50% { transform: translateY(-40px); }
  100% { transform: translateY(0); }
}

.cell-animation {
  width: 300px;
  height: 300px;
  position: relative;
  animation: cellPulse 4s ease-in-out infinite;
}

@keyframes cellPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.cell-membrane {
  width: 100%;
  height: 100%;
  border: 4px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  position: absolute;
  animation: membraneRotate 20s linear infinite;
}

@keyframes membraneRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.nucleus-animated {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, #ff6b6b, #e74c3c);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: nucleusPulse 3s ease-in-out infinite;
}

@keyframes nucleusPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.1); }
}

.chromosome {
  width: 15px;
  height: 3px;
  background: white;
  border-radius: 2px;
  margin: 2px;
  animation: chromosomeWiggle 2s ease-in-out infinite;
}

.chromosome:nth-child(2) { animation-delay: 0.5s; }
.chromosome:nth-child(3) { animation-delay: 1s; }

@keyframes chromosomeWiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  75% { transform: rotate(-5deg); }
}

.mitochondria-animated {
  position: absolute;
  top: 20%;
  right: 20%;
  width: 40px;
  height: 20px;
  background: linear-gradient(45deg, #4ecdc4, #45b7d1);
  border-radius: 20px;
  animation: organelleFloat 4s ease-in-out infinite;
}

.ribosome-animated {
  position: absolute;
  bottom: 30%;
  left: 25%;
  width: 15px;
  height: 15px;
  background: #96ceb4;
  border-radius: 50%;
  animation: organelleFloat 3s ease-in-out infinite 1s;
}

.er-animated {
  position: absolute;
  top: 30%;
  left: 15%;
  width: 60px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.6);
  border-radius: 15px;
  animation: organelleFloat 5s ease-in-out infinite 0.5s;
}

@keyframes organelleFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Responsive Styles */

/* Desktop: min-width: 1024px */
@media (min-width: 1024px) {
  .nav-container {
    padding: 1rem 2rem;
  }

  .logo {
    font-size: 1.8rem;
  }

  .hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 0 2rem;
  }

  .hero-text {
    padding-right: 150px;
  }

  .hero-title {
    font-size: 4rem;
  }

  .hero-subtitle {
    font-size: 1.3rem;
  }

  .cell-animation {
    width: 300px;
    height: 300px;
  }

  .molecule {
    font-size: 2rem;
  }
}

/* Tablet: min-width: 740px and max-width: 1023px */
@media (min-width: 740px) and (max-width: 1023px) {
  .nav-container {
    padding: 0.8rem 1.5rem;
  }
  .title-line{
    display: inline-block;
  }
  .highlight{
    display: block;
  }

  .logo {
    font-size: 1.5rem;
  }

  .logo-project {
    height: 25px;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    padding: 0 1.5rem;
  }

  .hero-text {
    padding-right: 0;
    order: 1;
  }

  .hero-visual {
    order: 2;
    margin-top: 50px;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 1.4rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .cell-animation {
    width: 250px;
    height: 250px;
  }

  .nucleus-animated {
    width: 60px;
    height: 60px;
  }

  .mitochondria-animated {
    width: 30px;
    height: 15px;
  }

  .er-animated {
    width: 50px;
    height: 25px;
  }

  .molecule {
    font-size: 1.5rem;
  }
}

/* Mobile: max-width: 740px */
@media (max-width: 740px) {
  .nav-container {
    padding: 0.5rem 1rem;
  }

  .logo {
    font-size: 1.2rem;
  }

  .logo-project {
    height: 20px;
  }

  .name-line {
    width: 3px;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    padding: 4rem 1rem;
  }

  .hero-text {
    padding-right: 0;
    order: 1;
  }

  .hero-visual {
    order: 2;
    margin-top: 50px;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 1.4rem;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }

  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    width: 100%;
    max-width: 300px;
  }

  .cell-animation {
    width: 200px;
    height: 200px;
  }

  .nucleus-animated {
    width: 50px;
    height: 50px;
  }

  .mitochondria-animated {
    width: 25px;
    height: 12px;
  }

  .ribosome-animated {
    width: 10px;
    height: 10px;
  }

  .er-animated {
    width: 40px;
    height: 20px;
  }

  .molecule {
    font-size: 1.2rem;
  }

  .dna-helix-loader {
    width: 60px;
    height: 90px;
  }

  .dna-base {
    width: 14px;
    height: 14px;
  }

}
