/* 微信公众号视频WXV获取工具 - 维语版样式文件 */
/* 文件名：salon.css */

/* 导入自定义维吾尔字体 */
@font-face {
    font-family: 'Hat';
    src: url('hat.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scroll-behavior: smooth;
}

body {
    font-family: 'Hat', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    direction: rtl;
    text-align: right;
}

/* 主容器 */
.main-container {
    width: 100%;
    max-width: 1000px;
    margin: 10px auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: containerAppear 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes containerAppear {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 玻璃态头部 */
.header {
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.9) 0%, rgba(37, 117, 252, 0.9) 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.header-content {
    position: relative;
    z-index: 2;
}

.logo {
    font-size: 40px;
    margin-bottom: 15px;
    color: white;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.header h1 {
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    letter-spacing: -0.5px;
    font-family: 'Hat', sans-serif;
}

.header p {
    opacity: 0.95;
    font-size: 16px;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.5;
    font-weight: 300;
    font-family: 'Hat', sans-serif;
}

/* 内容区域 */
.content {
    padding: 25px;
}

/* 输入区域 */
.input-section {
    margin-bottom: 30px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.5);
}

.input-label {
    display: block;
    margin-bottom: 15px;
    font-weight: 700;
    color: #1e293b;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Hat', sans-serif;
}

.input-wrapper {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: stretch;
    flex-direction: row-reverse;
}

.url-input {
    flex: 1;
    padding: 18px 20px;
    padding-left: 55px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 3px 10px rgba(0,0,0,0.05);
    font-family: 'Hat', 'Segoe UI', system-ui, sans-serif;
    direction: ltr;
    text-align: left;
}

.url-input:focus {
    border-color: #8b5cf6;
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15), inset 0 3px 10px rgba(0,0,0,0.05);
    transform: translateY(-1px);
}

/* 清空按钮 */
.clear-btn {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(148, 163, 184, 0.2);
    border: none;
    color: #64748b;
    font-size: 18px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.clear-btn:hover {
    background: rgba(148, 163, 184, 0.3);
    color: #475569;
}

.url-input:not(:placeholder-shown) + .clear-btn {
    display: flex;
}

/* 获取按钮 */
.get-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 0 35px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
    white-space: nowrap;
    min-height: 58px;
    flex-shrink: 0;
    font-family: 'Hat', sans-serif;
}

.get-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

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

.get-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 示例区域 */
.example-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(96, 165, 250, 0.1) 100%);
    border-radius: 12px;
    padding: 15px 20px;
    margin-top: 15px;
    border-right: 4px solid #3b82f6;
    border-left: none;
}

.example-text {
    color: #334155;
    font-size: 15px;
    word-break: break-all;
    line-height: 1.5;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s;
    direction: ltr;
    text-align: left;
}

.example-text:hover {
    background: rgba(59, 130, 246, 0.1);
}

/* 加载指示器 */
.loading-container {
    text-align: center;
    padding: 40px 20px;
    display: none;
}

.loading-container.active {
    display: block;
    animation: fadeIn 0.5s;
}

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

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(139, 92, 246, 0.1);
    border-top: 5px solid #8b5cf6;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-text {
    font-size: 18px;
    color: #4f46e5;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: 'Hat', sans-serif;
}

.loading-subtext {
    color: #64748b;
    font-size: 14px;
    opacity: 0.8;
    font-family: 'Hat', sans-serif;
}

/* 错误消息 */
.error-container {
    background: linear-gradient(135deg, rgba(254, 202, 202, 0.9) 0%, rgba(252, 165, 165, 0.9) 100%);
    border-radius: 14px;
    padding: 20px;
    margin: 20px 0;
    display: none;
    border-right: 5px solid #dc2626;
    border-left: none;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.error-container.active {
    display: block;
}

.error-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    color: #991b1b;
    font-family: 'Hat', sans-serif;
}

.error-header i {
    font-size: 24px;
}

.error-text {
    color: #7f1d1d;
    line-height: 1.5;
    font-size: 16px;
    font-family: 'Hat', sans-serif;
}

/* 结果区域 */
.result-container {
    margin-top: 30px;
    display: none;
}

.result-container.active {
    display: block;
    animation: slideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    flex-direction: row-reverse;
}

.result-header h2 {
    color: #1e293b;
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Hat', sans-serif;
}

/* 复制全部按钮 */
.copy-all-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
    font-family: 'Hat', sans-serif;
}

.copy-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(139, 92, 246, 0.4);
}

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

.result-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.5);
}

.result-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #cbd5e0;
}

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

.result-label {
    font-weight: 700;
    color: #475569;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 18px;
    font-family: 'Hat', sans-serif;
}

