:root {
    --primary-gradient: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #14b8a6 100%);
    --secondary-gradient: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --accent-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --success-gradient: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --dark-bg: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.06);
    --card-border: rgba(148, 163, 184, 0.15);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --glow-primary: rgba(14, 165, 233, 0.4);
    --glow-secondary: rgba(139, 92, 246, 0.4);
    --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 30px 60px -15px rgba(0, 0, 0, 0.5);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-normal: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(180deg, #020617 0%, #0f172a 50%, #1e293b 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;
    opacity: 0.3;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%230ea5e9" fill-opacity="0.3" d="M0,160L48,149.3C96,139,192,117,288,122.7C384,128,480,160,576,176C672,192,768,192,864,170.7C960,149,1056,107,1152,101.3C1248,96,1344,128,1392,144L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') repeat-x;
    animation: waveMove 20s linear infinite;
}

.wave:nth-child(1) {
    animation-duration: 25s;
    opacity: 0.5;
}

.wave:nth-child(2) {
    animation-duration: 30s;
    animation-delay: -5s;
    opacity: 0.3;
}

@keyframes waveMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: floatShape 25s ease-in-out infinite;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: var(--primary-gradient);
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary-gradient);
    bottom: -100px;
    left: -100px;
    animation-delay: -8s;
}

.shape-3 {
    width: 350px;
    height: 350px;
    background: var(--accent-gradient);
    top: 40%;
    left: 20%;
    animation-delay: -16s;
}

@keyframes floatShape {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    33% { 
        transform: translate(-40px, 30px) scale(1.1);
        opacity: 0.4;
    }
    66% { 
        transform: translate(30px, -40px) scale(0.95);
        opacity: 0.25;
    }
}

.main-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    padding: 28px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, transparent 100%);
    backdrop-filter: blur(30px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--card-border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.user-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

.user-name {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 6px 14px;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(14, 165, 233, 0.2);
    transition: all var(--transition-normal);
}

.user-name:hover {
    background: rgba(14, 165, 233, 0.15);
    transform: scale(1.02);
}

.user-name i {
    color: var(--primary-color);
    animation: pulseIcon 2s ease-in-out infinite;
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.usage-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.1));
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    color: var(--accent-color);
    font-size: 0.88rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.usage-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.usage-badge:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.usage-badge i {
    color: var(--accent-color);
    font-size: 1rem;
    animation: bounceCoin 1s ease-in-out infinite;
}

@keyframes bounceCoin {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.08));
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: var(--error-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.logout-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(239, 68, 68, 0.1);
    transition: width var(--transition-normal);
}

.logout-btn:hover::before {
    width: 100%;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
}

.logout-btn i {
    transition: transform var(--transition-normal);
}

.logout-btn:hover i {
    transform: translateX(3px);
}

.admin-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(20, 184, 166, 0.15));
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 10px;
    color: var(--primary-color);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all var(--transition-normal);
}

.admin-link:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(20, 184, 166, 0.25));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 18px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px var(--glow-primary);
    animation: logoFloat 4s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: logoShine 3.5s ease-in-out infinite;
}

@keyframes logoShine {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.logo-text h1 {
    font-size: 1.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #a5f3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 3px;
}

.content {
    flex: 1;
    padding: 36px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.title-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 6px 20px var(--glow-primary);
}

.title-icon.video-icon {
    background: var(--secondary-gradient);
    box-shadow: 0 6px 20px var(--glow-secondary);
}

.title-icon.result-icon {
    background: var(--success-gradient);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
}

.section-title h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-title p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-left: auto;
}

.mode-section {
    margin-bottom: 44px;
    animation: fadeInUp 0.7s ease-out;
}

.mode-selector {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    backdrop-filter: blur(25px);
    transition: all var(--transition-normal);
}

.mode-selector:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(14, 165, 233, 0.3);
}

.mode-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mode-title i {
    color: #0ea5e9;
    font-size: 1.2rem;
}

