:root {
    --bg-pink: #ffe2e2;
    --bg-purple: #cdb4db;
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.6);
    --text-main: #333;
    --active-gradient: linear-gradient(135deg, #c471ed 0%, #f64f59 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Roboto, Arial, sans-serif;
}

body {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    background: linear-gradient(135deg, #fff5f7 0%, #fff0f5 100%);
    position: relative;
}

.wave-bg {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.wave {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.8;
}

.wave-1 {
    background: #e0c3fc;
    width: 150vw;
    height: 150vw;
    bottom: -90vw;
    left: -20vw;
    animation: float 10s ease-in-out infinite alternate;
}

.wave-2 {
    background: #ffdde1;
    width: 120vw;
    height: 120vw;
    bottom: -60vw;
    right: -30vw;
    opacity: 0.6;
    animation: float 15s ease-in-out infinite alternate-reverse;
}

.wave-3 {
    background: linear-gradient(45deg, #dab6fc, #ffb7b2);
    width: 180vw;
    height: 60vh;
    bottom: -20vh;
    left: -40vw;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    transform: rotate(-5deg);
    filter: blur(40px);
    opacity: 0.5;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(20px) rotate(2deg); }
}

.container {
    width: 680px;
    max-width: 90%;
    padding: 40px 45px;
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255,255,255,0.5);
    display: flex;
    flex-direction: column;
    gap: 24px;
    transition: transform 0.3s ease;
    position: relative;
}

h1 {
    font-weight: 700;
    font-size: 24px;
    text-align: center;
    color: #444;
    letter-spacing: -0.5px;
    margin-bottom: 5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 5px;
}

#videoUrl {
    width: 100%;
    padding: 16px 24px;
    font-size: 15px;
    border: none;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 2px 6px rgba(166, 166, 166, 0.1);
    outline: none;
    transition: all 0.3s ease;
    z-index: 2;
}

#videoUrl:focus {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.url-hint {
    position: absolute;
    right: 12px;
    height: 100%;
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.input-wrapper.has-content .url-hint {
    opacity: 1;
    transform: translateX(0);
}

.input-wrapper.has-content #videoUrl {
    padding-right: 160px;
}

.badge {
    background: var(--active-gradient);
    color: white;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(196, 113, 237, 0.3);
    letter-spacing: 0.5px;
}

/* === 预览卡片 === */
.preview-card {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 0;
    display: flex;
    align-items: center;
    height: 0;
    opacity: 0;
    overflow: hidden;
    border: 1px solid transparent;
    margin-top: 0;
    margin-bottom: -24px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateY(-10px);
}

.preview-card.visible {
    opacity: 1;
    height: auto;
    margin-top: 5px;
    margin-bottom: 5px;
    padding: 12px;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(0);
}

.preview-thumb {
    width: 120px;
    height: 68px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
    margin-right: 15px;
}

.preview-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    height: 68px;
    gap: 6px; /* 标题和下方内容的间距 */
}

.preview-title {
    font-size: 18px; /* ✨ 修改为 18px */
    font-weight: 700;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    letter-spacing: -0.3px;
}

/* 下方行：包含作者、分割线、标签组 */
.preview-bottom-row {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* ✨ 靠左对齐 */
    width: 100%;
}

.preview-author {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 45%; /* 限制作者名最大宽度，防止挤占标签 */
    flex-shrink: 1;
}

/* ✨ 竖线分隔符样式 */
.info-separator {
    width: 1px;
    height: 10px;
    background-color: rgba(0,0,0,0.2);
    margin: 0 8px; /* 左右间距 */
    display: none; /* 默认隐藏，有标签时显示 */
}

/* 标签组样式 (水平排列) */
.info-badges {
    display: flex;
    flex-direction: row;
    gap: 5px;
    align-items: center;
    flex-shrink: 0;
}

.info-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    line-height: 1.3;
}

.badge-res {
    background: rgba(0, 0, 0, 0.06);
    color: #555;
    border: 1px solid rgba(0,0,0,0.05);
}
.badge-res.is-4k {
    background: linear-gradient(135deg, #FFD700 0%, #FDB931 100%);
    color: #8a6d0b;
    border: none;
    box-shadow: 0 1px 4px rgba(253, 185, 49, 0.2);
}

.badge-sub {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid rgba(21, 101, 192, 0.1);
}

.badge-none {
    background: #f0f0f0;
    color: #999;
    border: 1px solid rgba(0,0,0,0.05);
}

.options {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.checkbox-label {
    cursor: pointer;
    padding: 12px 18px;
    background: rgba(255,255,255,0.5);
    border-radius: 14px;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    user-select: none;
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border: 1px solid transparent;
}

.checkbox-label:hover {
    background: rgba(255,255,255,0.8);
    transform: translateY(-1px);
}

.checkbox-label input {
    display: none;
}

.checkbox-label.checked {
    background: var(--active-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(196, 113, 237, 0.35);
    transform: translateY(-2px);
}

.checkbox-label.checked:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

.path-info {
    font-size: 14px;
    color: #777;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    background: rgba(255, 255, 255, 0.3);
    padding: 12px 20px;
    border-radius: 16px;
    width: 100%;
}

.path-label {
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.path-input {
    font-family: inherit;
    background: transparent;
    border: none;
    color: #444;
    padding: 4px 0;
    flex: 1;
    width: auto;
    font-size: 14px;
    outline: none;
}

.path-input:focus {
    color: #222;
}

.path-input::placeholder {
    color: #aaa;
}

.result-area {
    position: relative;
    margin-top: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.result-area.visible {
    margin-top: 10px;
    height: 130px;
    opacity: 1;
    transform: translateY(0);
    overflow: visible;
}

textarea {
    width: 100%;
    height: 130px;
    padding: 16px;
    padding-bottom: 45px;
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,0.1);
    background: #212121;
    color: #a9ff68;
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
    font-size: 13px;
    line-height: 1.5;
    resize: none;
    outline: none;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.3);
}

.copy-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

.copy-btn:active {
    transform: scale(0.95);
}
