/* ========================================
   程序员灵根测试 - 赛博朋克风格样式
   ======================================== */

:root {
    --primary-color: #00ff9f;
    --secondary-color: #00d4ff;
    --danger-color: #ff0055;
    --bg-dark: #0a0a0f;
    --bg-card: #1a1a2e;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --shadow-glow: 0 0 20px rgba(0, 255, 159, 0.3);
}

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

body {
    font-family: 'Microsoft YaHei', 'Arial', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ========================================
   矩阵背景效果
   ======================================== */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    opacity: 1;
    background: var(--bg-dark);
    pointer-events: none;
    transition: opacity 2s ease-out;
}

@keyframes matrix-scroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(40px); }
}

/* ========================================
   主容器
   ======================================== */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

/* ========================================
   故障艺术标题效果
   ======================================== */
.glitch-container {
    text-align: center;
    margin-bottom: 40px;
}

.glitch {
    font-size: 3.5rem;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    text-shadow: 
        0 0 10px var(--primary-color),
        0 0 20px var(--primary-color),
        0 0 40px var(--primary-color);
    animation: glitch-text 3s infinite;
    margin-bottom: 20px;
}

@keyframes glitch-text {
    0%, 100% {
        text-shadow: 
            0 0 10px var(--primary-color),
            0 0 20px var(--primary-color),
            0 0 40px var(--primary-color);
    }
    25% {
        text-shadow: 
            -2px 0 var(--danger-color),
            2px 2px var(--secondary-color);
    }
    50% {
        text-shadow: 
            2px -2px var(--danger-color),
            -2px 0 var(--secondary-color);
    }
    75% {
        text-shadow: 
            -2px 2px var(--danger-color),
            2px 0 var(--secondary-color);
    }
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-before 0.3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch::after {
    animation: glitch-after 0.4s infinite;
    clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
}

@keyframes glitch-before {
    0%, 100% { transform: translate(0); }
    33% { transform: translate(-2px, 2px); }
    66% { transform: translate(2px, -2px); }
}

@keyframes glitch-after {
    0%, 100% { transform: translate(0); }
    33% { transform: translate(2px, -2px); }
    66% { transform: translate(-2px, 2px); }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    min-height: 30px;
}

.subtitle-text {
    display: inline-block;
    white-space: nowrap;
    animation: subtitleGlow 3s ease-in-out infinite;
}

@keyframes subtitleGlow {
    0%, 100% {
        opacity: 0.7;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-3px);
        text-shadow: 0 0 10px rgba(0, 255, 159, 0.5);
    }
}

/* ========================================
   AI 鉴定师头像
   ======================================== */
.ai-master {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.ai-avatar {
    text-align: center;
}

.avatar-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-glow);
    animation: float 3s ease-in-out infinite;
}

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

.avatar-emoji {
    font-size: 4rem;
}

.speech-bubble {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 15px;
    position: relative;
    min-width: 350px;
    max-width: 450px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 159, 0.3);
    transition: opacity 0.3s ease;
}

.speech-bubble::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--bg-card);
}

.speech-bubble p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   昵称输入
   ======================================== */
.nickname-input-container {
    text-align: center;
    margin: 40px 0;
    animation: fadeInUp 0.6s ease-out;
}

.nickname-label {
    display: block;
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: bold;
}

.nickname-input,
.nickname-input-field {
    width: 100%;
    max-width: 400px;
    padding: 15px 20px;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    color: var(--text-primary);
    text-align: center;
    transition: all 0.3s;
}

.nickname-input:focus,
.nickname-input-field:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 20px rgba(0, 255, 159, 0.3);
    transform: translateY(-2px);
}

.nickname-input::placeholder,
.nickname-input-field::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.nickname-hint {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

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

.user-nickname {
    text-align: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 20px 0;
    font-weight: bold;
    text-shadow: 0 0 15px rgba(0, 255, 159, 0.6);
    letter-spacing: 2px;
}

.user-nickname span {
    font-weight: bold;
    color: var(--primary-color);
}

/* ========================================
   开始按钮
   ======================================== */
.start-section {
    text-align: center;
    margin: 60px 0;
}

.start-btn,
.submit-btn {
    position: relative;
    padding: 20px 60px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--bg-dark);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s;
    box-shadow: 0 0 30px rgba(0, 255, 159, 0.5);
}

.start-btn:hover,
.submit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(0, 255, 159, 0.8);
}

