/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .card {
        margin-bottom: 20px;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .modal-xl {
        max-width: 95%;
    }
    
    /* Hero Section 移动端适配 */
    .hero-section {
        min-height: 100vh;
    }
    
    .hero-content {
        padding: 40px 20px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 2rem;
    }
    
    .action-buttons {
        justify-content: center;
        gap: 0.8rem;
    }
    
    .btn-hero {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .hero-illustration {
        padding: 20px;
        margin-top: 2rem;
    }
    
    .hero-image {
        max-height: 400px;
    }
    
    .welcome-title {
        font-size: 2rem;
    }
    
    .welcome-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-brand .brand-text .chinese-name {
        font-size: 0.95rem;
    }
    
    .navbar-brand .brand-text .english-name {
        font-size: 0.65rem;
    }
    
    .navbar-brand img {
        height: 25px !important;
    }
    
    /* iPhone 12 Pro 等中等屏幕优化 */
    @media (max-width: 390px) and (min-width: 376px) {
        .navbar-brand .brand-text .chinese-name {
            font-size: 0.9rem;
        }
        
        .navbar-brand .brand-text .english-name {
            font-size: 0.6rem;
        }
    }
    
    /* 超小屏幕时隐藏英文名称 */
    @media (max-width: 375px) {
        .navbar-brand .brand-text .english-name {
            display: none;
        }
        
        .navbar-brand .brand-text .chinese-name {
            font-size: 0.9rem;
        }
    }
    
    .card-header h3 {
        font-size: 1.25rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 5px;
    }
    
    /* 小屏幕 Hero Section 适配 */
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn-hero {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .welcome-title {
        font-size: 1.8rem;
    }
}

/* 自定义样式 */
body {
    background-color: #f8f9fa;
}

/* Hero Section Styles */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #87ceeb 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.9) 0%, rgba(135, 206, 235, 0.9) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    padding: 60px 40px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    font-weight: 300;
}

.hero-actions {
    margin-top: 2rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.btn-hero {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-hero.btn-primary {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-hero.btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-hero.btn-outline {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.8);
    color: white;
}

.btn-hero.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-hero.btn-warning {
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
    border: none;
    color: white;
}

.btn-hero.btn-warning:hover {
    background: linear-gradient(45deg, #ff5252, #ff9800);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
}


.hero-illustration {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.illustration-container {
    max-width: 100%;
    height: auto;
}

.hero-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}


.welcome-section {
    text-align: center;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.member-name {
    color: #4ade80;
    font-weight: 700;
}

.welcome-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}


.navbar-brand {
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.navbar-brand .brand-text .chinese-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.navbar-brand .brand-text .english-name {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 2px;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.btn {
    border-radius: 0.375rem;
}

.form-control,
.form-select {
    border-radius: 0.375rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 表格标题样式覆盖 */
.table-dark th {
    background-color: #f8f9fa !important;
    color: #495057 !important;
    font-weight: 600 !important;
    border-color: #dee2e6 !important;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

.pagination .page-link {
    border-radius: 0.375rem;
    margin: 0 2px;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.alert {
    border-radius: 0.375rem;
}

.modal-content {
    border-radius: 0.5rem;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 表单验证样式 */
.is-invalid {
    border-color: #dc3545;
}

.is-valid {
    border-color: #198754;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #198754;
}

/* 子信息样式 */
.child-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 0.375rem;
    margin-bottom: 15px;
}

.child-info h6 {
    color: #6c757d;
    margin-bottom: 15px;
}

/* 预览样式 */
#previewContent {
    max-height: 500px;
    overflow-y: auto;
}

#previewContent .border {
    border: 1px solid #dee2e6 !important;
    border-radius: 0.375rem;
}

/* 按钮组样式 */
.btn-group .btn {
    margin-right: 5px;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* 表格操作按钮 */
.table .btn {
    margin-right: 3px;
}

.table .btn:last-child {
    margin-right: 0;
}

/* 搜索框样式 */
.input-group .form-control:focus {
    z-index: 3;
}

.input-group .btn {
    z-index: 2;
}

/* 分页样式 */
.pagination {
    margin-bottom: 0;
}

/* 模态框内容样式 */
.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* 徽章样式 */
.badge {
    font-size: 0.75rem;
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.875rem;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 响应式表格 */
@media (max-width: 768px) {
    .table-responsive {
        border: none;
    }
    
    .table {
        margin-bottom: 0;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        padding: 15px;
        background-color: #fff;
    }
    
    .table tbody td {
        display: block;
        text-align: right;
        border: none;
        padding: 5px 0;
    }
    
    .table tbody td:before {
        content: attr(data-label) ": ";
        float: left;
        font-weight: bold;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .btn,
    .modal,
    .pagination {
        display: none !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .table {
        font-size: 12px;
    }
}

/* 参与徽章样式 */
.participation-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.participation-badge img {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.participation-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 移动端徽章适配 */
@media (max-width: 768px) {
    .participation-badge {
        width: 28px;
        height: 28px;
        top: -6px;
        right: -6px;
    }
    
    .participation-badge img {
        width: 20px;
        height: 20px;
    }
}

/* 小屏幕设备徽章适配 */
@media (max-width: 576px) {
    .participation-badge {
        width: 24px;
        height: 24px;
        top: -4px;
        right: -4px;
    }
    
    .participation-badge img {
        width: 16px;
        height: 16px;
    }
}

/* 内联徽章样式（在标题右边） */
.participation-badge-inline {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

.participation-badge-inline:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* 移动端内联徽章适配 */
@media (max-width: 768px) {
    .participation-badge-inline {
        width: 24px;
        height: 24px;
    }
}

/* 移动端表单项目间距统一 */
@media (max-width: 768px) {
    /* 统一所有表单行的底部间距 */
    .form-step .row.mb-3 {
        margin-bottom: 1rem !important;
    }
    
    /* 统一表单控件间距 - 移除默认的margin-bottom */
    .form-step .form-control,
    .form-step .form-select {
        margin-bottom: 0;
    }
    
    /* 统一帮助文本间距 */
    .form-step .form-text {
        margin-top: 0.25rem;
        margin-bottom: 0;
        font-size: 0.8rem;
    }
    
    /* 统一错误信息间距 */
    .form-step .invalid-feedback {
        margin-top: 0.25rem;
        margin-bottom: 0;
    }
    
    /* 统一复选框间距 */
    .form-step .form-check {
        margin-top: 0;
        margin-bottom: 0;
    }
    
    /* 统一每个表单组的间距 - 这是关键 */
    .form-step .col-md-6,
    .form-step .col-12 {
        margin-bottom: 1.25rem;
    }
    
    /* 确保标签和输入框之间的间距一致 */
    .form-step .form-label {
        margin-bottom: 0.5rem;
    }
    
    /* 统一整个表单组的间距 */
    .form-step .row {
        margin-bottom: 0 !important;
    }
    
    /* 特殊处理：确保每个输入项目组都有统一的间距 */
    .form-step .col-md-6:not(:last-child),
    .form-step .col-12:not(:last-child) {
        margin-bottom: 1.25rem;
    }
}

@media (max-width: 576px) {
    .participation-badge-inline {
        width: 20px;
        height: 20px;
    }
}

/* 用户菜单下拉框宽度调整 */
#userDropdown + .dropdown-menu {
    min-width: 200px;
    max-width: 300px;
}

/* 邮箱显示样式优化 */
.dropdown-item-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.5rem 1rem;
    color: #6c757d;
    font-size: 0.875rem;
}

/* 确保邮箱图标和文字在同一行 */
.dropdown-item-text i {
    margin-right: 0.75rem;
    width: 16px;
    text-align: center;
    color: #007bff;
}

/* 邮箱文字样式 */
.dropdown-item-text span {
    font-weight: 500;
    color: #495057;
}

/* 统一所有下拉菜单项的图标间距 */
.dropdown-menu .dropdown-item i {
    margin-right: 0.75rem;
    width: 16px;
    text-align: center;
}
