/* Global CSS Variables */
:root {
  --primary-color: #2C3E50;
  --accent-color: #3498DB;
  --gradient-start: #2980B9;
  --gradient-end: #6DD5FA;
  --text-color: #2C3E50;
  --background-light: #f8f9fa;
  --header-blue: #2980B9;
}

/* Base Styles */
html {
  scroll-behavior: smooth;
}

body { 
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--background-light) 0%, #ffffff 100%);
  color: var(--text-color);
  line-height: 1.6;
}

/* Navigation */
nav {
  background: linear-gradient(90deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  padding: 1rem;
  box-shadow: 0 2px 15px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

nav a {
  color: white;
  margin: 0 1.2rem;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: all 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: white;
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Main Content */
main {
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
  box-sizing: border-box;
}

/* Typography */
h1 {
  color: var(--header-blue);
  font-size: 2rem;
  margin: 0 0 1.5rem 0;
  position: relative;
  padding-bottom: 0.5rem;
}

h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--header-blue);
  border-radius: 2px;
}

h2 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
}

/* Content Sections */
.content-wrapper {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  backdrop-filter: blur(10px);
  padding: 2rem;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Model/Animation Display and Description Layout */
.content-wrapper > h1 {
  width: 100%;
  margin-bottom: 0;
}

.model-description-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

/* Model/Animation Display */
.model-container {
  flex: 0 0 500px;
  height: 400px;
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.model-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 15px;
}

/* Description Text */
.description {
  flex: 1;
  background: white;
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  margin: 0;
  min-width: 0;
}

.description p {
  margin-bottom: 1rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

.description p:last-child {
  margin-bottom: 0;
}

/* Content Text Styles */
p, li {
  font-size: 1rem;
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: 1rem;
}

ol, ul {
  padding-left: 1.5rem;
  margin: 1.5rem 0;
}

/* Mechanism Section */
.mechanism {
  margin-top: 2rem;
}

.mechanism-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 1rem 0;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Footer */
footer {
  background: linear-gradient(90deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  text-align: center;
  padding: 1.5rem;
  margin-top: 2rem;
}

footer img {
  transition: transform 0.3s ease;
}

footer img:hover {
  transform: scale(1.1);
}

/* Selection */
::selection {
  background: var(--accent-color);
  color: white;
}

/* Mobile Responsive */
@media screen and (max-width: 1200px) {
  .model-description-container {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .model-container {
    flex: 0 0 auto;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1/1;
    height: auto;
    margin: 0 auto;
  }
  
  .description {
    width: auto;
    padding: 1.25rem;
  }
}

@media screen and (max-width: 768px) {
  main {
    padding: 1rem;
  }
  
  .content-wrapper {
    padding: 1.25rem;
    gap: 1.25rem;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  .description {
    font-size: 1rem;
    padding: 1rem;
  }
  
  .model-description-container {
    gap: 1.25rem;
  }
  
  nav {
    padding: 0.8rem;
  }
  
  nav a {
    margin: 0 0.8rem;
    font-size: 0.9rem;
  }
} 