/* 现代化CSS样式 - 直升机小队FOV视角计算器 */

:root {
  --primary-color: #3a7bd5;
  --secondary-color: #2962ff;
  --accent-color: #ff9800;
  --dark-color: #212121;
  --light-color: #f5f5f5;
  --text-color: #333;
  --success-color: #4caf50;
  --error-color: #f44336;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  min-height: 100vh;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
}

.main-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow: hidden;
}

html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.image-container {
  width: 50%;
  background-image: url('../img/bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  z-index: 1;
}

/* 斜线分割效果 */
.image-container {
  width: 50%;
  background-image: url('../img/bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
  z-index: 1;
}

.form-container {
  width: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  background: white;
  position: relative;
  clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%);
  z-index: 2;
}

.container {
  width: 100%;
  max-width: 500px;
  text-align: center;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 2.2rem;
  font-weight: 700;
}

.subtitle {
  color: var(--text-color);
  margin-bottom: 30px;
  font-size: 1.1rem;
  opacity: 0.8;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark-color);
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.1);
}

.form-group small {
  color: #666;
  font-size: 0.85rem;
  margin-top: 5px;
  display: block;
}

.btn-calculate {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  margin-top: 10px;
}

.btn-calculate:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(58, 123, 213, 0.2);
}

.btn-calculate:active {
  transform: translateY(0);
}

.results {
  margin-top: 30px;
  padding: 20px;
  background: var(--light-color);
  border-radius: 12px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.results h3 {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 12px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.result-item label {
  font-weight: 600;
  color: var(--dark-color);
}

.result-item input {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
  text-align: right;
  width: 100px;
}

.footer {
  margin-top: 30px;
  text-align: center;
}

.footer a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.footer a:hover {
  text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 992px) {
  .main-container {
    flex-direction: column;
  }
  
  .image-container {
    width: 100%;
    height: 50vh;
  }
  
  .image-container::after {
    display: none;
  }
  
  .form-container {
    width: 100%;
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .image-container {
    height: 40vh;
  }
  
  .container {
    padding: 15px;
    max-height: 95vh;
  }
  
  h1 {
    font-size: 1.6rem;
    margin-bottom: 8px;
  }
  
  .subtitle {
    font-size: 1rem;
    margin-bottom: 20px;
  }
  
  .form-group {
    margin-bottom: 15px;
  }
  
  .form-group label {
    font-size: 0.9rem;
  }
  
  .form-group input {
    padding: 10px;
    font-size: 0.9rem;
  }
  
  .btn-calculate {
    padding: 12px 20px;
    font-size: 1rem;
  }
  
  .results {
    margin-top: 20px;
    padding: 15px;
  }
  
  .results h3 {
    font-size: 1.3rem;
  }
  
  .result-item {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 10px;
    padding: 10px;
  }
  
  .result-item input {
    text-align: left;
    margin-top: 5px;
    width: 100%;
    font-size: 1.1rem;
  }
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  margin-left: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 成功提示动画 */
.success-animation {
  animation: successPulse 1s ease-in-out;
}

@keyframes successPulse {
  0%, 100% { background-color: var(--primary-color); }
  50% { background-color: var(--success-color); }
}