/* ============================================
   家长端样式
   ============================================ */

.parent-layout {
    max-width: 800px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
}

.parent-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 6px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.parent-header h1 {
    font-size: 20px;
    margin-bottom: 1.5px;
}

.parent-header p {
    font-size: 15px;
    opacity: 0.85;
}

.parent-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.parent-nav a {
    padding: 5px 2px;
    text-align: center;
    color: var(--text-light);
    text-decoration: none;
    font-size: 13px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.parent-nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.parent-nav a .nav-icon {
    display: block;
    font-size: 22px;
    margin-bottom: 2px;
}

.parent-content {
    padding: 16px;
}

/* 报名表单 */
.reg-form {
    background: #fff;
    border-radius: 12px;
    padding: 24px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.reg-form .form-section {
    margin-bottom: 24px;
}

.reg-form .form-section h3 {
    font-size: 15px;
    color: var(--primary);
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 3px solid var(--primary);
}

/* 班级选择卡片 */
.group-list {
    display: grid;
    gap: 12px;
}

.group-card {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.group-card:hover {
    border-color: var(--primary-light);
}

.group-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.group-card h4 {
    font-size: 15px;
    margin-bottom: 6px;
}

.group-card p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.5;
}

/* 卡种选择 */
.card-type-list {
    display: grid;
    gap: 10px;
}

.card-type-item {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-type-item:hover {
    border-color: var(--primary-light);
}

.card-type-item.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.card-type-item .info h4 {
    font-size: 15px;
}

.card-type-item .info p {
    font-size: 15px;
    color: var(--text-light);
}

/* 照片上传 */
.photo-upload {
    text-align: center;
}

.photo-preview {
    width: 150px;
    height: 200px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    background: var(--gray-light);
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview .placeholder {
    color: var(--gray);
    text-align: center;
    font-size: 15px;
}

.photo-preview .placeholder .icon {
    font-size: 36px;
    display: block;
    margin-bottom: 4px;
}

/* 课表 */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.schedule-table th {
    background: var(--primary);
    color: #fff;
    padding: 10px;
    font-size: 15px;
}

.schedule-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    text-align: center;
    font-size: 15px;
}

/* 课时展示 */
.hours-display {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 16px;
}

.hours-display .hours-num {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.hours-display .hours-label {
    color: var(--text-light);
    font-size: 15px;
    margin-top: 8px;
}

/* 消息列表 */
.message-item {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    border-left: 4px solid var(--primary);
}

.message-item.unread {
    border-left-color: var(--danger);
}

.message-item .msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.message-item .msg-title {
    font-weight: 600;
    font-size: 15px;
}

.message-item .msg-time {
    font-size: 15px;
    color: var(--gray);
}

.message-item .msg-content {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
}

/* 成长档案 */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

.timeline-item .timeline-date {
    font-size: 15px;
    color: var(--gray);
}

.timeline-item .timeline-title {
    font-weight: 600;
    font-size: 15px;
    margin: 4px 0;
}

.timeline-item .timeline-content {
    font-size: 15px;
    color: var(--text-light);
}

/* 状态展示 */
.status-banner {
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: 600;
}

.status-banner.pending {
    background: #fff8e1;
    color: #f57f17;
}

.status-banner.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-banner.expired {
    background: #ffebee;
    color: #c62828;
}

/* 头部品牌标识 */
.parent-brand {
    font-size: 25px;
    opacity: 0.75;
    letter-spacing: 1.5px;
    margin-bottom: 2px;
    font-weight: 500;
}

/* 登录页 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.login-box h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 8px;
}

.login-box .login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.login-box .login-brand .brand-name {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.login-box .login-brand .brand-sub {
    font-size: 13px;
    color: var(--text-light);
    letter-spacing: 1px;
}

.login-box .subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 28px;
}

.login-box .btn {
    margin-top: 8px;
}

.login-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border);
}

.login-tabs .tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-weight: 600;
}

.login-tabs .tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* 联系人输入 */
.contact-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.contact-row select {
    width: 110px;
    flex-shrink: 0;
}

/* 联系教练页面 */
.contact-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    margin-bottom: 16px;
}

.contact-hero .contact-emoji {
    font-size: 48px;
    margin-bottom: 8px;
}

.contact-hero .contact-title {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.contact-hero .contact-phone {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: 1px;
    word-break: break-all;
}

.contact-hero .contact-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.contact-hero .contact-actions .btn {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.contact-hero .contact-actions .btn-secondary {
    background: rgba(255,255,255,0.95);
    color: var(--primary);
}

.contact-hero .contact-tip {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 8px;
}

.contact-hero .contact-empty {
    padding: 16px 0;
    color: rgba(255,255,255,0.95);
}

.contact-hero .contact-empty .icon {
    font-size: 40px;
    opacity: 0.6;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    gap: 12px;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .info-label {
    color: var(--text-light);
    flex-shrink: 0;
}

.info-item .info-value {
    color: var(--text);
    text-align: right;
    word-break: break-all;
}

@media (max-width: 480px) {
    .parent-header h1 {
        font-size: 18px;
    }
    .reg-form {
        padding: 16px 12px;
    }
    .photo-preview {
        width: 120px;
        height: 160px;
    }
    .contact-hero {
        padding: 24px 16px;
    }
    .contact-hero .contact-phone {
        font-size: 26px;
    }
}

/* ============ 训练视频 ============ */
.parent-video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.parent-video-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.15s;
}
.parent-video-card:active {
    transform: scale(0.98);
}

.parent-video-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    overflow: hidden;
}
.parent-video-thumb img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.parent-video-duration {
    position: absolute;
    bottom: 4px; right: 4px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
}
.parent-video-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    color: #fff;
    opacity: 0.8;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.parent-video-lock {
    position: absolute;
    bottom: 4px; left: 4px;
    background: rgba(255,152,0,0.9);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
}

.parent-video-info {
    padding: 8px 10px;
}
.parent-video-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.parent-video-date {
    font-size: 11px;
    color: #ccc;
    margin-top: 2px;
}

/* VIP banner */
.vip-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #fff8e1, #fff3e0);
    border: 1px solid #ffe0b2;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.vip-banner.vip-active {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-color: #a5d6a7;
}
.vip-banner-text {
    display: flex;
    align-items: center;
    gap: 10px;
}
.vip-banner-text strong {
    font-size: 14px;
    color: #333;
}
.vip-banner-text p {
    font-size: 12px;
    color: #999;
    margin: 2px 0 0;
}
.btn-vip {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: #fff !important;
    border: none;
    white-space: nowrap;
}

/* VIP会员页面 */
.vip-intro {
    text-align: center;
    padding: 30px 20px 20px;
}
.vip-benefits {
    text-align: left;
    max-width: 280px;
    margin: 0 auto;
}
.vip-benefit-item {
    padding: 6px 0;
    font-size: 14px;
    color: #555;
}

.vip-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
}
.vip-card-option {
    background: #fff;
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 16px 8px;
    text-align: center;
    position: relative;
    transition: border-color 0.2s;
}
.vip-card-option.vip-card-recommend {
    border-color: #ff9800;
}
.vip-card-tag {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff9800;
    color: #fff;
    font-size: 10px;
    padding: 2px 10px;
    border-radius: 10px;
    white-space: nowrap;
}
.vip-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.vip-card-price {
    font-size: 28px;
    font-weight: 700;
    color: #ff9800;
    margin: 6px 0 2px;
}
.vip-card-price span {
    font-size: 14px;
}
.vip-card-desc {
    font-size: 11px;
    color: #999;
    margin-bottom: 10px;
}

.vip-card-active, .vip-card-pending {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
}
.vip-card-icon {
    font-size: 36px;
}
.vip-card-label {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}
.vip-card-status {
    font-size: 20px;
    font-weight: 700;
    margin: 4px 0 12px;
}
.vip-card-info p {
    font-size: 13px;
    margin: 4px 0;
    opacity: 0.9;
}

.vip-pay-tip {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
}

/* VIP弹窗提示 */
.vip-prompt {
    text-align: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, #fff8e1, #fff3e0);
    border-radius: 12px;
    margin-top: 8px;
    border: 1px solid #ffe0b2;
    animation: vipPromptIn 0.3s ease;
}
@keyframes vipPromptIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* 播放弹窗 */
.play-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
}
.parent-play-box {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    width: 92%;
    max-width: 640px;
    z-index: 10001;
    max-height: 90vh;
    overflow-y: auto;
}

/* 分页 */
.parent-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}
.parent-page-btn {
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    font-size: 13px;
}
.parent-page-btn.active {
    background: var(--primary, #e74c3c);
    color: #fff;
    border-color: var(--primary, #e74c3c);
}

@media (max-width: 400px) {
    .vip-cards-grid {
        grid-template-columns: 1fr;
    }
    .parent-video-grid {
        grid-template-columns: 1fr;
    }
}
