* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

body {
    color: #222;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 20px 80px;
}

header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.logo img {
    height: 60px;
    margin-right: 12px;
    border-radius: 12px;
}

.logo h1 {
    font-size: 28px;
    color: #fe620f;
    font-weight: 700;
    letter-spacing: 2px;
}

.description p {
    font-size: 18px;
    color: #666;
    font-weight: 500;
}

main {
    background-color: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.input-area {
    margin-bottom: 24px;
}

textarea {
    width: 100%;
    height: 100px;
    padding: 16px;
    border: 1.5px solid #ffc6a7;
    border-radius: 10px;
    resize: none;
    font-size: 18px;
    margin-bottom: 16px;
    background: rgba(255,255,255,0.95);
    color: #fe620f;
    font-weight: 500;
    box-shadow: rgba(254, 98, 15, 0.33) 0px 2px 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.input-area.active textarea {
    border-color: #fe620f;
    box-shadow: rgba(254, 98, 15, 0.45) 0px 4px 12px;
}

textarea:focus {
    border-color: #fe620f;
    box-shadow: rgba(254, 98, 15, 0.45) 0px 4px 12px;
}

textarea::placeholder {
    color: #ffae7b;
    opacity: 1;
}

button {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.2s;
    outline: none;
}

#parse-btn {
    background: linear-gradient(90deg, #fe620f 0%, #ffb58e 100%);
    color: white;
    margin-right: 12px;
    box-shadow: rgba(254, 98, 15, 0.55) 0px 4px 16px;
    letter-spacing: 2px;
}

#parse-btn:hover {
    filter: brightness(1.05);
    box-shadow: rgba(254, 98, 15, 0.75) 0px 6px 20px;
}

#clear-btn {
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #eee;
}

#clear-btn:hover {
    background-color: #eee;
}

.result-area {
    margin-top: 24px;
    animation: fadeIn 0.5s ease-in-out;
}

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

.video-info {
    display: flex;
    margin-bottom: 24px;
    background: #fafafa;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.video-preview {
    width: 180px;
    height: 180px;
    overflow: hidden;
    border-radius: 8px;
    margin-right: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.video-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.video-preview img:hover {
    transform: scale(1.05);
}

.video-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.video-details h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #333;
    line-height: 1.4;
  	overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    text-overflow: ellipsis;
}

.video-details p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.button-group {
    display: flex;
    margin-top: 16px;
    justify-content: center;
}

.download-options {
    display: flex;
    margin-top: auto;
}

.download-options a {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  transition: all 0.2s;
  outline: none;
  text-decoration: none;
}

#download-video, #download-cover {
    background: linear-gradient(90deg, #fe620f 0%, #ffb58e 100%);
    color: white;
    margin-right: 12px;
    box-shadow: rgba(254, 98, 15, 0.55) 0px 4px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#download-video:hover, #download-cover:hover {
    filter: brightness(1.05);
    box-shadow: rgba(254, 98, 15, 0.75) 0px 6px 16px;
}

.downloading {
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

#download-video:before {
    content: "\f019"; /* Font Awesome download icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

#download-cover:before {
    content: "\f019"; /* Font Awesome music icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.video-player {
    margin-top: 24px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.video-player video {
    width: 100%;
    border-radius: 12px;
    background: #000;
}

.loading {
    text-align: center;
    padding: 40px 0;
    animation: fadeIn 0.3s ease-in-out;
}

.spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    border: 4px solid rgba(254, 98, 15, 0.1);
    border-radius: 50%;
    border-top-color: #fe620f;
    animation: spin 1s linear infinite;
}

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

.loading p {
    color: #666;
    font-size: 16px;
    font-weight: 500;
}

footer {
    text-align: center;
    font-size: 14px;
    color: #999;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fe620f;
}

.result-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.result-header h2 {
    font-size: 20px;
    color: #fe620f;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 透明层样式 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-in-out;
}

.overlay-content {
    background-color: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}

.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(90deg, #fe620f 0%, #ffb58e 100%);
    color: white;
}

.overlay-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.overlay-header button {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.overlay-header button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.overlay-body {
    padding: 20px;
}

.info-item {
    display: flex;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #666;
    width: 120px;
    flex-shrink: 0;
}

.info-value {
    flex: 1;
    color: #333;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 添加响应式布局 */
@media (max-width: 768px) {
    .container {
        padding: 20px 16px 60px;
    }
    
    main {
        padding: 20px 16px;
    }
    
    .description p {
        font-size: 16px;
    }
    
    .overlay-content {
        width: 95%;
    }
    
    .info-item {
        flex-direction: column;
    }
    
    .info-label {
        width: 100%;
        margin-bottom: 4px;
    }
}

@media (max-width: 600px) {
    .video-info {
        flex-direction: column;
    }
    
    .video-preview {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    button {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    textarea {
        font-size: 16px;
        padding: 12px;
    }

    .download-options a {
        padding: 8px 16px;
        font-size: 14px;
    }
}
