* {
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}
.invalid-feedback {
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 0.25rem;
}
.is-invalid {
    border-color: #dc3545;
}

.container {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    z-index: -1;
}

.title {
    font-size: 2.2em;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 30px;
    font-weight: 700;
    color: #2c3e50;
    position: relative;
    padding-bottom: 15px;
}

.title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #667eea, #764ba2);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.form-control option {
    padding: 10px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col {
    flex: 1;
    padding: 0 10px;
}

.card-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf9 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: #667eea;
}

.qrcode-container {
    text-align: center;
    margin: 25px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.qrcode-img {
    display: block;
    margin: 15px auto;
    max-width: 200px;
    height: auto;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.captcha-canvas {
    width: 130px;
    height: 45px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.captcha-canvas:hover {
    transform: scale(1.05);
    border-color: #667eea;
}

.refresh-btn {
    background: #f8f9fa;
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    color: #667eea;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    background: #667eea;
    color: white;
}

.button-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn i {
    font-size: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf9 100%);
    color: #2c3e50;
    border: 1px solid #d1d9e6;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #e4edf9 0%, #d1d9e6 100%);
    transform: translateY(-2px);
}

.btn-info {
    background: linear-gradient(135deg, #1E9FFF 0%, #00c6ff 100%);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 159, 255, 0.3);
}

.submit-hint {
    margin-top: 15px;
    color: #7f8c8d;
    font-size: 14px;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer {
    text-align: center;
    padding: 5px 0 0px;
    background-color: rgba(255, 255, 255, 0.8);
    margin-top: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.footer-container {
    margin: 0 auto;
    width: 90%;
}

.footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    text-decoration: underline;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 8px;
    display: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.error-message.show {
    display: flex;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 25px;
}

.form-text {
    color: #7f8c8d;
    font-size: 14px;
    text-align: center;
    margin-top: 10px;
}

.notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification.show {
    opacity: 1;
}

.notification.success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.notification.error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

@media (max-width: 768px) {
    .container {
        margin: 10px auto;
        padding: 20px;
        border-radius: 10px;
    }
    
    .title {
        font-size: 1.8em;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }
    
    .card-section {
        padding: 15px;
        margin-bottom: 20px;
        border-radius: 10px;
    }
    
    .section-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .form-control {
        padding: 12px 14px;
        font-size: 15px;
    }
    
    .row {
        display: block;
        margin: 0;
    }
    
    .col {
        display: block;
        padding: 0;
        width: 100%;
        margin-bottom: 15px;
    }
    
    .col:last-child {
        margin-bottom: 0;
    }
    
    .captcha-container {
        gap: 10px;
    }
    
    .captcha-canvas {
        width: 110px;
        height: 40px;
    }
    
    .button-group {
        margin-top: 20px;
        gap: 12px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 15px;
        max-width: 100%;
    }
    
    .submit-hint {
        font-size: 13px;
        margin-top: 10px;
    }
    
    .qrcode-container {
        margin: 20px 0;
        padding: 15px;
    }
    
    .qrcode-img {
        max-width: 150px;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 5px auto;
        padding: 15px;
        border-radius: 8px;
    }
    
    .title {
        font-size: 1.6em;
        margin-bottom: 15px;
    }
    
    .card-section {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .section-title {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .section-title i {
        margin-right: 8px;
        font-size: 14px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .captcha-container {
        gap: 8px;
    }
    
    .captcha-canvas {
        width: 100px;
        height: 35px;
    }
    
    .refresh-btn {
        padding: 8px;
    }
    
    .button-group {
        margin-top: 15px;
        gap: 10px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .btn i {
        font-size: 16px;
    }
    
    .submit-hint {
        font-size: 12px;
        gap: 5px;
    }
    
    .submit-hint i {
        font-size: 14px;
    }
    
    .qrcode-container {
        margin: 15px 0;
        padding: 12px;
    }
    
    .qrcode-img {
        max-width: 120px;
        padding: 6px;
    }
    
    .form-text {
        font-size: 12px;
        margin-top: 8px;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-title {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .footer {
        margin-top: 20px;
        padding: 8px 0 3px;
        border-radius: 10px;
    }
    
    .footer-container {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 12px;
    }
    
    .title {
        font-size: 1.5em;
    }
    
    .form-control {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .captcha-canvas {
        width: 90px;
        height: 32px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

.announcement-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.announcement-modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh; 
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.announcement-modal-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    text-align: center;
    font-size: 18px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.announcement-modal-header h3 {
    margin: 0;
    font-weight: 600;
}

.announcement-modal-body {
    padding: 25px 20px;
    flex: 1;
    overflow-y: auto;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    max-height: calc(90vh - 160px);
}

.announcement-modal-body::-webkit-scrollbar {
    width: 6px;
}

.announcement-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.announcement-modal-body::-webkit-scrollbar-thumb {
    background: #4facfe;
    border-radius: 3px;
}

.announcement-modal-footer {
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    flex-shrink: 0; /* 防止被压缩 */
}

.announcement-modal-footer button {
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.announcement-modal-footer button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.announcement-modal-footer button:active {
    transform: translateY(0);
}

.kefu-button {
    position: fixed;
    bottom: 80px;
    right: 30px;
    width: 80px;
    height: 80px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    border: none;
    padding: 5px;
}

.kefu-button:hover {
    transform: scale(1.1);
}