/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    gap: 6px;
}

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

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #546e7a;
    border: 1px solid rgba(102, 126, 234, 0.2);
    font-weight: 500;
}

.btn-secondary:hover {
    background: rgba(102, 126, 234, 0.08);
    color: #667eea;
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-1px);
}

.btn-warning {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: white;
    border: none;
    font-weight: 500;
}

.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.25);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    font-weight: 500;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.25);
}

.btn-sm {
    padding: 6px 14px !important;
    font-size: 12px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    border-radius: 18px;
    font-weight: 500;
    transition: all 0.25s ease;
}

.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group label i {
    margin-right: 8px;
    color: #667eea;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 文本区域样式 */
textarea {
    height: 550px;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    font-family: 'Courier New', monospace;
    overflow-y: auto;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* 卡片样式 */
.card-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

/* 根据卡片状态设置不同的样式 */
.card-item.active {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.1);
}

.card-item.expired {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #dc3545;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.1);
    opacity: 0.8;
}

.card-item.inactive {
    background: linear-gradient(135deg, #e2e3e5 0%, #d6d8db 100%);
    border-color: #6c757d;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.1);
    opacity: 0.8;
}

.card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

/* 信息卡片样式 */
.info-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.info-card h4 {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-card h4 i {
    color: #667eea;
    font-size: 18px;
}

/* 消息提示样式 */
.message {
    margin: 10px 0;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: block;
    animation: slideIn 0.3s ease-out;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#messageContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

#messageContainer .message {
    margin-bottom: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

#messageContainer .message.error {
    background: rgba(220, 53, 69, 0.95);
    color: #ffffff;
    border-left: 4px solid #dc3545;
}

#messageContainer .message.success {
    background: rgba(40, 167, 69, 0.95);
    color: #ffffff;
    border-left: 4px solid #28a745;
}

#messageContainer .message.info {
    background: rgba(102, 126, 234, 0.95);
    color: #ffffff;
    border-left: 4px solid #667eea;
}

#messageContainer .message i {
    font-size: 16px;
    flex-shrink: 0;
}

#messageContainer .message .message-text {
    flex: 1;
    line-height: 1.4;
}

#messageContainer .message {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 1000px;
    margin: 2% auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
    animation: modalSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 35px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.modal-header h3 {
    font-size: 26px;
    color: #2c3e50;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #6c757d;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    padding: 35px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* 模态框滚动条样式 - 统一所有浏览器 */
.modal-body {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

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

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

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #c1c1c1 0%, #a8a8a8 100%);
    border-radius: 4px;
    border: 2px solid #f1f1f1;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #a8a8a8 0%, #959595 100%);
    transform: scale(1.1);
}

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

/* 用户中心模态框的特殊滚动条样式 */
.user-center-modal .modal-body {
    scrollbar-width: thin;
    scrollbar-color: #667eea #f8f9fa;
}

.user-center-modal .modal-body::-webkit-scrollbar {
    width: 8px;
}

.user-center-modal .modal-body::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.user-center-modal .modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    border: 2px solid #f8f9fa;
}

.user-center-modal .modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: scale(1.1);
}

/* 支付模态框的特殊滚动条样式 */
.payment-modal .modal-body {
    scrollbar-width: thin;
    scrollbar-color: #667eea #f8f9fa;
}

.payment-modal .modal-body::-webkit-scrollbar {
    width: 8px;
}

.payment-modal .modal-body::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.payment-modal .modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    border: 2px solid #f8f9fa;
}

.payment-modal .modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: scale(1.1);
}

.modal-footer {
    padding: 25px 35px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
    background: #f8f9fa;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close:hover,
.close:focus {
    color: #333;
    background: #f0f0f0;
}

/* 模式切换按钮 */
.mode-switch {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
}

.mode-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    background: transparent;
    color: #666;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mode-btn:hover:not(.active) {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

/* 表单容器 */
.form-container {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 错误消息样式 */
.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 加载动画 */
.fa-spin {
    animation: fa-spin 2s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}