*, *::before, *::after {
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow-y: scroll;
}

:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --bg-gradient: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: #f8f9fc;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 !important;
}

body.swal2-shown, body.modal-open {
    padding-right: 0 !important;
    overflow-y: scroll !important;
}

/* ========== 登录注册页面 ========== */
.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 0 20px;
    margin: 0 auto;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 100%;
}

.auth-header {
    background: var(--bg-gradient);
    padding: 40px 20px;
    text-align: center;
    color: white;
}

.auth-header i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.auth-header h2 {
    font-weight: 700;
    margin: 0;
}

.auth-body {
    padding: 40px;
}

.auth-form {
    width: 100%;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--secondary-color);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* ========== 主应用容器 ========== */
.app-container {
    width: 450px;
    height: 100vh;
    max-height: 900px;
    display: flex;
    flex-direction: column;
    background: #f0f2f5;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.app-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.app-content::-webkit-scrollbar {
    display: none;
}

.app-content > * {
    width: 100%;
    flex-shrink: 0;
}

.fade-in {
    animation: fadeIn 0.3s ease;
    width: 100%;
    min-height: 0;
}

.view-body {
    padding: 20px;
    width: 100%;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.view-body::-webkit-scrollbar {
    display: none;
}

/* ========== 手机端全屏 ========== */
@media (max-width: 768px) {
    html {
        height: 100%;
        overflow: hidden;
    }
    
    body {
        height: 100%;
        min-height: 100%;
        overflow: hidden;
        display: block !important;
        align-items: stretch;
        justify-content: stretch;
    }
    
    #app {
        width: 100% !important;
        height: 100% !important;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    
    .auth-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        height: 100% !important;
        overflow-y: auto;
    }
    
    .auth-card {
        width: 100% !important;
        min-height: 100%;
        border-radius: 0 !important;
        box-shadow: none !important;
        display: flex;
        flex-direction: column;
    }
    
    .auth-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 30px 25px;
    }
    
    .app-container {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
        display: flex;
        flex-direction: column;
    }
    
    .app-content {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .bottom-nav {
        flex-shrink: 0;
        position: relative !important;
    }
}

/* ========== 底部导航 ========== */
.bottom-nav {
    height: 65px;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    width: 100%;
    position: sticky;
    bottom: 0;
    z-index: 1000;
    flex-shrink: 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--secondary-color);
    font-size: 0.75rem;
    padding: 10px;
    cursor: pointer;
}

.nav-item i {
    font-size: 1.3rem;
    margin-bottom: 3px;
}

.nav-item.active {
    color: var(--primary-color);
}

/* ========== 视图头部和内容 ========== */
.view-header {
    background: var(--bg-gradient);
    padding: 15px;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.view-body > div {
    width: 100%;
}

/* ========== 卡片样式 ========== */
.card-custom {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    width: 100%;
}

.card-custom.p-0 {
    padding: 0;
}

/* ========== 个人中心 ========== */
.profile-header {
    background: var(--bg-gradient);
    padding: 30px 20px;
    color: white;
    text-align: center;
    border-radius: 0 0 30px 30px;
    margin-bottom: 20px;
    width: 100%;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 2.5rem;
}

/* ========== 首页标签 ========== */
.home-tabs {
    display: flex;
    background: #f8f9fc;
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 20px;
}

.home-tab-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.home-tab-item.active {
    background: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    color: var(--primary-color);
    font-weight: 600;
}

/* ========== 表单元素 ========== */
.form-control {
    border-radius: 10px;
    padding: 12px 15px;
    border: 1px solid #e3e6f0;
    margin-bottom: 20px;
    width: 100%;
}

.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
    border-color: var(--primary-color);
}

.btn-auth {
    background: var(--bg-gradient);
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
    color: white;
    width: 100%;
    margin-top: 10px;
}

.btn-auth:hover {
    color: white;
    opacity: 0.9;
}

.verify-btn {
    border-radius: 10px;
    margin-left: 10px;
    white-space: nowrap;
    min-width: 110px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-body .d-flex .form-control {
    margin-bottom: 0;
}

/* ========== 注册步骤指示器 ========== */
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.step {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e3e6f0;
    margin: 0 8px;
}

.step.active {
    background: var(--primary-color);
    width: 30px;
    border-radius: 6px;
}

/* ========== 列表样式 ========== */
.list-group-item {
    border: none;
    border-radius: 10px !important;
    margin-bottom: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.03);
    width: 100%;
}

.view-body .list-group-flush .list-group-item {
    border-radius: 0 !important;
    margin-bottom: 0;
}

/* ========== 圈友头像 ========== */
.im-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 12px;
    flex-shrink: 0;
}

/* ========== 公告 ========== */
.notice-list-container {
    width: 100%;
}

.notice-content {
    width: 100%;
    word-wrap: break-word;
}

.notice-content img {
    max-width: 100% !important;
    height: auto !important;
}

/* ========== 动画 ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

[v-cloak] { display: none; }
