/* ===== CSS Variables - Premium Candy Anime Style ===== */
:root {
    /* 核心色彩 - 更丰富的渐变色调 */
    --primary-color: #ff7eb3;
    --primary-dark: #ff5c9d;
    --primary-light: #ffb8d6;
    --secondary-color: #ffd1dc;
    --accent-color: #ff69b4;
    --success-color: #98fb98;
    --warning-color: #ffd700;
    --kawaii-yellow: #fff59d;
    --kawaii-blue: #87ceeb;
    --kawaii-purple: #dda0dd;
    --kawaii-mint: #98ff98;
    --kawaii-peach: #ffdab9;
    --kawaii-lavender: #e6e6fa;

    /* 霓虹发光色 */
    --neon-pink: #ff6b9d;
    --neon-purple: #c084fc;
    --neon-blue: #38bdf8;
    --neon-cyan: #22d3ee;
    --neon-rose: #fb7185;

    /* 高级玻璃态背景 */
    --bg-primary: #fff5f8;
    --bg-secondary: #fff0f5;
    --bg-tertiary: #ffe4ec;
    --bg-card: rgba(255, 255, 255, 0.85);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-bg-strong: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.4);

    --text-primary: #5c4d6e;
    --text-secondary: #8b7aa0;
    --text-muted: #b0a0c0;

    --border-color: rgba(255, 126, 179, 0.5);
    --border-hover: rgba(255, 126, 179, 0.9);
    --border-rainbow: linear-gradient(135deg, #ff7eb3, #c084fc, #38bdf8, #22d3ee, #ff7eb3);

    /* 高级阴影系统 */
    --shadow-sm: 0 3px 10px rgba(255, 182, 193, 0.4);
    --shadow-md: 0 6px 25px rgba(255, 182, 193, 0.5);
    --shadow-lg: 0 10px 40px rgba(255, 182, 193, 0.6);
    --shadow-glow: 0 0 40px rgba(255, 126, 179, 0.5);
    --shadow-glow-strong: 0 0 60px rgba(255, 126, 179, 0.7);
    --shadow-kawaii: 0 4px 0 rgba(255, 182, 193, 0.6);
    --shadow-neon: 0 0 20px rgba(255, 107, 157, 0.6), 0 0 40px rgba(255, 107, 157, 0.4), 0 0 60px rgba(255, 107, 157, 0.2);
    --shadow-3d: 0 10px 30px -10px rgba(255, 126, 179, 0.5);

    --radius-sm: 15px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 40px;

    /* 高级过渡动画 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* 鼠标跟随变量 */
    --mouse-x: 50%;
    --mouse-y: 50%;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #fff5f8 0%, #ffe8f0 25%, #fff0e6 50%, #f0f8ff 75%, #fff5fa 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* 极光动态背景效果 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(255, 126, 179, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 30%, rgba(192, 132, 252, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 70% 50% at 50% 80%, rgba(56, 189, 248, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 70% 60%, rgba(34, 211, 238, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -2;
    animation: auroraShift 15s ease-in-out infinite alternate;
}

@keyframes auroraShift {
    0% {
        opacity: 0.8;
        transform: scale(1) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: scale(1.05) rotate(1deg);
    }

    100% {
        opacity: 0.9;
        transform: scale(1.02) rotate(-1deg);
    }
}

/* ===== Background Effects ===== */
.background-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 15s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--secondary-color), var(--success-color));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* ===== 星空粒子背景 ===== */
.starfield {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-repeat: repeat;
}

/* 小星星 */
.stars-sm {
    background-image:
        radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255, 182, 193, 0.8), transparent),
        radial-gradient(1px 1px at 50px 160px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(192, 132, 252, 0.7), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 160px 120px, rgba(56, 189, 248, 0.6), transparent);
    background-size: 200px 200px;
    animation: twinkle 4s ease-in-out infinite;
}

