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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.container {
    text-align: center;
    padding: 20px;
    width: 100%;
    max-width: 400px;
}

.title {
    color: white;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 0.8s ease-out;
}

.image-container {
    position: relative;
    display: inline-block;
}

.tim-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.tim-image:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.tim-image:active {
    transform: scale(0.95);
}

/* 卡片样式 */
.card-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.card-overlay.active {
    opacity: 1;
    visibility: visible;
}

.text-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 90%;
    width: 350px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-overlay.active .text-card {
    transform: scale(1) translateY(0);
}

.card-content {
    text-align: center;
}

.quote-text {
    font-size: 1.2rem;
    color: #333;
    line-height: 1.6;
    margin-bottom: 1rem;
    animation: fadeIn 0.5s ease-out 0.1s both;
}

.quote-author {
    font-size: 1rem;
    color: #666;
    font-style: italic;
    animation: fadeIn 0.5s ease-out 0.2s both;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: #333;
    transform: rotate(90deg);
}

/* 动画效果 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* 动画效果增强 */
@keyframes textFlash {
    0% { opacity: 0; transform: translateY(-10px); }
    50% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); }
}

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

@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(102, 126, 234, 0.5); }
    50% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.8), 0 0 30px rgba(102, 126, 234, 0.6); }
    100% { box-shadow: 0 0 5px rgba(102, 126, 234, 0.5); }
}

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

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

/* 移除文字滚动动画相关样式 */

.tim-image.spin {
    animation: spin 0.8s ease-in-out;
}

/* 点击禁用状态 */
.tim-image.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .tim-image {
        width: 200px;
        height: 200px;
    }
    
    .text-card {
        width: 300px;
        padding: 1.5rem;
    }
    
    .quote-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 360px) {
    .tim-image {
        width: 180px;
        height: 180px;
    }
    
    .text-card {
        width: 280px;
        padding: 1.2rem;
    }
}