/* ============================================
   syo.li Landing Page - 样式表
   灵感来源：BanG Dream! It's MyGO!!!!! - Soyorin
   ============================================ */

/* ============================================
   CSS 变量定义
   ============================================ */
:root {
    /* 背景色 */
    --bg-primary: #FFFDF5;
    --bg-secondary: #FFFBF0;
    
    /* 强调色（Soyorin 主色调） */
    --accent-primary: #FFDD88;
    --accent-secondary: #FFBF88;
    --accent-light: #FFFB88;
    
    /* 文字色 */
    --text-primary: #4A4A4A;
    --text-secondary: #7A7A7A;
    
    /* 间距 */
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
}

/* ============================================
   基础重置
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.6;
}

/* ============================================
   布局容器
   ============================================ */

/* 主容器 - 垂直分布 */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    padding: var(--spacing-md);
    text-align: center;
    gap: var(--spacing-md);
}

/* 主内容区 - 居中 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    width: 100%;
}

/* ============================================
   图片区域
   ============================================ */
.image-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.soyorin-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border: 2px solid var(--accent-primary);
    border-radius: 4px;
    background-color: var(--bg-secondary);
}

/* ============================================
   台词区域
   ============================================ */

/* 台词包装器 */
.quote-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: var(--spacing-md) var(--spacing-lg);
    max-width: 800px;
    min-height: 100px;
    position: relative;
}

/* 点击按钮 */
.surprise-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    background: #FFFFFF;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    flex-shrink: 0;
    position: absolute;
    left: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.surprise-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(255, 221, 136, 0.4);
}

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

.surprise-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 名台词容器 */
.quote-container {
    padding: var(--spacing-md) var(--spacing-lg);
    max-width: 600px;
    transition: opacity 0.2s ease;
}

.quote-link {
    display: inline-block;
    text-decoration: none;
    color: var(--accent-primary);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    transition: color 0.2s ease;
    cursor: pointer;
}

.quote-link:hover {
    color: var(--accent-light);
}

.quote-link:visited {
    color: var(--accent-secondary);
}

.quote-mark {
    font-weight: 300;
    opacity: 0.8;
}

.quote-text {
    display: inline;
}

/* ============================================
   对话框样式
   ============================================ */
.quote-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
}

.quote-box.visible {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    cursor: pointer;
    pointer-events: auto;
}

.quote-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.quote-avatar.hidden-avatar {
    display: none;
}

/* 对话气泡 */
.quote-bubble {
    display: inline-block;
    max-width: 400px;
    padding: 0.5em 0.8em;
    border-radius: 0.8em;
    border: 2px solid #AAA;
    background: #FFFFFF;
    color: #555;
    text-align: left;
    font-weight: bold;
    position: relative;
}

/* 名称标签 */
.quote-name {
    display: inline-block;
    padding: 0.2em 0.8em;
    border-radius: 0.8em;
    background: #FF3B72;
    color: #FFF;
    font-size: 90%;
    position: absolute;
    top: -0.8em;
    left: 0.5em;
}

/* 对话内容 */
.quote-content {
    font-size: 140%;
    padding: 0.5em 0.3em 0.2em;
    color: #555;
}

.quote-content .quote-song {
    color: var(--accent-primary);
    text-decoration: none;
}

.quote-content .quote-song:hover {
    text-decoration: underline;
}

/* ============================================
   页脚区域
   ============================================ */
.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
}

.contact-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: var(--accent-primary);
}

/* 计数器 */
.counter {
    padding: 0;
}

.counter-img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   响应式设计
   ============================================ */

/* 移动端（≤600px） */
@media (max-width: 600px) {
    .quote-link {
        font-size: 1.1rem;
        letter-spacing: 0.05em;
    }
    
    .container {
        gap: 0.5rem;
        padding: var(--spacing-sm);
    }
    
    .quote-wrapper {
        flex-direction: column;
        min-height: auto;
        padding: var(--spacing-sm);
    }
    
    .surprise-btn {
        position: relative;
        left: auto;
        margin-bottom: 0.5rem;
    }
    
    .quote-container {
        padding: var(--spacing-sm);
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .quote-box {
        position: absolute;
        left: 50%;
        bottom: 0;
        transform: translateX(-50%) scale(0.8);
    }
    
    .quote-box.visible {
        transform: translateX(-50%) scale(1);
    }
    
    .quote-content {
        font-size: 100%;
    }
    
    .quote-bubble {
        max-width: 260px;
    }
    
    .soyorin-image {
        max-height: 40vh;
    }
}

/* 平板（601px - 768px） */
@media (min-width: 601px) and (max-width: 768px) {
    .quote-link {
        font-size: 1.4rem;
    }
}

/* 桌面端（≥769px） */
@media (min-width: 769px) {
    .quote-link {
        font-size: 1.75rem;
    }
}

/* ============================================
   深色模式
   ============================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1A1A1A;
        --bg-secondary: #252525;
        --text-primary: #E8E8E8;
        --text-secondary: #AAAAAA;
    }
    
    body {
        background-color: var(--bg-primary);
        color: var(--text-primary);
    }
    
    .soyorin-image {
        border-color: var(--accent-primary);
    }
    
    .surprise-btn {
        background: #2A2A2A;
        border-color: var(--accent-primary);
    }
    
    .quote-link {
        color: var(--accent-primary);
    }
    
    .quote-link:hover {
        color: #FFE8A8;
    }
    
    .quote-link:visited {
        color: var(--accent-secondary);
    }
    
    .quote-bubble {
        background: #2A2A2A;
        border-color: #555;
        color: #DDD;
    }
    
    .quote-content {
        color: #DDD;
    }
    
    .quote-content .quote-song {
        color: var(--accent-primary);
    }
    
    .contact-link {
        color: var(--text-secondary);
    }
    
    .contact-link:hover {
        color: var(--accent-primary);
    }
}

/* ============================================
   打印样式
   ============================================ */
@media print {
    body {
        background-color: white;
        color: black;
    }
    
    .quote-link {
        color: black;
    }
    
    .contact-link {
        color: #666;
    }
}