/* =============================================
   WebStack-Hugo 主题自定义样式
   Custom Style for WebStack-Hugo Theme
   ============================================= */

/* 页脚样式设置 */
.app-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.footer-content {
    width: 100%;
    text-align: center;
}

/* 页脚链接颜色设置 - 蓝色主题 */
.footer-content a {
    color: #007bff !important; /* 主蓝色 */
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer-content a:hover {
    color: #0056b3 !important; /* 深蓝色 */
    text-decoration: underline;
    transform: translateY(-1px);
}

/* 确保普通文本颜色在白色背景上可见 */
.footer-content {
    color: #495057 !important; /* 深灰色文字，确保在白色背景上可见 */
    line-height: 1.6;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

/* 日间模式样式 */
.app-footer {
    --footer-bg: #f8f9fa;
    --footer-text: #495057;
    --border-color: #dee2e6;
}

/* 夜间模式样式 */
.io-grey-mode .app-footer {
    --footer-bg: #1a1a1a;
    --footer-text: #adb5bd;
    --border-color: #343a40;
}

.io-grey-mode .footer-content a {
    color: #4dabf7 !important; /* 夜间模式下的蓝色 */
}

.io-grey-mode .footer-content a:hover {
    color: #74c0fc !important; /* 夜间模式下悬停的蓝色 */
    text-shadow: 0 0 8px rgba(77, 171, 247, 0.3);
}

/* 深色模式样式 */
.io-black-mode .app-footer {
    --footer-bg: #2d3748;
    --footer-text: #cbd5e0;
    --border-color: #4a5568;
}

.io-black-mode .footer-content a {
    color: #63b3ed !important; /* 深色模式下的蓝色 */
}

.io-black-mode .footer-content a:hover {
    color: #90cdf4 !important; /* 深色模式下悬停的蓝色 */
    text-shadow: 0 0 8px rgba(99, 179, 237, 0.3);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .footer-content {
        font-size: 0.8rem;
        padding: 0 10px;
    }
    
    .footer-content a {
        margin: 0 3px;
    }
}

/* 全局样式增强 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 导航栏增强 */
.navbar-brand {
    font-weight: 600;
}

.navbar-dark .navbar-nav .nav-link {
    transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #4dabf7 !important;
}

/* 主内容区域优化 */
.main-content {
    min-height: calc(100vh - 200px);
}

.big-header-banner {
    padding: 2rem 0;
}

/* 头像样式优化 */
.rounded-circle {
    border: 3px solid #e9ecef;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rounded-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* 按钮样式增强 */
.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.4);
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(108, 117, 125, 0.3);
}

/* 标题样式优化 */
.display-4 {
    font-weight: 300;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
    color: #6c757d;
}

/* 网格背景优化 */
.grid-bg {
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="none" stroke="%23e9ecef" stroke-width="0.5" x="0" y="0" width="100" height="100"/></svg>');
    background-size: 50px 50px;
}

.io-grey-mode .grid-bg,
.io-black-mode .grid-bg {
    background-image: 
        linear-gradient(rgba(26, 26, 26, 0.9), rgba(26, 26, 26, 0.9)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="none" stroke="%23343a40" stroke-width="0.5" x="0" y="0" width="100" height="100"/></svg>');
}

/* 加载动画优化 */
#loading {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 卡片和内容区块样式 */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

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

/* 滚动条样式（Webkit浏览器） */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

.io-grey-mode ::-webkit-scrollbar-track,
.io-black-mode ::-webkit-scrollbar-track {
    background: #2d3748;
}

.io-grey-mode ::-webkit-scrollbar-thumb,
.io-black-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4dabf7 0%, #339af0 100%);
}

/* 选择文本样式 */
::selection {
    background-color: #007bff;
    color: white;
}

::-moz-selection {
    background-color: #007bff;
    color: white;
}

/* 打印样式优化 */
@media print {
    .app-footer {
        display: none;
    }
    
    .btn {
        display: none;
    }
}

/* 无障碍访问优化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .footer-content a {
        text-decoration: underline;
    }
    
    .btn {
        border-width: 2px;
    }
}
/* 导航栏响应式修复 */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #343a40;
        padding: 15px;
        margin-top: 10px;
        border-radius: 4px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav .nav-item {
        margin: 5px 0;
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        padding: 10px 15px;
        border-radius: 4px;
        transition: all 0.3s ease;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    /* 确保折叠菜单显示在顶部 */
    .navbar-collapse.collapse:not(.show) {
        display: none;
    }
    
    .navbar-collapse.collapse.show {
        display: block;
    }
}

/* 确保导航栏切换按钮可见且可点击 */
.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 8px;
}

.navbar-toggler:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}