.start-btn:active,
.submit-btn:active {
    transform: scale(0.95);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.start-btn:hover .btn-glow,
.submit-btn:hover .btn-glow {
    width: 300px;
    height: 300px;
}

/* ========================================
   特性标签
   ======================================== */
.feature-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.tag {
    padding: 10px 20px;
    background: rgba(0, 255, 159, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.tag:hover {
    background: rgba(0, 255, 159, 0.2);
    transform: translateY(-2px);
}

/* ========================================
   统计数据
   ======================================== */
.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.stat-item {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(0, 255, 159, 0.2);
    transition: all 0.3s;
    min-width: 150px;
}

.stat-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

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

/* ========================================
   测试页样式
   ======================================== */
.test-header {
    text-align: center;
    margin-bottom: 40px;
}

.test-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

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

.progress-container {
    margin: 30px auto;
    max-width: 500px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.progress-track {
    height: 8px;
    background: rgba(0, 255, 159, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--primary-color);
}

.question-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 10px 0;
    font-style: italic;
}

.random-code-btn {
    margin-top: 10px;
    padding: 10px 20px;
    background: rgba(0, 255, 159, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
}

.random-code-btn:hover {
    background: rgba(0, 255, 159, 0.2);
    transform: translateY(-2px);
}

.nav-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: bold;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background: rgba(0, 255, 159, 0.1);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    transform: translateY(-2px);
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.test-form {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 159, 0.2);
}

.question-block {
    margin-bottom: 40px;
}

.question-label {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: bold;
}

.question-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

.difficulty-badge {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.difficulty-badge.hard {
    background: linear-gradient(135deg, #ff0055, #ff6b00);
    color: white;
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.5);
}

.difficulty-badge.medium {
    background: linear-gradient(135deg, #00d4ff, #0099ff);
    color: white;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.difficulty-badge.easy {
    background: linear-gradient(135deg, #00ff9f, #00cc99);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 159, 0.5);
}

.code-input {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(0, 255, 159, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s;
}

.code-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 255, 159, 0.3);
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 255, 159, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.option:hover {
    background: rgba(0, 255, 159, 0.1);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.option input[type="radio"],
.option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.option-text {
    flex: 1;
    color: var(--text-primary);
    font-size: 1rem;
}

.submit-section {
    text-align: center;
    margin-top: 50px;
}

/* ========================================
   加载动画
   ======================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
    max-width: 400px;
}

.loading-spinner {
    width: 100px;
    height: 100px;
    border: 5px solid rgba(0, 255, 159, 0.2);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

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

.loading-title {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.loading-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 30px;
    min-height: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 255, 159, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s;
    box-shadow: 0 0 10px var(--primary-color);
}

/* ========================================
   结果页样式
   ======================================== */
.result-header {
    text-align: center;
    margin-bottom: 40px;
}

.result-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.result-card {
    background: var(--bg-card);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--primary-color);
    margin-bottom: 40px;
}

.persona-badge {
    text-align: center;
    margin-bottom: 40px;
}

.persona-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.persona-name {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(0, 255, 159, 0.5);
}

.persona-rarity {
    font-size: 1.5rem;
    color: #ffd700;
    letter-spacing: 5px;
}

.persona-description {
    background: rgba(0, 0, 0, 0.3);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-color);
}

.persona-description p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.persona-advice {
    background: linear-gradient(135deg, rgba(0, 255, 159, 0.1), rgba(0, 212, 255, 0.1));
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid var(--primary-color);
}

.advice-label {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: bold;
}

.persona-advice p {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-primary);
    margin: 0;
}

.element-display {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 255, 159, 0.05);
    border-radius: 10px;
}

.element-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.element-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.element-tag {
    padding: 8px 15px;
    background: linear-gradient(135deg, rgba(0, 255, 159, 0.2), rgba(0, 212, 255, 0.2));
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
}

.talent-score {
    text-align: center;
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.1));
    border: 2px solid #ffd700;
    border-radius: 15px;
}

.score-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.score-value {
    font-size: 4rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin: 10px 0;
}

.score-potential {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 10px;
    font-style: italic;
}

.persona-stats {
    margin: 30px 0;
}

.stats-title {
    text-align: center;
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: bold;
}

.stat-bar {
    margin-bottom: 20px;
}

.stat-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-progress {
    height: 12px;
    background: rgba(0, 255, 159, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-out;
    width: 0%;
}

.stat-metal {
    background: linear-gradient(90deg, #c0c0c0, #e5e5e5);
    box-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.stat-wood {
    background: linear-gradient(90deg, #228b22, #32cd32);
    box-shadow: 0 0 10px rgba(34, 139, 34, 0.5);
}

.stat-water {
    background: linear-gradient(90deg, #1e90ff, #00bfff);
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.5);
}

.stat-fire {
    background: linear-gradient(90deg, #ff4500, #ff6347);
    box-shadow: 0 0 10px rgba(255, 69, 0, 0.5);
}

.stat-earth {
    background: linear-gradient(90deg, #8b4513, #cd853f);
    box-shadow: 0 0 10px rgba(139, 69, 19, 0.5);
}

.ai-comment {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 15px;
}

.ai-avatar-small {
    font-size: 2rem;
    flex-shrink: 0;
}

.ai-bubble {
    flex: 1;
}

.ai-bubble p {
    margin: 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* ========================================
   操作按钮
   ======================================== */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(0, 255, 159, 0.1);
    color: var(--text-primary);
    min-width: 150px;
}

.action-btn:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 159, 0.4);
}

.share-btn {
    border-color: var(--secondary-color);
    background: rgba(0, 212, 255, 0.1);
}

.share-btn:hover {
    background: var(--secondary-color);
}

.retry-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: var(--bg-dark);
}

.retry-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 25px rgba(0, 255, 159, 0.6);
}

.share-tips {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ========================================
   动画效果
   ======================================== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   文字返回按钮
   ======================================== */
.home-btn-text {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    background: rgba(0, 255, 159, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 1000;
}

.home-btn-text:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 159, 0.4);
}

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

/* ========================================
   自定义弹窗
   ======================================== */
.custom-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.85) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    animation: modalFadeIn 0.3s ease-out;
    margin: 0 !important;
    padding: 0 !important;
}

.custom-modal.show {
    display: flex !important;
}

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

.modal-content {
    background: #1a1a2e !important;
    border: 3px solid #00ff9f !important;
    border-radius: 20px !important;
    padding: 40px !important;
    max-width: 500px !important;
    width: 90% !important;
    box-shadow: 0 0 50px rgba(0, 255, 159, 0.6), 0 0 100px rgba(0, 255, 159, 0.3) !important;
    animation: modalSlideIn 0.4s ease-out;
    position: relative !important;
    margin: 0 auto !important;
    transform: translateY(0) !important;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-icon {
    font-size: 4rem !important;
    text-align: center !important;
    margin-bottom: 20px !important;
    animation: iconBounce 0.6s ease-out;
    display: block !important;
}

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

.modal-title {
    font-size: 1.8rem !important;
    color: #00ff9f !important;
    text-align: center !important;
    margin-bottom: 20px !important;
    font-weight: bold !important;
    text-shadow: 0 0 10px rgba(0, 255, 159, 0.5) !important;
    display: block !important;
}

.modal-message {
    color: #b0b0b0 !important;
    font-size: 1.1rem !important;
    line-height: 1.8 !important;
    margin-bottom: 30px !important;
    text-align: left !important;
    white-space: pre-line !important;
    display: block !important;
}

.modal-button {
    width: 100% !important;
    padding: 15px !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
    background: linear-gradient(135deg, #00ff9f, #00d4ff) !important;
    color: #0a0a0f !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    box-shadow: 0 0 20px rgba(0, 255, 159, 0.4) !important;
    display: block !important;
}

.modal-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 0 30px rgba(0, 255, 159, 0.6) !important;
}

.modal-button:active {
    transform: translateY(0) !important;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
    .home-btn-text {
        top: 15px;
        left: 15px;
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    
    .speech-bubble {
        min-width: 280px;
        max-width: 350px;
    }
    .glitch {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .nickname-input {
        max-width: 100%;
        font-size: 1rem;
        padding: 12px 15px;
    }
    
    .nickname-label {
        font-size: 1.1rem;
    }
    
    .avatar-circle {
        width: 80px;
        height: 80px;
    }
    
    .avatar-emoji {
        font-size: 3rem;
    }
    
    .start-btn,
    .submit-btn {
        padding: 15px 40px;
        font-size: 1.2rem;
    }
    
    .test-form {
        padding: 20px;
    }
    
    .result-card {
        padding: 30px 20px;
    }
    
    .persona-name {
        font-size: 2rem;
    }
    
    .persona-icon {
        font-size: 3.5rem;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   打印样式（用于截图分享）
   ======================================== */
@media print {
    body {
        background: var(--bg-dark);
    }
    
    .matrix-bg,
    .action-buttons,
    .share-tips {
        display: none;
    }
}