/* 中星星 */
.stars-md {
    background-image:
        radial-gradient(2px 2px at 100px 50px, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(2px 2px at 200px 150px, rgba(255, 182, 193, 0.8), transparent),
        radial-gradient(2px 2px at 300px 100px, rgba(192, 132, 252, 0.7), transparent);
    background-size: 400px 300px;
    animation: twinkle 5s ease-in-out infinite;
    animation-delay: -2s;
}

/* 大星星 */
.stars-lg {
    background-image:
        radial-gradient(3px 3px at 150px 200px, rgba(255, 255, 255, 1), transparent),
        radial-gradient(3px 3px at 350px 100px, rgba(255, 126, 179, 0.9), transparent);
    background-size: 500px 400px;
    animation: twinkleBright 3s ease-in-out infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

@keyframes twinkleBright {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* 流星效果 */
.shooting-star {
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 182, 193, 1), rgba(255, 255, 255, 0));
    border-radius: 50%;
    top: 10%;
    left: -100px;
    animation: shootingStar 6s linear infinite;
    animation-delay: 2s;
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: -1px;
    right: 0;
    width: 8px;
    height: 4px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 182, 193, 0.8), 0 0 20px rgba(255, 182, 193, 0.5);
}

.shooting-star-2 {
    top: 25%;
    animation-delay: 8s;
    animation-duration: 5s;
}

@keyframes shootingStar {
    0% {
        left: -100px;
        top: 10%;
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        left: 110%;
        top: 40%;
        opacity: 0;
    }
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

/* ===== Header ===== */
.header {
    text-align: center;
    margin-bottom: 50px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-glow);
}

.logo-icon svg {
    width: 32px;
    height: 32px;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ===== Input Section ===== */
.input-section {
    margin-bottom: 40px;
}

.input-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.input-container {
    display: flex;
    gap: 12px;
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 8px;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

/* 彩虹边框光效 */
.input-container::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #ff7eb3, #c084fc, #38bdf8, #22d3ee, #ff7eb3);
    background-size: 300% 300%;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: gradientFlow 4s ease infinite;
}

.input-container:focus-within {
    border-color: transparent;
    box-shadow: var(--shadow-glow-strong), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.input-container:focus-within::before {
    opacity: 1;
}

@keyframes gradientFlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.input-container input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 16px 20px;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: inherit;
}

.input-container input::placeholder {
    color: var(--text-muted);
}

.parse-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--neon-purple), var(--primary-dark));
    background-size: 200% 200%;
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-spring);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-neon);
    animation: buttonGlow 3s ease-in-out infinite;
}

/* 按钮内光效 */
.parse-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.5s;
}

.parse-btn:hover::before {
    left: 100%;
}

.parse-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-neon), 0 15px 35px rgba(255, 107, 157, 0.4);
    background-position: 100% 50%;
}

.parse-btn:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 2px 10px rgba(255, 107, 157, 0.3);
}

@keyframes buttonGlow {

    0%,
    100% {
        box-shadow: var(--shadow-neon);
    }

    50% {
        box-shadow: 0 0 30px rgba(255, 107, 157, 0.8), 0 0 60px rgba(255, 107, 157, 0.5), 0 0 90px rgba(255, 107, 157, 0.3);
    }
}

.parse-btn .btn-icon {
    display: flex;
    align-items: center;
}

.parse-btn .btn-icon svg {
    width: 20px;
    height: 20px;
}

.input-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Parser Section ===== */
.parser-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.parser-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.parser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.parser-btn {
    position: relative;
    padding: 14px 16px;
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-spring);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 182, 193, 0.2);
}

/* 鼠标跟随光晕 */
.parser-btn::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 126, 179, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    left: var(--mouse-x, 50%);
    top: var(--mouse-y, 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.parser-btn:hover::before {
    opacity: 1;
}

.parser-btn:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-glow), 0 8px 25px rgba(255, 182, 193, 0.4);
}

.parser-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--neon-purple), var(--primary-dark));
    background-size: 200% 200%;
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-neon);
    animation: activeGlow 2s ease-in-out infinite;
}

@keyframes activeGlow {

    0%,
    100% {
        box-shadow: var(--shadow-neon);
    }

    50% {
        box-shadow: 0 0 25px rgba(255, 107, 157, 0.7), 0 0 50px rgba(255, 107, 157, 0.4);
    }
}

.parser-btn.active::before {
    opacity: 0;
}

