﻿* {
    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;
    background-color: #E8E9F8;
}

.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: #6A70E8;
    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;
    box-shadow: 0 4px 20px rgba(106, 112, 232, 0.15);
}

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

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

.input-area.active textarea {
    border-color: #6A70E8;
    box-shadow: rgba(106, 112, 232, 0.45) 0px 4px 12px;
}

textarea:focus {
    border-color: #6A70E8;
    box-shadow: rgba(106, 112, 232, 0.45) 0px 4px 12px;
}

textarea::placeholder {
    color: #A5AAF0;
    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, #6A70E8 0%, #8B90F0 100%);
    color: white;
    margin-right: 12px;
    box-shadow: rgba(106, 112, 232, 0.55) 0px 4px 16px;
    letter-spacing: 2px;
}

#parse-btn:hover {
    filter: brightness(1.05);
    box-shadow: rgba(106, 112, 232, 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, #6A70E8 0%, #8B90F0 100%);
    color: white;
    margin-right: 12px;
    box-shadow: rgba(106, 112, 232, 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(106, 112, 232, 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(106, 112, 232, 0.1);
    border-radius: 50%;
    border-top-color: #6A70E8;
    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: #6A70E8;
}

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

.result-header h2 {
    font-size: 20px;
    color: #6A70E8;
    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, #6A70E8 0%, #8B90F0 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;
    }
}

/* 卡密验证弹窗样式 */
.card-modal {
    max-width: 500px;
    width: 90%;
}

.card-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.card-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-btn:hover {
    background-color: #f5f5f5;
    color: #333;
}

.card-modal-body {
    padding: 24px;
}

.card-instruction {
    color: #333;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.card-input-group {
    margin-bottom: 24px;
}

.card-input-group label {
    display: block;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.card-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #6A70E8;
    border-radius: 8px;
    font-size: 16px;
    color: #333;
    background-color: #fff;
    transition: all 0.3s;
    outline: none;
    box-sizing: border-box;
}

.card-input:focus {
    border-color: #6A70E8;
    box-shadow: 0 0 0 3px rgba(106, 112, 232, 0.1);
}

.card-input::placeholder {
    color: #999;
}

.card-error {
    margin-top: 8px;
    color: #f34b51;
    font-size: 13px;
    min-height: 20px;
}

.card-button-group {
    display: flex;
    gap: 12px;
}

.card-btn-primary {
    flex: 1;
    padding: 12px 24px;
    background: linear-gradient(90deg, #6A70E8 0%, #8B90F0 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(106, 112, 232, 0.3);
}

.card-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(106, 112, 232, 0.4);
}

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

.card-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.card-btn-secondary {
    flex: 1;
    padding: 12px 24px;
    background-color: #6C757D;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.card-btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

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

/* 购买卡密弹窗样式 */
.purchase-content {
    text-align: center;
}

.purchase-text {
    color: #333;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.purchase-image {
    margin-top: 20px;
}

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

@media (max-width: 600px) {
    .card-button-group {
        flex-direction: column;
    }
    
    .card-btn-primary,
    .card-btn-secondary {
        width: 100%;
    }
}
