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

 body {
     font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
     background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
     min-height: 100vh;
     padding: 12px;
 }

 .container {
     max-width: 800px;
     margin: 0 auto;
     background: white;
     border-radius: 15px;
     box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
     overflow: hidden;
 }

 .header {
     background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
     padding: 14px;
     text-align: center;
     font-size: 18px;
 }

 .header h1 {
     color: #333;
     font-size: 23px;
     margin-bottom: -2px;
 }

 .header p {
     color: #666;
     font-size: 16px;
 }

 .content {
     padding: 18px;
 }

 .form-group {
     margin-bottom: 8px;
 }

 label {
     display: block;
     margin-bottom: 10px;
     font-weight: 600;
     color: #333;
     font-size: 16px;
 }

 input[type="text"] {
     width: 100%;
     padding: 15px;
     border: 2px solid #ddd;
     border-radius: 8px;
     font-size: 16px;
     transition: border-color 0.3s;
 }

 input[type="text"]:focus {
     border-color: #667eea;
     outline: none;
     box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
 }

 .btn {
     background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
     color: white;
     border: none;
     padding: 10px 27px;
     font-size: 16px;
     border-radius: 8px;
     cursor: pointer;
     width: 100%;
     font-weight: 600;
     transition: transform 0.2s, box-shadow 0.2s;
 }

 .btn:hover {
     transform: translateY(-2px);
     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
 }

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

 .result {
     margin-top: 30px;
     padding: 20px;
     border-radius: 8px;
     display: none;
 }

 .result.success {
     background: #d4edda;
     border: 1px solid #c3e6cb;
     color: #155724;
 }

 .result.error {
     background: #f8d7da;
     border: 1px solid #f5c6cb;
     color: #721c24;
 }

 .result h3 {
     margin-bottom: 6px;
     font-size: 16px;
 }

 .result-item {
     margin-bottom: 10px;
 }

 .result-item a {
     word-break: break-all;
     word-wrap: break-word;
     display: inline-block;
     max-width: 100%;
     vertical-align: middle;
 }

 .result-item span {
     word-break: break-all;
     word-wrap: break-word;
     display: inline-block;
     max-width: 100%;
     vertical-align: middle;
 }

 .result-label {
     font-weight: 600;
 }

 .download-btn {
     display: inline-block;
     background: #28a745;
     color: white;
     padding: 10px 20px;
     text-decoration: none;
     border-radius: 5px;
     margin-top: 15px;
     font-weight: 600;
 }

 .download-btn:hover {
     background: #218838;
 }

 .loading {
     display: none;
     text-align: center;
     margin: 20px 0;
 }

 .spinner {
     border: 4px solid #f3f3f3;
     border-top: 4px solid #667eea;
     border-radius: 50%;
     width: 40px;
     height: 40px;
     animation: spin 1s linear infinite;
     margin: 0 auto;
 }

 @keyframes spin {
     0% {
         transform: rotate(0deg);
     }

     100% {
         transform: rotate(360deg);
     }
 }

 .example {
     margin-top: 20px;
     padding: 15px;
     background: #f8f9fa;
     border-radius: 8px;
     font-size: 14px;
 }

 .example h4 {
     margin-bottom: 10px;
     color: #333;
 }

 .example p {
     color: #666;
     margin-bottom: 5px;
 }

 .caption-content {
     background: #e9ecef;
     border-radius: 5px;
     padding: 15px;
     margin-top: 15px;
     white-space: pre-wrap;
     word-break: break-word;
 }

 @media (max-width: 600px) {
     .container {
         margin: 0 5px;
     }

     .header {
         padding: 20px;
     }

     .header h1 {
         font-size: 24px;
     }

     .content {
         padding: 20px;
     }
 }

 .copy-btn {
     display: inline-block;
     background: #17a2b8;
     color: white;
     padding: 5px 10px;
     text-decoration: none;
     border-radius: 3px;
     margin-left: 10px;
     font-weight: 600;
     border: none;
     cursor: pointer;
     font-size: 14px;
     margin-top: 10px;
     margin-left: 0px;
 }

 .copy-btn:hover {
     background: #138496;
 }

 .copy-btn.copied {
     background: #28a745;
 }