.label-text {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 迷你复制按钮 */
.mini-copy-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.mini-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

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

.mini-copy-btn.copied {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.mini-copy-btn.copied i {
    animation: scaleUp 0.3s ease;
}

@keyframes scaleUp {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* 文章标题样式 */
.article-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
    padding: 15px;
    background: white;
    border-radius: 12px;
    border-right: 5px solid #8b5cf6;
    border-left: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 10px;
    word-break: break-word;
    direction: rtl;
    text-align: right;
    font-family: 'Hat', sans-serif;
}

/* 维吾尔文特殊样式 */
.uyghur-text {
    font-family: 'Hat', sans-serif;
    direction: rtl;
    unicode-bidi: bidi-override;
    text-align: right;
    font-size: 20px;
    line-height: 1.6;
    display: block;
    margin-bottom: 10px;
}

/* 中文/英文/数字样式 */
.chinese-english-number {
    direction: ltr;
    unicode-bidi: embed;
    font-size: 18px;
    line-height: 1.5;
    display: block;
    font-family: 'Segoe UI', system-ui, sans-serif;
    text-align: left;
}

/* 封面图片样式 */
.article-img {
    width: 100%;
    max-width: 320px;
    border-radius: 12px;
    margin-top: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border: 3px solid white;
    transition: all 0.3s;
    display: block;
    cursor: pointer;
}

.article-img:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

/* WXV容器样式 - 新增 */
.wxv-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.wxv-item {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    padding: 12px 16px;
    border-radius: 10px;
    font-family: 'Courier New', 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 16px;
    color: #4f46e5;
    font-weight: 700;
    border: 2px solid #a5b4fc;
    letter-spacing: 1px;
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.15);
    word-break: break-all;
    direction: ltr;
    text-align: left;
}

.wxv-item.empty {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #64748b;
    border: 2px dashed #cbd5e0;
    font-style: italic;
}

/* 视频容器样式 - 新增 */
.video-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.video-item {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 12px 16px;
    border-radius: 10px;
    border: 2px solid #bae6fd;
    box-shadow: 0 3px 10px rgba(14, 165, 233, 0.1);
    word-break: break-all;
    direction: ltr;
    text-align: left;
}

.video-item.empty {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #64748b;
    border: 2px dashed #cbd5e0;
    font-style: italic;
}

.video-link-text {
    color: #0369a1;
    text-decoration: none;
    font-size: 15px;
    display: block;
    transition: all 0.3s;
}

.video-link-text:hover {
    color: #0ea5e9;
    text-decoration: underline;
}

/* 按钮组 */
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    flex-direction: row-reverse;
}

.action-btn {
    padding: 14px 25px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-family: 'Hat', sans-serif;
}

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

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

.view-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.reset-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

/* 提示框样式 */
.toast {
    position: fixed;
    top: 30px;
    left: 30px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10000;
    transform: translateX(-100%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    max-width: 400px;
}

.toast.active {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-right: 5px solid #10b981;
    border-left: none;
}

.toast.error {
    border-right: 5px solid #ef4444;
    border-left: none;
}

.toast-icon {
    font-size: 28px;
}

.toast.success .toast-icon {
    color: #10b981;
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 5px;
    color: #1f2937;
    font-family: 'Hat', sans-serif;
}

.toast-message {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.4;
    font-family: 'Hat', sans-serif;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
        min-height: 100vh;
        overflow-y: auto;
    }
    
    .main-container {
        border-radius: 16px;
        margin: 5px auto;
    }
    
    .header {
        padding: 25px 15px;
    }
    
    .header h1 {
        font-size: 22px;
    }
    
    .header p {
        font-size: 15px;
    }
    
    .content {
        padding: 20px 15px;
    }
    
    .input-section {
        padding: 20px;
    }
    
    .input-wrapper {
        flex-direction: column;
    }
    
    .url-input {
        padding: 16px;
        padding-left: 50px;
        font-size: 16px;
        width: 100%;
    }
    
    .get-btn {
        padding: 16px;
        width: 100%;
        font-size: 16px;
        min-height: 54px;
    }
    
    .clear-btn {
        left: 15px;
    }
    
    .result-content {
        padding: 20px;
    }
    
    .article-title {
        font-size: 19px;
        padding: 12px;
    }
    
    .uyghur-text {
        font-size: 18px;
    }
    
    .wxv-item {
        font-size: 14px;
        padding: 10px 14px;
    }
    
    .video-link-text {
        font-size: 14px;
    }
    
    .action-btn {
        padding: 12px 20px;
        width: 100%;
        justify-content: center;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .toast {
        top: 20px;
        left: 20px;
        right: 20px;
        max-width: none;
    }
    
    .copy-all-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 20px;
    }
    
    .header p {
        font-size: 14px;
    }
    
    .article-img {
        max-width: 100%;
    }
    
    .wxv-item {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .video-link-text {
        font-size: 13px;
    }
}