/* 通用布局样式 - 用于统一头部和尾部 */

/* 顶部工具栏样式 */
.top-toolbar {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%) !important;
    color: white !important;
    padding: 10px 0 !important;
    font-size: 14px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    width: 100%;
}

.top-toolbar .container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.top-toolbar a {
    color: white !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.top-toolbar a:hover {
    text-decoration: underline !important;
    opacity: 0.9 !important;
}

/* 登录注册按钮样式 */
#loginButton, #signupButton {
    padding: 5px 15px !important;
    border-radius: 15px !important;
    background: rgba(255,255,255,0.2) !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    margin-left: 10px;
}

#loginButton:hover, #signupButton:hover {
    background: rgba(255,255,255,0.3) !important;
    text-decoration: none !important;
    transform: translateY(-2px) !important;
}

/* VIP徽章样式 */
.vip-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
    color: #333 !important;
    padding: 3px 10px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    margin-left: 8px !important;
    font-weight: bold !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

/* 页脚样式 */
.common-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    color: white !important;
    padding: 60px 0 30px !important;
    margin-top: 60px !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1) !important;
}

.common-footer h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: white !important;
    position: relative;
    padding-bottom: 10px;
}

.common-footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    border-radius: 2px;
}

.common-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.common-footer li {
    margin-bottom: 12px;
}

.common-footer a {
    color: rgba(255,255,255,0.75) !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.common-footer a:hover {
    color: #FFD700 !important;
    transform: translateX(5px);
}

.common-footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.common-footer .footer-desc {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255,255,255,0.75);
    margin-bottom: 15px;
}

.common-footer .social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.common-footer .social-link {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: white;
    font-size: 20px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.1);
}

.common-footer .social-link:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.common-footer .contact-item {
    color: rgba(255,255,255,0.75);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.common-footer .copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    margin-top: 20px;
    text-align: center;
}

.common-footer .copyright p {
    margin: 0;
}

.common-footer .copyright-text {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 10px;
    font-weight: 500;
}

.common-footer .icp-link {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: all 0.3s;
}

.common-footer .icp-link:hover {
    color: #FFD700 !important;
}

/* 模态框样式 */
.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

.modal-content {
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    border: none;
    padding: 20px 30px;
}

.modal-header .modal-title {
    font-weight: 600;
    font-size: 18px;
}

.modal-header .close {
    color: white;
    opacity: 1;
    text-shadow: none;
}

.modal-body {
    padding: 30px;
}

/* 模态框动画 */
.modal.fade .modal-dialog {
    transform: translate(0, -50px);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: translate(0, 0);
}

/* 加载动画 */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.25em;
}

/* 自定义确认对话框样式 */
.custom-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-confirm-overlay.show {
    opacity: 1;
}

.custom-confirm-box {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.custom-confirm-overlay.show .custom-confirm-box {
    transform: scale(1);
}

.custom-confirm-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 20px;
}

.custom-confirm-title {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
    color: #2c3e50;
}

.custom-confirm-message {
    font-size: 14px;
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 25px;
    line-height: 1.6;
}

.custom-confirm-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.custom-confirm-btn {
    padding: 10px 30px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-confirm-btn-primary {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-confirm-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.4);
}

.custom-confirm-btn-secondary {
    background: #e0e0e0;
    color: #666;
}

.custom-confirm-btn-secondary:hover {
    background: #d0d0d0;
}

/* 桌面端和移动端显示控制 */
.desktop-only {
    display: flex !important;
}