.mode-options {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.mode-option {
    flex: 1;
    min-width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    padding: 16px 24px;
    background: rgba(241, 245, 249, 0.03);
    border: 2px solid var(--card-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.mode-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.mode-option:hover {
    background: rgba(241, 245, 249, 0.06);
    border-color: rgba(14, 165, 233, 0.4);
    transform: translateY(-2px);
}

.mode-option.active {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.1);
}

.mode-option.active::before {
    opacity: 0.1;
}

.mode-option input {
    display: none;
}

.mode-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--card-border);
    border-radius: 50%;
    position: relative;
    transition: all var(--transition-fast);
    z-index: 1;
}

.mode-option.active .mode-custom {
    border-color: #0ea5e9;
    background: #0ea5e9;
}

.mode-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform var(--transition-fast);
}

.mode-option.active .mode-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.mode-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-normal);
    z-index: 1;
}

.mode-option.active .mode-label {
    color: var(--text-primary);
}

.mode-label i {
    font-size: 1.1rem;
}

.usage-guide {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(20, 184, 166, 0.05));
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.guide-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    background: rgba(14, 165, 233, 0.1);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.guide-header:hover {
    background: rgba(14, 165, 233, 0.15);
}

.guide-header i:first-child {
    color: #0ea5e9;
    font-size: 1.1rem;
}

.guide-header span {
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.guide-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.guide-toggle i {
    transition: transform var(--transition-normal);
}

.guide-toggle.collapsed i {
    transform: rotate(-90deg);
}

.guide-content {
    padding: 20px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    transition: all var(--transition-normal);
}

.guide-content.collapsed {
    display: none;
}

.guide-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-normal);
}

.guide-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.guide-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.guide-item:nth-child(1) .guide-icon {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(6, 182, 212, 0.2));
    color: #0ea5e9;
}

.guide-item:nth-child(2) .guide-icon {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
    color: #8b5cf6;
}

.guide-item:nth-child(3) .guide-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
    color: #10b981;
}

.guide-text strong {
    display: block;
    font-size: 0.98rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.guide-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.guide-tips {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-md);
    margin-top: 4px;
}

.guide-tips i {
    color: #f59e0b;
    font-size: 1rem;
}

.guide-tips span {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.upload-section {
    margin-bottom: 44px;
    animation: fadeInUp 0.7s ease-out;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 26px;
}

.upload-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    backdrop-filter: blur(25px);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.upload-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.upload-card:hover::before {
    transform: scaleX(1);
}

.upload-card:hover {
    transform: translateY(-6px);
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.card-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.source-icon {
    background: var(--primary-gradient);
    box-shadow: 0 6px 20px var(--glow-primary);
}

.template-icon {
    background: var(--secondary-gradient);
    box-shadow: 0 6px 20px var(--glow-secondary);
}

.card-title h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.upload-area {
    position: relative;
    height: 190px;
    border: 2px dashed var(--card-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    overflow: hidden;
}

.upload-area:hover {
    border-color: rgba(14, 165, 233, 0.5);
    background: rgba(14, 165, 233, 0.05);
}

.upload-area.drag-over {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.1);
    transform: scale(1.02);
}

.upload-content {
    text-align: center;
    transition: all var(--transition-normal);
}

.upload-icon-wrapper {
    width: 66px;
    height: 66px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(20, 184, 166, 0.15));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

.upload-area:hover .upload-icon-wrapper {
    transform: scale(1.1);
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 8px 25px var(--glow-primary);
}

.upload-text {
    font-size: 0.98rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.upload-hint {
    font-size: 0.83rem;
    color: var(--text-muted);
}

.preview-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    border-radius: calc(var(--radius-md) - 2px);
    padding: 14px;
}

.preview-container.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(241, 245, 249, 0.1);
    border: 1px solid rgba(241, 245, 249, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: white;
    backdrop-filter: blur(10px);
}

.remove-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    transform: rotate(90deg);
}

.card-status {
    margin-top: 14px;
    padding: 9px 14px;
    background: rgba(241, 245, 249, 0.04);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 9px;
}

.status-text {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.status-text.success {
    color: #22c55e;
}

.status-text.error {
    color: #ef4444;
}

.video-section {
    margin-bottom: 44px;
    animation: fadeInUp 0.7s ease-out 0.1s both;
}

.video-upload-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    backdrop-filter: blur(25px);
}

.video-options {
    display: flex;
    gap: 18px;
    margin-bottom: 22px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 11px;
    cursor: pointer;
    padding: 13px 22px;
    background: rgba(241, 245, 249, 0.03);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.radio-option:hover {
    background: rgba(241, 245, 249, 0.06);
    border-color: rgba(14, 165, 233, 0.25);
}

.radio-option input {
    display: none;
}

.radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--card-border);
    border-radius: 50%;
    position: relative;
    transition: all var(--transition-fast);
}

