/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    overflow: hidden;
}

/* 头部样式 */
.header {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: white;
    text-align: center;
    padding: 3rem 1rem;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.class-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: bounce 2s ease-in-out infinite;
}

.class-slogan {
    font-size: 1.5rem;
    font-style: italic;
    opacity: 0.9;
}

/* 主内容区域 */
.main-content {
    padding: 2rem;
}

/* 欢迎区域 */
.welcome-area {
    text-align: center;
    padding: 2rem 0;
    position: relative;
    margin-bottom: 3rem;
}

.welcome-text h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    animation: slideInLeft 1s ease;
}

.welcome-text p {
    font-size: 1.2rem;
    color: #666;
    animation: slideInRight 1s ease;
}

/* 浮动表情 */
.floating-emojis {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.emoji {
    position: absolute;
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
}

.emoji:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.emoji:nth-child(2) {
    top: 60%;
    left: 80%;
    animation-delay: 2s;
}

.emoji:nth-child(3) {
    top: 40%;
    left: 50%;
    animation-delay: 1s;
}

.emoji:nth-child(4) {
    top: 80%;
    left: 20%;
    animation-delay: 3s;
}

.emoji:nth-child(5) {
    top: 30%;
    left: 70%;
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* 区域标题 */
.area-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

.area-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border-radius: 2px;
}

/* 游戏区域 */
.games-area {
    margin-bottom: 3rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.game-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 2rem 1rem;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.game-item::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: left 0.5s ease;
}

.game-item:hover::before {
    left: 100%;
}

.game-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.game-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.game-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.game-item p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 班级动态区 */
.news-area {
    margin-bottom: 3rem;
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.news-ticker {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.ticker-content {
    display: flex;
    animation: ticker 20s linear infinite;
    white-space: nowrap;
}

.ticker-content span {
    display: inline-block;
    padding: 0 2rem;
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* 互动按钮区 */
.interactive-area {
    margin-bottom: 3rem;
}

.buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.interactive-btn {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.interactive-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background: linear-gradient(45deg, #4ecdc4, #ff6b6b);
}

/* 特效区域 */
.effects-area {
    background: #333;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
}

.effects-area .area-title {
    color: white;
    margin-bottom: 1.5rem;
}

.effects-area {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.effect-btn {
    background: white;
    color: #333;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.effect-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    background: #ff6b6b;
    color: white;
}

/* 页脚样式 */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
    margin-top: 2rem;
}

/* 动画效果 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .class-title {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .welcome-text h2 {
        font-size: 2rem;
    }
    
    .area-title {
        font-size: 1.5rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .buttons-grid {
        grid-template-columns: 1fr;
    }
    
    .ticker-content span {
        font-size: 0.9rem;
        padding: 0 1rem;
    }
}

/* 联系方式区域样式 */
.contact-area {
    margin-bottom: 3rem;
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.contact-icon {
    font-size: 2.5rem;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.contact-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: bold;
}

.contact-item:hover .contact-info h4 {
    color: white;
}

.contact-info p {
    margin: 0.3rem 0;
    color: #666;
    font-size: 0.95rem;
}

.contact-item:hover .contact-info p {
    color: rgba(255, 255, 255, 0.9);
}

.volume-control {
    width: 120px;
}

.volume-control input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right, #667eea 0%, #764ba2 100%);
    outline: none;
    cursor: pointer;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.volume-control input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #764ba2, #667eea);
}

/* 涟漪效果 */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 粒子效果容器 */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: particle-fall 3s linear infinite;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.close {
    font-size: 2rem;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

/* 选项样式 */
.option-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.option-item:hover {
    border-color: #667eea;
    background-color: #eef2ff;
}

.option-item.selected {
    border-color: #667eea;
    background-color: #eef2ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.option-item input[type="radio"] {
    margin-right: 1rem;
    transform: scale(1.2);
}

.option-item label {
    cursor: pointer;
    flex: 1;
    font-size: 1rem;
    color: #333;
}

/* 按钮样式 */
.quiz-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exit-btn {
    background-color: #ff6b6b;
    color: white;
}

.exit-btn:hover {
    background-color: #ee5a52;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.skip-btn {
    background-color: #f0ad4e;
    color: white;
}

.skip-btn:hover {
    background-color: #ec971f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 173, 78, 0.3);
}

.confirm-btn {
    background-color: #5cb85c;
    color: white;
}

.confirm-btn:hover {
    background-color: #4cae4c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(92, 184, 92, 0.3);
}

/* 模态框动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-footer {
        flex-direction: column;
    }
    
    .quiz-btn {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header, .modal-body, .modal-footer {
        padding: 1rem;
    }
}