/* assets/css/style.css */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #F8F9FA;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.status-bar {
    height: 44px;
    background-color: #F8F9FA;
    color: #000;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.nav-bar {
    height: 44px;
    background-color: #F8F9FA;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tab-bar {
    height: 60px;
    background-color: white;
    border-top: 1px solid #E5E5EA;
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #8E8E93;
    font-size: 10px;
}

.tab-item.active {
    color: #4F46E5;
}

.tab-item i, .tab-item .emoji-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.emoji-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.emoji-item {
    background: linear-gradient(135deg, #E1F5FE 0%, #B3E5FC 100%);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(3, 169, 244, 0.1), inset 0 -2px 0 rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.emoji-item:hover {
    transform: translateY(-2px);
}

.emoji {
    font-size: 60px;
    line-height: 1;
}

.answer-box {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.answer-char {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 2px solid #E5E5EA;
}

.answer-char.filled {
    border-color: #4F46E5;
    background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%);
}

.keyboard {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 24px;
}

.key {
    height: 44px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05), inset 0 -2px 0 rgba(0,0,0,0.05);
    transition: transform 0.1s;
    cursor: pointer;
}

.key:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0 -1px 0 rgba(0,0,0,0.05);
}

.function-key {
    background: linear-gradient(135deg, #E5E7EB 0%, #D1D5DB 100%);
}

.hint-badge {
    background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
    color: white;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.time-badge {
    color: #4B5563;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    background-color: white;
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.difficulty-badge {
    background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
    color: white;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.submit-button {
    background: linear-gradient(135deg, #4F46E5 0%, #4338CA 100%);
    color: white;
    border-radius: 12px;
    padding: 14px 0;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    transition: transform 0.2s;
    cursor: pointer;
}

.submit-button:active {
    transform: scale(0.98);
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.level-item {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    position: relative;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    cursor: pointer;
}

.level-completed {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
}

.level-current {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    animation: pulse 2s infinite;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.level-locked {
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    color: #9CA3AF;
    cursor: not-allowed;
}

.level-check {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    background-color: #FBBF24;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
    animation: bounce 1s ease infinite;
}

.continue-game {
    background: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%);
    border-radius: 16px;
    padding: 16px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    cursor: pointer;
}

.play-button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.game-modes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.game-mode-card {
    background-color: white;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #F3F4F6;
    transition: transform 0.2s;
    cursor: pointer;
}

.game-mode-card:active {
    transform: scale(0.98);
}

.emoji-icon-container {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    font-size: 28px;
}

.classic-icon {
    background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.time-icon {
    background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}

.rank-icon {
    background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.2);
}

.daily-icon {
    background: linear-gradient(135deg, #F472B6 0%, #EC4899 100%);
    box-shadow: 0 4px 10px rgba(236, 72, 153, 0.2);
}

.progress-container {
    background-color: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #F3F4F6;
}

.progress-bar {
    height: 6px;
    background-color: #E5E5EA;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4F46E5, #6366F1);
    border-radius: 3px;
}

.result-card {
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
}

.result-header {
    background-color: #4CAF50;
    color: white;
    padding: 20px;
    text-align: center;
}

.star-rating {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.star {
    color: #FFD700;
    font-size: 24px;
    margin: 0 5px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #F2F2F7;
}

/* 动画效果 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

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

@keyframes fadeIn {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

.splash-animation {
    animation: fadeIn 1.5s ease-in-out;
}

.loading-dots span {
    animation: loadingDots 1.4s infinite ease-in-out both;
    background-color: white;
    border-radius: 50%;
    display: inline-block;
    height: 8px;
    margin: 0 4px;
    width: 8px;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadingDots {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.icon-pulse {
    animation: iconPulse 2s infinite;
}

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