/* ============================================ */
/* static/css/mobile.css */
/* Woos Elite / 吴氏菁英 */
/* Mobile-first styles */
/* ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #f5f7fa;
    color: #2c3e50;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 70px;
    min-height: 100vh;
}

/* Top Navigation */
.mobile-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e8ecf1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.nav-brand a {
    font-size: 18px;
    font-weight: 700;
    color: #3498db;
    text-decoration: none;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-greeting {
    font-size: 13px;
    color: #7f8c8d;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #aaa;
}

.lang-switch a {
    color: #3498db;
    text-decoration: none;
    padding: 2px 4px;
}

.lang-switch a.active {
    font-weight: 700;
    color: #2c3e50;
}

/* Badges */
.badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.badge-active {
    background: #d5f5e3;
    color: #27ae60;
}

.badge-expired {
    background: #fadbd8;
    color: #e74c3c;
}

.badge-count {
    background: #e8f4fd;
    color: #3498db;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 10px;
}

/* Main Content */
.mobile-content {
    padding: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e8ecf1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8ecf1;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
}

/* Stats Grid */
.stats-grid {
    display: flex;
    justify-content: space-around;
    text-align: center;
    padding: 8px 0;
}

.stat-item {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    color: #888;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-decoration: none;
    gap: 6px;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid #3498db;
    color: #3498db;
}

.btn-warning {
    background: #ff9800;
    color: white;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 16px;
    border-radius: 12px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Forms */
.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    -webkit-appearance: none;
    appearance: none;
}


.form-input:focus {
    outline: none;
    border-color: #3498db;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    -webkit-appearance: none;
    appearance: none;
}


/* Flash Messages */
.flash {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 14px;
}

.flash-success {
    background: #d5f5e3;
    color: #27ae60;
}

.flash-error {
    background: #fadbd8;
    color: #e74c3c;
}

.flash-warning {
    background: #fef3cd;
    color: #e67e22;
}

.flash-info {
    background: #e8f4fd;
    color: #3498db;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e8ecf1;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #888;
    font-size: 11px;
    padding: 6px 12px;
}

.bottom-nav-item.active {
    color: #3498db;
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.nav-label {
    font-size: 11px;
}

/* Ability Bars */
.ability-section {
    margin-bottom: 12px;
}

.ability-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.ability-label {
    font-size: 12px;
    width: 80px;
    flex-shrink: 0;
}

.ability-bar-wrap {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.ability-fill {
    height: 100%;
    border-radius: 3px;
}

.ability-num {
    font-size: 12px;
    font-weight: 600;
    width: 24px;
    text-align: right;
}

.ability-score-num {
    font-size: 14px;
    font-weight: 700;
    width: 30px;
    text-align: right;
}

/* Child Card */
.child-card {
    margin-bottom: 14px;
}

.child-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.child-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e8f4fd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: hidden;
    flex-shrink: 0;
}

.child-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.child-avatar.large {
    width: 56px;
    height: 56px;
    font-size: 28px;
}

.child-name {
    font-weight: 600;
    font-size: 15px;
}

.child-meta {
    font-size: 12px;
    color: #888;
}

.child-records {
    font-size: 12px;
    color: #aaa;
}

.child-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Child Profile */
.child-profile-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.child-info-section h2 {
    font-size: 20px;
    margin-bottom: 4px;
}

.child-meta-text {
    font-size: 13px;
    color: #888;
}

.child-bio {
    font-size: 14px;
    margin-top: 8px;
}

.child-target {
    font-size: 13px;
    margin-top: 4px;
    color: #e67e22;
}

/* Evidence Item */
.evidence-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.evidence-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: #f0f0f0;
    object-fit: cover;
    flex-shrink: 0;
}

.audio-thumb, .video-thumb, .doc-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.evidence-detail {
    flex: 1;
    min-width: 0;
}

.evidence-title {
    font-weight: 500;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.evidence-date {
    font-size: 12px;
    color: #888;
}

.evidence-desc {
    font-size: 13px;
    color: #555;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expiry-warning {
    font-size: 11px;
    color: #e74c3c;
    margin-top: 2px;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    background: #fafafa;
}

.upload-zone-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.upload-zone-text {
    color: #888;
    font-size: 14px;
}

.upload-zone-hint {
    color: #bbb;
    font-size: 12px;
    margin-top: 4px;
}

/* Recording */
.recording-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    text-align: center;
}

.recording-divider {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

.record-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e74c3c;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(231,76,60,0.4);
}

.recording-time {
    font-size: 24px;
    font-weight: 600;
    color: #e74c3c;
    margin: 8px 0;
}

/* Tag Selector */
.tag-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag-option {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-action-btn {
    padding: 8px 14px;
    background: #f0f7ff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    color: #333;
    border: none;
    cursor: pointer;
}

/* Empty State */
.empty-state-card {
    text-align: center;
    padding: 40px 20px;
}

.empty-state-icon {
    font-size: 64px;
}

.empty-state-text {
    color: #888;
    margin: 12px 0;
}

/* Warning Card */
.warning-card {
    background: #fff8e1;
    border-left: 4px solid #ff9800;
}

.warning-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.warning-text {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* Notification */
.notification-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.notification-item.unread {
    background: #f0f7ff;
    margin: 0 -16px;
    padding: 10px 16px;
}

.notif-title {
    font-weight: 600;
    font-size: 14px;
}

.notif-message {
    font-size: 13px;
    color: #666;
}

.notif-time {
    font-size: 11px;
    color: #aaa;
}

/* More Items */
.more-items {
    text-align: center;
    padding: 8px;
    color: #888;
    font-size: 13px;
}

/* Auth Pages */
.auth-page {
    padding: 20px 0;
}

.auth-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.auth-title {
    font-size: 24px;
    margin-bottom: 4px;
}

.auth-subtitle {
    color: #888;
    margin-bottom: 20px;
}

.auth-links {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: #888;
}

.auth-links a {
    color: #3498db;
    text-decoration: none;
}

/* Landing Page */
.hero-section {
    text-align: center;
    padding: 40px 20px;
}

.hero-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 15px;
    color: #888;
    line-height: 1.8;
    margin-bottom: 24px;
}

.hero-actions {
    margin-bottom: 20px;
}

.hero-actions .btn {
    margin-bottom: 10px;
}

/* Section */
.section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
}

/* Ability Cards */
.abilities-section {
    margin-bottom: 24px;
}

.ability-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.ability-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.ability-card h3 {
    font-size: 16px;
    margin-bottom: 6px;
}

.ability-card p {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
}

/* Evidence Types Grid */
.evidence-types-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.evidence-type-item {
    padding: 8px 14px;
    background: white;
    border-radius: 20px;
    font-size: 13px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* Ebook Preview */
.ebook-preview {
    background: white;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.ebook-preview-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.ebook-preview h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.ebook-preview p {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
}

/* Policy */
.policy-section {
    margin-bottom: 24px;
}

.policy-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff8e1;
    padding: 16px;
    border-radius: 12px;
}

.policy-icon {
    font-size: 32px;
}

.policy-card strong {
    font-size: 14px;
}

.policy-card p {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

/* Pricing Card */
.pricing-card {
    background: white;
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 2px solid #3498db;
}

.pricing-amount {
    font-size: 48px;
    font-weight: 700;
    color: #2c3e50;
}

.pricing-amount span {
    font-size: 16px;
    color: #888;
}

.pricing-usd {
    font-size: 14px;
    color: #888;
    margin: 4px 0 16px;
}

.pricing-card p {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
}

/* CTA */
.cta-section {
    padding: 20px 0 40px;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

.modal-sheet {
    background: white;
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
}

/* Expiry Info */
.expiry-info {
    font-size: 13px;
    margin-bottom: 8px;
}

.expiry-ok {
    color: #27ae60;
}

.expiry-warn {
    color: #e67e22;
}

.expiry-danger {
    color: #e74c3c;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.timeline-dot {
    position: absolute;
    left: -20px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #3498db;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #3498db;
}

/* Responsive */
@media (min-width: 768px) {
    .mobile-content {
        padding: 24px;
    }
}

/* Safe Area */
@supports (padding: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
        height: calc(60px + env(safe-area-inset-bottom));
    }
    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
}