/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.5em;
    color: #4a90e2;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.header p {
    font-size: 1.2em;
    color: #666;
}

.nav-container {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-link {
    color: #4a90e2;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    background: rgba(74, 144, 226, 0.1);
    transition: all 0.3s ease;
    font-size: 0.95em;
    font-weight: 500;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(74, 144, 226, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.nav-link:hover::before {
    width: 300px;
    height: 300px;
}

.nav-link:hover {
    color: #4a90e2;
    background: rgba(74, 144, 226, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.2);
    border-color: #4a90e2;
}

.nav-link.active {
    background: rgba(74, 144, 226, 0.4);
    font-weight: bold;
    border-color: #4a90e2;
    color: white;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.nav-link span {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 进度条样式 */
.progress-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: center;
    font-size: 1.1em;
    font-weight: bold;
    color: #4a90e2;
}

/* 控制按钮样式 */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.control-btn {
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.control-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.control-btn:active {
    transform: translateY(-1px);
}

/* 音标分类样式 */
.phonetic-sections {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.phonetic-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 2em;
    color: #4a90e2;
    margin-bottom: 25px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* 音标网格布局 */
.phonetic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* 音标卡片样式 */
.phonetic-card {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border: 3px solid #e0e0e0;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.phonetic-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: #4a90e2;
    box-shadow: 0 15px 35px rgba(74, 144, 226, 0.3);
}

.phonetic-card.learned {
    background: linear-gradient(145deg, #e8f5e8, #d4edda);
    border-color: #28a745;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.2);
}

.phonetic-card.learned::after {
    content: '✅';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5em;
    animation: bounce 1s ease-out;
}

/* 音标符号样式 */
.phonetic-symbol {
    font-size: 3em;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 15px;
    font-family: 'Times New Roman', serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* 播放按钮样式 */
.play-btn {
    background: linear-gradient(45deg, #4a90e2, #357abd);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5em;
    cursor: pointer;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(74, 144, 226, 0.3);
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.5);
}

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

/* 示例单词样式 */
.examples {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.example {
    background: rgba(74, 144, 226, 0.1);
    padding: 8px 15px;
    border-radius: 15px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(74, 144, 226, 0.3);
}

.example:hover {
    background: rgba(74, 144, 226, 0.3);
    transform: scale(1.05);
    border-color: #4a90e2;
}

.example:active {
    transform: scale(0.98);
}

/* 底部样式 */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.footer p {
    font-size: 1.3em;
    color: #4a90e2;
    font-weight: bold;
}

/* 动画效果 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .header p {
        font-size: 1em;
    }
    
    .phonetic-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .phonetic-card {
        padding: 15px;
    }
    
    .phonetic-symbol {
        font-size: 2.5em;
    }
    
    .controls {
        gap: 10px;
    }
    
    .control-btn {
        padding: 10px 20px;
        font-size: 1em;
    }
    
    .section-title {
        font-size: 1.5em;
    }
    
    .nav-links {
        gap: 8px;
    }
    
    .nav-link {
        font-size: 0.75em;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .phonetic-grid {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-btn {
        width: 200px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .phonetic-symbol {
        font-size: 2em;
    }
    
    .nav-links {
        gap: 6px;
    }
    
    .nav-link {
        font-size: 0.7em;
        padding: 4px 8px;
    }
}

/* 特殊效果 */
.phonetic-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: left 0.5s;
}

.phonetic-card:hover::before {
    left: 100%;
}

/* Toast 消息样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 1.2em;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.5s ease-out;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal h2 {
    color: #4a90e2;
    font-size: 2em;
    margin-bottom: 20px;
}

.modal button {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 20px;
    font-size: 1.1em;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
}

.modal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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