/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  min-height: 100vh;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.container {
  max-width: 800px;
  width: 100%;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin: auto;
}

/* 标题样式 */
h1 {
  text-align: center;
  color: #00796b;
  margin-bottom: 30px;
  font-size: 2.5rem;
  font-weight: 600;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* 输入区域样式 */
.input-section {
  margin-bottom: 30px;
}

#urlInput {
  width: 100%;
  padding: 15px;
  border: 2px solid #00acc1;
  border-radius: 10px;
  font-size: 16px;
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
  transition: all 0.3s ease;
  background-color: #f5f5f5;
}

#urlInput:focus {
  outline: none;
  border-color: #00838f;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.1);
}

/* 按钮组样式 */
.button-group {
  display: flex;
  gap: 15px;
  margin-top: 15px;
  flex-wrap: wrap;
}

button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 150px;
}

#pasteBtn {
  background-color: #00acc1;
  color: white;
}

#pasteBtn:hover {
  background-color: #00838f;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 172, 193, 0.3);
}

#parseBtn {
  background-color: #00796b;
  color: white;
}

#parseBtn:hover {
  background-color: #004d40;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 121, 107, 0.3);
}

button:active {
  transform: translateY(0);
  box-shadow: none;
}

/* 消息提示样式 */
.message {
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 500;
  display: none;
  transition: all 0.3s ease;
}

.message.success {
  background-color: #e8f5e8;
  color: #2e7d32;
  border-left: 4px solid #4caf50;
}

.message.error {
  background-color: #ffebee;
  color: #c62828;
  border-left: 4px solid #f44336;
}

.message.info {
  background-color: #e3f2fd;
  color: #1565c0;
  border-left: 4px solid #2196f3;
}

/* 结果展示样式 */
.result {
  margin-top: 30px;
  padding: 20px;
  border-radius: 10px;
  background-color: #f0f8ff;
  border: 1px solid #b3e5fc;
}

.video-info {
  margin-bottom: 20px;
}

.video-info h3 {
  color: #00796b;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

/* 视频链接显示样式 */
.video-url-display {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  align-items: center;
}

#videoLinkDisplay {
  flex: 1;
  padding: 12px;
  border: 2px solid #00acc1;
  border-radius: 8px;
  font-size: 14px;
  background-color: #f5f5f5;
  font-family: 'Courier New', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#copyLinkBtn {
  padding: 12px 20px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

#copyLinkBtn:hover {
  background-color: #388e3c;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
}

#copyLinkBtn:active {
  transform: translateY(0);
  box-shadow: none;
}

.video-link {
    margin: 10px 0;
}

.video-link a {
  display: inline-block;
  padding: 10px 20px;
  background-color: #00acc1;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.video-link a:hover {
  background-color: #00838f;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 172, 193, 0.3);
}

.video-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    color: #856404;
}

.video-warning p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.video-cover {
    margin: 20px 0;
    text-align: center;
    display: flex;
    justify-content: center;
    height: 300px;
}

.video-cover img {
    height: 100%;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 视频播放器样式 */
.video-player {
  margin-top: 20px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#videoPlayer {
  width: 100%;
  height: auto;
  display: block;
  border: none;
}

/* 响应式设计 */
@media (max-width: 600px) {
  .container {
    margin: 20px;
    padding: 15px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  button {
    width: 100%;
  }
}