/* ========== 高考升学网 - 前台样式 ========== */

/* 强制 Bootstrap 网格生效 */
.row { display: flex !important; flex-wrap: wrap !important; }
/* .col-md-4 不再强制锁死 33.33%，否则会覆盖 Bootstrap 响应式断点，导致手机竖屏下所有 col-md-4 被压成 1/3 宽。 */

:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --success: #2ec4b6;
    --warning: #ff9f1c;
    --danger: #e71d36;
    --dark: #1e1e2d;
    --gray-50: #f8f9fa;
    --gray-100: #f0f2f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-500: #adb5bd;
    --gray-700: #495057;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-700);
}

/* 导航栏 */
.navbar-brand {
    font-weight: 800;
    letter-spacing: 1px;
}
.navbar .nav-link {
    padding: 10px 16px !important;
    font-weight: 500;
    transition: color 0.2s;
}
.navbar .nav-link:hover {
    opacity: 0.85;
}

/* 卡片通用 */
.front-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: none;
    overflow: hidden;
    margin-bottom: 20px;
}
.front-card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--gray-100);
    font-weight: 600;
    font-size: 15px;
    padding: 16px 20px;
}

/* 用户中心侧边栏 */
.user-sidebar {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-bottom: 20px;
}
.user-sidebar .user-info-card {
    background: linear-gradient(135deg, var(--primary), #7209b7);
    padding: 24px 18px;
    text-align: center;
    color: #fff;
}
.user-sidebar .avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 32px;
    color: #fff;
    border: 3px solid rgba(255,255,255,0.3);
}
.user-sidebar .nickname {
    font-size: 17px;
    font-weight: 600;
}
.user-sidebar .phone {
    font-size: 13px;
    opacity: 0.75;
}
.user-sidebar .vip-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 11px;
    background: linear-gradient(135deg,#FFB800,#FF9500);
    color: #fff;
    font-weight: 600;
}
.user-sidebar .vip-badge.admin-badge {
    background: linear-gradient(135deg,#4361ee,#7209b7);
}
.user-sidebar .vip-badge.vip-badge-plain {
    background: rgba(255,255,255,0.22);
    border: 1px solid rgba(255,255,255,0.4);
}
.user-sidebar .points-chip {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 14px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255,255,255,0.18);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.35);
}
.user-sidebar .points-chip b {
    font-size: 16px;
    margin-right: 2px;
    color: #FFE066;
}
.user-sidebar .sidebar-menu {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}
.user-sidebar .sidebar-menu li a {
    display: block;
    padding: 11px 22px;
    color: var(--gray-700);
    font-size: 14px;
    transition: all 0.15s;
    border-left: 3px solid transparent;
    text-decoration: none;
}
.user-sidebar .sidebar-menu li a:hover,
.user-sidebar .sidebar-menu li a.active {
    background: rgba(67,97,238,0.06);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 500;
}
.user-sidebar .sidebar-menu li a i {
    width: 20px;
    margin-right: 8px;
    text-align: center;
}

/* 统计卡片 */
.stat-mini {
    text-align: center;
    padding: 20px 15px;
}
.stat-mini .stat-num {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}
.stat-mini .stat-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* 订阅标签 */
.sub-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    user-select: none;
}
.sub-tag:hover {
    transform: translateY(-1px);
}
.sub-tag.active {
    border-color: currentColor;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.sub-tag .sub-icon {
    font-size: 16px;
    vertical-align: middle;
    margin-right: 4px;
}
.sub-push-toggle {
    position: relative;
    top: 2px;
    width: 44px;
    height: 22px;
}

/* 内容卡片网格 */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}
.content-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}
.content-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.content-item .content-thumb {
    aspect-ratio: 9/16;
    max-height: 300px;
    object-fit: cover;
    width: 100%;
    background: var(--gray-200);
    display: block;
}
.content-item video.content-thumb {
    object-fit: cover;
}
.content-item .content-body {
    padding: 10px 12px;
}
.content-item .content-type {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}
.type-poster {
    background: #e8f0fe;
    color: var(--primary);
}
.type-video {
    background: #fef3e2;
    color: var(--warning);
}
.content-item .content-date {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* 登录/注册页面 */
.auth-page {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-box {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 420px;
    padding: 40px 35px;
}
.auth-box .auth-logo {
    text-align: center;
    margin-bottom: 30px;
}
.auth-box .auth-logo h3 {
    font-weight: 700;
    color: var(--dark);
    font-size: 22px;
}
.auth-box .auth-logo p {
    color: var(--gray-500);
    font-size: 14px;
    margin-top: 6px;
}
.auth-box .form-control {
    height: 46px;
    border-radius: 10px;
    padding-left: 42px;
    border: 1.5px solid var(--gray-200);
    font-size: 14px;
}
.auth-box .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67,97,238,0.1);
}
.auth-box .input-group-text {
    border-radius: 10px 0 0 10px;
    border-right: 0;
    border: 1.5px solid var(--gray-200);
    background: var(--gray-50);
    color: var(--gray-500);
    width: 42px;
    justify-content: center;
}
.btn-auth {
    height: 46px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}
.empty-state i {
    font-size: 56px;
    color: var(--gray-300);
    margin-bottom: 16px;
}
.empty-state h5 {
    color: var(--gray-400);
    font-weight: 500;
}

/* 响应式 */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .user-sidebar {
        margin-bottom: 16px;
    }
    .stat-mini .stat-num {
        font-size: 22px;
    }
}

/* 手机竖屏（<=576px）优化 */
@media (max-width: 576px) {
    /* 热门院校列表：校名过长时允许折行，保持徽章居右但不挤压 */
    .list-group-item.d-flex.justify-content-between.align-items-center {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    .list-group-item .badge {
        flex-shrink: 0;
    }
}

/* 折叠菜单（<lg）中的省份选择器：改为透明白框，融入蓝色导航背景 */
@media (max-width: 991.98px) {
    #provSwitcher {
        background: rgba(255,255,255,0.12) !important;
        color: #fff !important;
        border-color: rgba(255,255,255,0.35) !important;
        max-width: none !important;
        width: 100% !important;
        display: block !important;
    }
    #provSwitcher option {
        color: #212529;
    }
}

/* 动画 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in {
    animation: fadeInUp 0.4s ease-out both;
}

/* ========== 列表页卡片（院校库/专业库/就业信息） =========*/
.uni-card,
.major-card,
.emp-card {
    border-radius: 10px;
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
    background: #fff;
    cursor: pointer;
}
.uni-card:hover,
.major-card:hover,
.emp-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(67,97,238,0.15);
    transform: translateY(-3px);
}
.major-card:hover {
    border-color: var(--success);
    box-shadow: 0 4px 16px rgba(46,196,182,0.15);
}
.emp-card:hover {
    border-color: var(--warning);
    box-shadow: 0 4px 16px rgba(255,159,28,0.15);
}

/* 筛选栏卡片 */
.card-header.bg-primary,
.card-header.bg-success,
.card-header.bg-warning {
    font-weight: 600;
    font-size: 14px;
}