.parser-btn span {
    position: relative;
    z-index: 1;
}

/* ===== Player Section ===== */
.player-section {
    display: none;
    margin-bottom: 40px;
    animation: fadeIn 0.5s ease;
}

.player-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.player-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.player-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-normal);
}

.control-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.player-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.player-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    z-index: 10;
    transition: var(--transition-normal);
}

.player-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Platforms Section ===== */
.platforms-section {
    margin-bottom: 40px;
}

.platforms-section h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}

.platform-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 16px;
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition-spring);
    position: relative;
    overflow: hidden;
}

/* 卡片内光效 */
.platform-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: 0.5s;
}

.platform-card:hover::before {
    left: 100%;
}

.platform-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow), 0 15px 35px rgba(255, 182, 193, 0.3);
}

.platform-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
}

.platform-icon.iqiyi {
    background: linear-gradient(135deg, #00be06, #1eb100);
}

.platform-icon.youku {
    background: linear-gradient(135deg, #1e88e5, #0d47a1);
}

.platform-icon.tencent {
    background: linear-gradient(135deg, #ff6f00, #e65100);
}

.platform-icon.mgtv {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.platform-icon.bilibili {
    background: linear-gradient(135deg, #fb7299, #f06292);
}

.platform-icon.sohu {
    background: linear-gradient(135deg, #ff5722, #e64a19);
}

.platform-icon.pptv {
    background: linear-gradient(135deg, #2196f3, #1976d2);
}

.platform-icon.letv {
    background: linear-gradient(135deg, #e91e63, #c2185b);
}

/* 平台官方Logo图片样式 */
.platform-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    transition: var(--transition-spring);
    filter: drop-shadow(0 4px 8px rgba(255, 182, 193, 0.3));
}

.platform-card:hover .platform-logo {
    transform: scale(1.15) rotate(-5deg);
    filter: drop-shadow(0 6px 12px rgba(255, 126, 179, 0.5));
}

.platform-card span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Platform card as link */
a.platform-card {
    text-decoration: none;
}

a.platform-card:hover span {
    color: var(--text-primary);
}

/* Hint text */
.hint-text {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
}

/* ===== History Section ===== */
.history-section {
    margin-bottom: 40px;
}

.clear-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-normal);
}

.clear-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    cursor: pointer;
}

.history-item:hover {
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.history-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-sm);
    color: white;
    flex-shrink: 0;
}

.history-icon svg {
    width: 24px;
    height: 24px;
}

.history-info {
    flex: 1;
    min-width: 0;
}

.history-url {
    color: var(--text-primary);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.history-time {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.history-delete {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-normal);
    flex-shrink: 0;
}

.history-delete:hover {
    background: var(--accent-color);
    color: white;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

.footer p {
    margin-bottom: 8px;
}

.footer .copyright {
    font-size: 0.85rem;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 28px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: var(--transition-normal);
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-color: var(--success-color);
}

.toast.error {
    border-color: var(--accent-color);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .container {
        padding: 24px 16px;
    }

    .logo h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .input-container {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
        border-radius: var(--radius-lg);
    }

    .input-container input {
        padding: 12px 16px;
    }

    .parse-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        border-radius: var(--radius-md);
    }

    .parser-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .player-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .section-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
        gap: 12px;
    }

    .logo-icon {
        width: 48px;
        height: 48px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .parser-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .parser-btn {
        padding: 12px;
        font-size: 0.85rem;
    }

    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .platform-card {
        padding: 16px 12px;
    }
}

/* ===== Mobile Performance & Touch ===== */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }

    .background-effects,
    .starfield,
    .floating-gifs,
    .floating-hearts,
    .mascot-left,
    .mascot-right {
        display: none !important;
    }

    .input-container,
    .parser-btn,
    .platform-card,
    .player-container {
        box-shadow: var(--shadow-sm);
        backdrop-filter: none;
    }

    .parse-btn,
    .parser-btn,
    .control-btn {
        min-height: 44px;
    }

    .control-btn {
        width: 44px;
        height: 44px;
    }

    .input-hint {
        padding-left: 0;
    }
}

@media (max-width: 480px) {
    .parser-grid,
    .platforms-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ===== Sweet Custom Styles for 琪琪 ===== */

/* Floating Hearts Animation */
.floating-hearts {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.floating-hearts .heart {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.6;
    animation: floatHeart 10s ease-in-out infinite;
}

.floating-hearts .heart:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.floating-hearts .heart:nth-child(2) {
    left: 25%;
    animation-delay: -2s;
    animation-duration: 10s;
}

.floating-hearts .heart:nth-child(3) {
    left: 50%;
    animation-delay: -4s;
    animation-duration: 14s;
}

.floating-hearts .heart:nth-child(4) {
    left: 75%;
    animation-delay: -6s;
    animation-duration: 11s;
}

.floating-hearts .heart:nth-child(5) {
    left: 90%;
    animation-delay: -8s;
    animation-duration: 13s;
}

@keyframes floatHeart {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(-100vh) rotate(360deg) scale(1.2);
        opacity: 0;
    }
}

/* Heart Icon in Logo */
.heart-icon {
    font-size: 2rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* Love Note */
.love-note {
    margin-top: 12px;
    font-size: 0.95rem;
    color: var(--primary-light);
    font-style: italic;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Love Message in Footer */
.love-message {
    font-size: 1rem;
    color: var(--primary-light);
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
        text-shadow: 0 0 20px var(--primary-color);
    }
}

/* Enhanced Button Glow for Pink Theme */
.parse-btn:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.5);
}

/* Pets Note - 一二 & 布布 */
.pets-note {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

/* Pets Footer */
.pets-footer {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

/* ===== 一二布布 Mascot Decorations ===== */

/* Fixed mascots on sides */
.mascot-left,
.mascot-right {
    position: fixed;
    bottom: 20px;
    z-index: 100;
    pointer-events: none;
    animation: floatMascot 3s ease-in-out infinite;
}

.mascot-left {
    left: 20px;
    animation-delay: 0s;
}

.mascot-right {
    right: 20px;
    animation-delay: -1.5s;
}

.mascot-img {
    width: 100px;
    height: auto;
    filter: drop-shadow(0 4px 15px rgba(255, 107, 157, 0.3));
    transition: transform 0.3s ease;
}

.mascot-left:hover .mascot-img,
.mascot-right:hover .mascot-img {
    pointer-events: auto;
    transform: scale(1.1);
}

@keyframes floatMascot {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Couple mascot in header */
.couple-mascot {
    margin-bottom: 20px;
    animation: zoomIn 0.8s ease-out;
}

.couple-img {
    width: 180px;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(255, 107, 157, 0.4));
    animation: heartbeat 2s ease-in-out infinite;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive adjustments for mascots */
@media (max-width: 768px) {

    .mascot-left,
    .mascot-right {
        display: none;
    }

    .couple-img {
        width: 140px;
    }
}

@media (max-width: 480px) {
    .couple-img {
        width: 120px;
    }
}

/* ===== ANIME KAWAII ENHANCEMENTS ===== */

/* Kawaii Card Style */
.platform-card,
.parser-btn,
.history-item {
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-kawaii), var(--shadow-sm);
}

.platform-card:hover,
.parser-btn:hover,
.history-item:hover {
    box-shadow: var(--shadow-glow), 0 6px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-6px);
}

/* Bouncy Button Animation */
.parse-btn {
    box-shadow: var(--shadow-kawaii), var(--shadow-md);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition-bounce);
}

.parse-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.15), var(--shadow-glow);
}

