/* 设备模拟样式 */
.device {
    position: relative;
    width: 375px;
    height: 667px;
    margin: 0 auto;
    background: #fff;
    border-radius: 36px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* iOS设备样式 */
.ios-device {
    border: 12px solid #f2f2f2;
    border-radius: 36px;
}

.ios-device .device-frame {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 24px;
}

.ios-device .device-screen {
    width: 100%;
    height: 100%;
    border: none;
}

.ios-device .device-header {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 24px;
    background: #f2f2f2;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.ios-device .device-sensors {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: #333;
    border-radius: 50%;
}

/* 安卓设备样式 */
.android-device {
    border: 10px solid #333;
    border-radius: 28px;
}

.android-device .device-frame {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
}

.android-device .device-screen {
    width: 100%;
    height: 100%;
    border: none;
}

.android-device .device-header {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20%;
    height: 4px;
    background: #444;
    border-radius: 4px;
}

/* 设备内部通用样式 */
.app-container {
    position: relative;
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
}

/* iOS状态栏 */
.ios-statusbar {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 44px;
    background-color: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 12px;
    z-index: 100;
}

.ios-statusbar.dark {
    background-color: #1a1a1a;
    color: #fff;
}

/* 安卓状态栏 */
.android-statusbar {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 12px;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.android-statusbar.dark {
    background-color: #1a1a1a;
    color: #fff;
}

/* iOS导航栏 */
.ios-navbar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 83px;
    background-color: rgba(248, 248, 248, 0.95);
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: 20px;
}

.ios-navbar.dark {
    background-color: rgba(26, 26, 26, 0.95);
    border-top: 1px solid #333;
}

.ios-navbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
    width: 80px;
    text-align: center;
    font-size: 10px;
    font-weight: 500;
    color: #8e8e93;
}

.ios-navbar-item.active {
    color: #007aff;
}

.ios-navbar.dark .ios-navbar-item {
    color: #8e8e93;
}

.ios-navbar.dark .ios-navbar-item.active {
    color: #007aff;
}

.ios-navbar-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

/* 安卓导航栏 */
.android-navbar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 56px;
    background-color: #ffffff;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.android-navbar.dark {
    background-color: #1a1a1a;
}

.android-navbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
    width: 80px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: #9e9e9e;
}

.android-navbar-item.active {
    color: #673ab7;
}

.android-navbar.dark .android-navbar-item {
    color: #9e9e9e;
}

.android-navbar.dark .android-navbar-item.active {
    color: #b39ddb;
}

.android-navbar-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

/* 通用内容区域 */
.app-content {
    position: relative;
    width: 100%;
    height: calc(100% - 44px - 83px); /* iOS标准 */
    overflow-y: auto;
    padding: 16px;
}

.app-content.android {
    height: calc(100% - 48px - 56px); /* 安卓标准 */
}

/* 暗色模式 */
.app-container.dark {
    background-color: #1a1a1a;
    color: #fff;
}

/* 通用样式组件 */
.app-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
}

.card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.dark .card {
    background-color: #2c2c2e;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-primary {
    background-color: #007aff;
    color: white;
}

.btn-primary.android {
    background-color: #673ab7;
}

.btn-secondary {
    background-color: #f2f2f7;
    color: #333;
}

.btn-secondary.android {
    background-color: #e0e0e0;
}

.dark .btn-secondary {
    background-color: #3a3a3c;
    color: #fff;
}

/* 单词卡片样式 */
.word-card {
    position: relative;
    width: 100%;
    background-color: #ffffff;
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 16px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.dark .word-card {
    background-color: #2c2c2e;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.word-term {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #000;
}

.dark .word-term {
    color: #fff;
}

.word-phonetic {
    font-size: 16px;
    color: #8e8e93;
    margin-bottom: 20px;
}

.word-definition {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 16px;
    color: #333;
}

.dark .word-definition {
    color: #e5e5e5;
}

.word-example {
    font-size: 14px;
    font-style: italic;
    line-height: 1.5;
    color: #666;
    padding-left: 12px;
    border-left: 3px solid #007aff;
    margin-top: 12px;
}

.dark .word-example {
    color: #b0b0b0;
    border-left: 3px solid #0a84ff;
}

.word-example.android {
    border-left: 3px solid #673ab7;
}

.dark .word-example.android {
    border-left: 3px solid #b39ddb;
}

/* 进度指示器 */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e5e5ea;
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0 16px;
}

.dark .progress-bar {
    background-color: #3a3a3c;
}

.progress-fill {
    height: 100%;
    background-color: #007aff;
    border-radius: 4px;
}

.progress-fill.android {
    background-color: #673ab7;
}

/* 列表样式 */
.list-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e5e5ea;
}

.dark .list-item {
    border-bottom: 1px solid #3a3a3c;
}

.list-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: #f2f2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    color: #007aff;
}

.list-item-icon.android {
    color: #673ab7;
    border-radius: 20px;
}

.dark .list-item-icon {
    background-color: #3a3a3c;
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-size: 16px;
    font-weight: 500;
    color: #000;
    margin-bottom: 4px;
}

.dark .list-item-title {
    color: #fff;
}

.list-item-subtitle {
    font-size: 14px;
    color: #8e8e93;
}

/* 表单元素 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #6e6e73;
}

.dark .form-label {
    color: #98989f;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #e5e5ea;
    border-radius: 8px;
    background-color: #fff;
    transition: all 0.2s;
}

.form-input:focus {
    border-color: #007aff;
    outline: none;
}

.form-input.android {
    border-radius: 4px;
}

.form-input.android:focus {
    border-color: #673ab7;
}

.dark .form-input {
    background-color: #1c1c1e;
    border-color: #3a3a3c;
    color: #fff;
}

.dark .form-input:focus {
    border-color: #0a84ff;
}

.dark .form-input.android:focus {
    border-color: #b39ddb;
}

/* 标签样式 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    background-color: #f2f2f7;
    color: #6e6e73;
    margin-right: 8px;
}

.badge-primary {
    background-color: #e5f2ff;
    color: #007aff;
}

.badge-primary.android {
    background-color: #ede7f6;
    color: #673ab7;
}

.dark .badge {
    background-color: #3a3a3c;
    color: #98989f;
}

.dark .badge-primary {
    background-color: #0a334d;
    color: #0a84ff;
}

.dark .badge-primary.android {
    background-color: #331a5d;
    color: #b39ddb;
}

/* 加载动画 */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #007aff;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.spinner.android {
    border-top-color: #673ab7;
}

.dark .spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #0a84ff;
}

.dark .spinner.android {
    border-top-color: #b39ddb;
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .device {
        width: 320px;
        height: 568px;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

.slide-up {
    animation: slideUp 0.3s ease-in-out;
}

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

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.w-full { width: 100%; } 