.mobile-only {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 显示/隐藏控制 */
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: flex !important;
    }
    
    /* 顶部工具栏移动端优化 */
    .top-toolbar {
        padding: 8px 0 !important;
        font-size: 12px !important;
    }
    
    .top-toolbar .container {
        padding: 0 12px !important;
        flex-direction: row !important;
        gap: 0 !important;
    }
    
    .toolbar-left {
        flex: 0 0 auto;
    }
    
    .toolbar-right {
        flex: 0 0 auto;
        margin-left: auto;
    }
    
    /* 登录注册按钮移动端优化 */
    #loginButton, #signupButton {
        padding: 4px 10px !important;
        font-size: 12px !important;
        margin-left: 6px !important;
        border-radius: 12px !important;
    }
    
    /* 用户信息移动端优化 */
    .user-link {
        margin-right: 8px !important;
        font-size: 12px !important;
    }
    
    .username-text {
        max-width: 60px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
        vertical-align: middle;
    }
    
    .credit-info {
        margin: 0 8px !important;
        font-size: 12px !important;
    }
    
    .logout-btn {
        margin-left: 6px !important;
        font-size: 12px !important;
    }
    
    .vip-badge {
        padding: 2px 6px !important;
        font-size: 10px !important;
        margin-right: 6px !important;
    }
    
    /* Footer移动端优化 */
    .common-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* 确认框移动端优化 */
    .custom-confirm-box {
        padding: 20px;
        max-width: 320px;
    }
    
    .custom-confirm-buttons {
        flex-direction: column;
    }
    
    .custom-confirm-btn {
        width: 100%;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .top-toolbar {
        padding: 6px 0 !important;
        font-size: 11px !important;
    }
    
    .top-toolbar .container {
        padding: 0 10px !important;
    }
    
    #loginButton, #signupButton {
        padding: 3px 8px !important;
        font-size: 11px !important;
        margin-left: 4px !important;
    }
    
    .user-link {
        margin-right: 6px !important;
        font-size: 11px !important;
    }
    
    .username-text {
        max-width: 50px;
    }
    
    .credit-info {
        margin: 0 6px !important;
        font-size: 11px !important;
    }
    
    .logout-btn {
        margin-left: 4px !important;
        font-size: 11px !important;
    }
}

/* Footer enhancements - 从index.css迁移过来确保所有页面都能正确显示 */
.footer-icon { 
    font-size: 16px; 
}

.qr-label { 
    font-size: 14px; 
    color: #999; 
    margin: 0 0 12px 0; 
    font-weight: 500; 
}

.qr-code { 
    width: 130px; 
    height: 130px; 
    border-radius: 10px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); 
    background: white; 
    padding: 5px; 
    display: block; 
}

.qr-caption { 
    font-size: 12px; 
    color: #888; 
    margin: 8px 0 0 0; 
}

.icp-text { 
    margin-top: 5px; 
}

/* 统一模态框样式 - 适用于所有页面 */
.modal-narrow { 
    max-width: 400px; 
}

.modal-rounded { 
    border-radius: 16px; 
    border: none; 
}

.modal-header-gradient { 
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%); 
    color: white; 
    border-radius: 16px 16px 0 0; 
    padding: 20px 24px; 
    border-bottom: none; 
}

.modal-title-flex { 
    font-weight: 600; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.modal-close-white { 
    color: white; 
    opacity: 1; 
    text-shadow: none; 
}

.modal-body-center { 
    padding: 30px 24px; 
    text-align: center; 
}

.modal-footer-center { 
    border-top: 1px solid #e8eaed; 
    padding: 14px 24px; 
    justify-content: center; 
}

.btn-gradient { 
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%); 
    border: none; 
    color: white;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #b71c1c 0%, #a00000 100%);
    color: white;
}

/* 模态框表情符号样式 */
.modal-emoji-24 {
    font-size: 24px;
    line-height: 1;
}

.modal-emoji-48 {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 16px;
}

.modal-emoji-64 {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 16px;
}

.modal-text {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.modal-subtext {
    font-size: 14px;
    color: #666;
    margin-bottom: 0;
}

/* ========== 通用页面容器样式 ========== */
/* 用于统一 dianzishu、dianlutu、dl 等页面的布局 */
/* 注意：不使用 .container 避免与其他CSS冲突 */

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    background: white;
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border-left: 5px solid var(--primary);
}

.page-header h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 32px;
    font-weight: 600;
    color: var(--dark);
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .page-container {
        padding: 15px;
    }
    
    /* 两栏布局在移动端变为单栏 */
    div[style*="grid-template-columns: 68% 30%"] {
        display: block !important;
    }
    
    .sidebar {
        margin-top: 25px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
}