.parse-btn:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

/* Kawaii Input Style */
.input-container {
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow-kawaii), var(--shadow-md);
}

.input-container:focus-within {
    border-color: var(--primary-color);
    animation: kawaiiPulse 1s ease-in-out infinite;
}

@keyframes kawaiiPulse {

    0%,
    100% {
        box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15), 0 0 20px rgba(255, 126, 179, 0.4);
    }

    50% {
        box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15), 0 0 35px rgba(255, 126, 179, 0.6);
    }
}

/* Sparkle Stars Effect */
.header::before,
.header::after {
    content: '✨';
    position: absolute;
    font-size: 1.5rem;
    animation: sparkleFloat 3s ease-in-out infinite;
}

.header::before {
    top: 20px;
    left: 10%;
    animation-delay: 0s;
}

.header::after {
    top: 40px;
    right: 10%;
    animation-delay: -1.5s;
}

@keyframes sparkleFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: translateY(-15px) rotate(20deg);
        opacity: 0.6;
    }
}

/* Rainbow Glow on Logo */
.logo h1 {
    background: linear-gradient(135deg,
            var(--kawaii-yellow) 0%,
            var(--primary-light) 25%,
            var(--primary-color) 50%,
            var(--kawaii-purple) 75%,
            var(--kawaii-blue) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbowShift 5s ease-in-out infinite;
    text-shadow: none;
}

@keyframes rainbowShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Cute Section Headers */
.section-header h2::before {
    content: '♡';
    margin-right: 8px;
    color: var(--primary-color);
}

.platforms-section h2::before {
    content: '🌸';
    margin-right: 8px;
}

/* Player Container Kawaii Style */
.player-container {
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow-lg), inset 0 0 30px rgba(255, 126, 179, 0.1);
}