.radio-option input:checked + .radio-custom {
    border-color: #0ea5e9;
    background: #0ea5e9;
}

.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 7px;
    height: 7px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform var(--transition-fast);
}

.radio-option input:checked + .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.radio-option input:checked ~ .radio-label {
    color: var(--text-primary);
}

.video-upload-area {
    position: relative;
    min-height: 170px;
    border: 2px dashed var(--card-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    overflow: hidden;
}

.video-upload-area:hover {
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(139, 92, 246, 0.05);
}

.video-upload-content {
    text-align: center;
    padding: 28px;
}

.video-icon-wrapper {
    width: 66px;
    height: 66px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.15));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

.video-upload-area:hover .video-icon-wrapper {
    transform: scale(1.1);
    background: var(--secondary-gradient);
    color: white;
    box-shadow: 0 8px 25px var(--glow-secondary);
}

.video-preview-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    border-radius: calc(var(--radius-md) - 2px);
    padding: 18px;
}

.video-preview-container.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

#videoPreview {
    max-width: 100%;
    max-height: 190px;
    border-radius: var(--radius-sm);
}

.video-info {
    display: flex;
    gap: 14px;
    margin-top: 10px;
    font-size: 0.83rem;
    color: var(--text-secondary);
}

.video-remove {
    top: 14px;
    right: 14px;
}

.upload-progress {
    margin-top: 18px;
    display: none;
}

.upload-progress.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.progress-bar {
    height: 7px;
    background: rgba(241, 245, 249, 0.08);
    border-radius: 3.5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-gradient);
    border-radius: 3.5px;
    transition: width var(--transition-normal);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progressShine 1.5s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 9px;
    font-size: 0.83rem;
    color: var(--text-secondary);
}

.action-section {
    margin-bottom: 44px;
    animation: fadeInUp 0.7s ease-out 0.2s both;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 18px;
}

.btn {
    position: relative;
    padding: 16px 42px;
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 11px;
    overflow: hidden;
    transition: all var(--transition-normal);
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 12px 35px var(--glow-primary);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 0 18px 45px var(--glow-primary);
}

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

.btn-secondary {
    background: rgba(241, 245, 249, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(241, 245, 249, 0.1);
    border-color: rgba(241, 245, 249, 0.2);
    transform: translateY(-4px);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.5s ease;
}

.btn:hover .btn-shine {
    left: 100%;
}

.result-section {
    animation: fadeInUp 0.7s ease-out 0.3s both;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 26px;
}

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    backdrop-filter: blur(25px);
    transition: all var(--transition-normal);
}

.result-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.result-header h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 1.05rem;
    font-weight: 600;
}

.result-status {
    padding: 5px 13px;
    background: rgba(241, 245, 249, 0.06);
    border-radius: var(--radius-xl);
    font-size: 0.83rem;
    color: var(--text-secondary);
}

.result-status.processing {
    background: rgba(14, 165, 233, 0.15);
    color: #a5f3fc;
}

