/* iPhone 15 外觀模擬 */
.phone-frame {
    position: relative;
    border: 12px solid #1a1a1a;
    border-radius: 40px;
    background-color: #1a1a1a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    height: 812px; /* iPhone 15 高度 */
}

.phone-frame::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 25px;
    background-color: #1a1a1a;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 10;
}

/* 通用應用樣式 */
.app-container {
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
    font-family: 'PingFang TC', 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 70px;
    background-color: #ffffff;
}

/* 頂部導航欄 */
.app-header {
    padding: 14px 16px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 底部導航欄 */
.app-tabbar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    padding: 10px 0;
    z-index: 100;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px 0;
    color: #999;
    transition: color 0.3s;
    text-decoration: none;
}

.tab-item.active {
    color: #5b21b6;
}

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

.tab-text {
    font-size: 12px;
    text-align: center;
}

/* 卡片樣式 */
.word-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    background-color: #fff;
    transition: transform 0.2s;
}

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

/* 漸變背景 */
.gradient-bg {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

/* 兒童元素樣式 */
.child-element {
    border-radius: 20px;
    border: 2px solid #e5e7eb;
    padding: 16px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.child-element:hover {
    border-color: #8b5cf6;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

/* 進度條樣式 */
.progress-bar {
    height: 8px;
    border-radius: 4px;
    background-color: #e5e7eb;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #8b5cf6, #6366f1);
    transition: width 0.5s ease;
}

/* 動畫效果 */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.bounce-animation {
    animation: bounce 2s infinite ease-in-out;
}

/* 確保響應式設計 */
@media (max-width: 640px) {
    .phone-frame {
        border-width: 8px;
        border-radius: 30px;
        height: 780px; /* 調整小螢幕下的高度 */
    }
}

/* iframe 樣式調整 */
.phone-frame iframe {
    height: 100%;
    width: 100%;
} 