/* Footer Love Style */
.footer {
    position: relative;
}

.footer::before {
    content: '💕 ～ 💕 ～ 💕';
    display: block;
    margin-bottom: 15px;
    font-size: 1.2rem;
    animation: heartWave 2s ease-in-out infinite;
}

@keyframes heartWave {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Cute Control Buttons */
.control-btn {
    border: 2px solid var(--border-color);
    transition: var(--transition-bounce);
}

.control-btn:hover {
    transform: scale(1.15) rotate(5deg);
}

/* History Icon Cute Animation */
.history-icon {
    animation: wobble 3s ease-in-out infinite;
}

@keyframes wobble {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }
}

/* Toast Kawaii Style */
.toast {
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
}

.toast::before {
    content: '💖 ';
}

/* Platform Icons Hover Effect */
.platform-icon {
    transition: var(--transition-bounce);
}

.platform-card:hover .platform-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* ===== 漂浮GIF动画装饰 ===== */
.floating-gifs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-gif {
    position: absolute;
    width: 60px;
    height: auto;
    opacity: 0.85;
    filter: drop-shadow(0 4px 10px rgba(255, 182, 193, 0.5));
    animation: floatGif 8s ease-in-out infinite;
}

.gif-1 {
    top: 15%;
    left: 5%;
    animation-delay: 0s;
    animation-duration: 10s;
}

.gif-2 {
    top: 25%;
    right: 8%;
    animation-delay: -2s;
    animation-duration: 9s;
}

.gif-3 {
    top: 45%;
    left: 3%;
    animation-delay: -4s;
    animation-duration: 11s;
}

.gif-4 {
    top: 60%;
    right: 5%;
    animation-delay: -1s;
    animation-duration: 8s;
}

.gif-5 {
    top: 75%;
    left: 8%;
    animation-delay: -3s;
    animation-duration: 12s;
}

.gif-6 {
    top: 10%;
    right: 15%;
    animation-delay: -5s;
    animation-duration: 9s;
}

.gif-7 {
    top: 35%;
    left: 10%;
    animation-delay: -2.5s;
    animation-duration: 10s;
}

.gif-8 {
    top: 55%;
    right: 12%;
    animation-delay: -4.5s;
    animation-duration: 11s;
}

@keyframes floatGif {

    0%,
    100% {
        transform: translateY(0) rotate(-3deg);
    }

    25% {
        transform: translateY(-15px) rotate(3deg);
    }

    50% {
        transform: translateY(5px) rotate(-5deg);
    }

    75% {
        transform: translateY(-10px) rotate(2deg);
    }
}

/* 响应式：小屏幕隐藏部分GIF */
@media (max-width: 768px) {
    .floating-gif {
        width: 45px;
        opacity: 0.7;
    }

    .gif-3,
    .gif-4,
    .gif-7 {
        display: none;
    }
}

@media (max-width: 480px) {
    .floating-gif {
        width: 35px;
        opacity: 0.6;
    }

    .gif-2,
    .gif-5,
    .gif-6,
    .gif-8 {
        display: none;
    }
}