.result-status.success {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

.result-status.error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.result-content {
    min-height: 240px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.result-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.result-placeholder i {
    font-size: 46px;
    margin-bottom: 14px;
    opacity: 0.5;
}

.result-placeholder p {
    font-size: 0.92rem;
}

.result-actions {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 11px 28px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-xl);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: inherit;
}

.action-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--glow-primary);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.download-countdown {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.download-countdown i {
    color: #f59e0b;
}

.download-countdown .countdown-time {
    color: #f59e0b;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.download-countdown.expired {
    color: #ef4444;
}

.download-countdown.expired .countdown-time {
    color: #ef4444;
}

.footer {
    padding: 28px 40px;
    border-top: 1px solid var(--card-border);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(25px);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.footer-links {
    display: flex;
    gap: 18px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all var(--transition-normal);
    padding: 8px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-link:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.telegram-link {
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.15), rgba(0, 170, 255, 0.1));
    border-color: rgba(0, 170, 255, 0.3);
    color: #00aaff;
    position: relative;
    overflow: hidden;
}

.telegram-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: telegramShine 3s ease-in-out infinite;
}

@keyframes telegramShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.telegram-link:hover {
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.25), rgba(0, 170, 255, 0.2));
    border-color: rgba(0, 170, 255, 0.5);
    box-shadow: 0 6px 20px rgba(0, 170, 255, 0.3);
}

.telegram-link i {
    font-size: 1.1rem;
    animation: pulseTelegram 2s ease-in-out infinite;
}

@keyframes pulseTelegram {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
    backdrop-filter: blur(30px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.loading-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.loading-content {
    max-width: 500px;
    width: 100%;
    padding: 40px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.loading-header {
    text-align: center;
    margin-bottom: 30px;
}

.loading-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: var(--primary-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 30px rgba(14, 165, 233, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 15px 40px rgba(14, 165, 233, 0.6); }
}

.loading-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #a5f3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.loading-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.loading-status-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    margin-bottom: 24px;
}

.status-icon-wrapper {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(20, 184, 166, 0.2));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #0ea5e9;
    flex-shrink: 0;
}

.status-icon-wrapper.running {
    animation: statusPulse 1.5s ease-in-out infinite;
}

.status-icon-wrapper.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.2));
    color: #22c55e;
}

.status-icon-wrapper.failed {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.2));
    color: #ef4444;
}

@keyframes statusPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.status-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.loading-progress-container {
    margin-bottom: 30px;
}

.loading-progress {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    margin-bottom: 12px;
}

.loading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0ea5e9, #06b6d4, #14b8a6);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-percent {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-gradient);
}

.progress-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.loading-game-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.game-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 1rem;
    color: var(--text-primary);
}

.game-header i {
    color: #f59e0b;
}

.game-container {
    text-align: center;
}

.game-canvas {
    width: 100%;
    height: 200px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.8));
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.catcher {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 20px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transition: left 0.1s ease;
}

.star {
    position: absolute;
    font-size: 24px;
    animation: fall linear;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
}

@keyframes fall {
    from { transform: translateY(-30px); }
    to { transform: translateY(230px); }
}

.game-score {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.game-score strong {
    color: #f59e0b;
    font-size: 1.1rem;
}

.game-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.loading-tips {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
}

.tip-icon {
    width: 36px;
    height: 36px;
    background: rgba(245, 158, 11, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    font-size: 18px;
    flex-shrink: 0;
}

.tip-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: left;
}

.toast-container {
    position: fixed;
    top: 90px;
    right: 28px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.toast {
    padding: 14px 24px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(25px);
    display: flex;
    align-items: center;
    gap: 11px;
    animation: slideIn 0.35s ease-out;
    min-width: 270px;
}

.toast.success {
    border-color: rgba(34, 197, 94, 0.3);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
}

.toast.warning {
    border-color: rgba(245, 158, 11, 0.3);
}

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

.toast.success .toast-icon { color: #22c55e; }
.toast.error .toast-icon { color: #ef4444; }
.toast.warning .toast-icon { color: #f59e0b; }

.toast-message {
    font-size: 0.92rem;
    color: var(--text-primary);
}

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

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(90px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .header {
        padding: 20px;
        flex-direction: column;
        gap: 14px;
    }

    .content {
        padding: 22px;
    }

    .mode-options {
        flex-direction: column;
    }

    .mode-option {
        min-width: 100%;
    }

    .guide-content {
        grid-template-columns: 1fr;
    }

    .upload-grid,
    .result-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .video-options {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        gap: 14px;
        text-align: center;
    }
}