.primary-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
}

.primary-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.primary-btn.loading {
    position: relative;
    pointer-events: none;
}

.primary-btn.loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 保持其他按钮样式 */
.copy-btn {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: 30px;
    margin-left: 10px;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .primary-btn {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 100px;
    }
    
    .copy-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}

  .result {
      margin-top: 12px;
      padding: 14px;
      border-radius: 4px;
  }

  .result.success {
      background-color: #d4edda;
      border: 1px solid #c3e6cb;
      color: #155724;
  }

  .result.error {
      background-color: #f8d7da;
      border: 1px solid #f5c6cb;
      color: #721c24;
  }

  .result-item {
      margin-bottom: 2px;
  }

  .result-label {
      font-weight: bold;
  }

  .copy-btn {
      margin-left: 10px;
      background-color: #28a745;
      color: white;
      border: none;
      padding: 5px 10px;
      border-radius: 3px;
      cursor: pointer;
      font-size: 14px;
  }

  .copy-btn:hover {
      background-color: #218838;
  }

  .download-btn {
      display: inline-block;
      margin-top: 10px;
      background-color: #ffc107;
      color: #212529;
      padding: 10px 20px;
      text-decoration: none;
      border-radius: 4px;
  }

  .caption-content {
      margin-top: 5px;
      padding: 10px;
      background-color: #f8f9fa;
      border-radius: 4px;
      white-space: pre-wrap;
  }

  .example {
      margin-top: 30px;
      padding: 15px;
      background-color: #e9ecef;
      border-radius: 4px;
  }

  .caption-segment {
      border: 1px solid #ddd;
      border-radius: 4px;
      padding: 10px;
      margin-bottom: 10px;
      background-color: #f9f9f9;
  }

  .caption-text {
      font-size: 16px;
      margin-bottom: 8px;
      line-height: 1.5;
  }

  .caption-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 15px;
      font-size: 12px;
      color: #666;
  }

  .caption-meta-item {
      display: flex;
      align-items: center;
  }

  .caption-meta-label {
      font-weight: bold;
      margin-right: 5px;
  }

  .srt-content {
      background-color: #f8f9fa;
      padding: 15px;
      border-radius: 4px;
      font-family: monospace;
      white-space: pre-wrap;
      margin-top: 10px;
      max-height: 200px;
      overflow-y: auto;
  }

  .tabs {
      display: flex;
      margin-bottom: 15px;
      border-bottom: 1px solid #ddd;
  }

  .tab {
      padding: 10px 20px;
      cursor: pointer;
      background-color: #f0f0f0;
      border: 1px solid #ddd;
      border-bottom: none;
      border-radius: 4px 4px 0 0;
      margin-right: 5px;
  }

  .tab.active {
      background-color: #007bff;
      color: white;
  }

  .tab-content {
      display: none;
  }

  .tab-content.active {
      display: block;
  }


/* 特别优化的字幕提取按钮 */
.subtitle-extract-btn {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(247, 147, 30, 0.3);
    min-width: 160px;
    display: block;
    margin: 20px auto;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.subtitle-extract-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #f7931e, #ff6b35);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(247, 147, 30, 0.4);
}

.subtitle-extract-btn:disabled {
    background: linear-gradient(135deg, #cccccc, #999999);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.subtitle-extract-btn.loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 20px;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.subtitle-extract-btn.loading span {
    padding-left: 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .subtitle-extract-btn {
        padding: 12px 25px;
        font-size: 15px;
        min-width: 140px;
        margin: 15px auto;
    }
    
    .subtitle-extract-btn.loading::before {
        left: 15px;
        width: 18px;
        height: 18px;
        margin-top: -9px;
    }
    
    .subtitle-extract-btn.loading span {
        padding-left: 25px;
    }
}