/* 自定义 Tailwind 配置和绿色主题 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 颜色变量 */
:root {
    --primary: #3CB371;
    --primary-dark: #2E8B57;
    --light: #E8F5E9;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
}

/* Tailwind 自定义类 */
.text-primary {
    color: var(--primary);
}

.text-primary-dark {
    color: var(--primary-dark);
}

.bg-primary {
    background-color: var(--primary);
}

.bg-primary-dark {
    background-color: var(--primary-dark);
}

.bg-light {
    background-color: var(--light);
}

.hover\:bg-light:hover {
    background-color: var(--light);
}

.hover\:text-primary:hover {
    color: var(--primary);
}

.hover\:text-primary-dark:hover {
    color: var(--primary-dark);
}

/* 软件Logo样式 */
.software-logo-wrapper {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: transform 0.3s ease;
}

.software-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: transparent;
}

/* 侧边栏Logo特殊样式 - 去除黑边 */
#sidebar .mb-6 img {
    object-fit: contain;
    background: transparent;
    border-radius: 8px;
}

.software-logo-fallback {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(60, 179, 113, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.software-card-link:hover .software-logo-wrapper {
    transform: translateY(-4px);
}

.software-card-link:hover .software-logo-fallback {
    box-shadow: 0 8px 20px rgba(60, 179, 113, 0.3);
}

/* 按钮样式 */
.btn-primary {
    display: inline-block;
    width: 100%;
    padding: 10px 20px;
    background-color: var(--primary);
    color: white;
    text-align: center;
    border-radius: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(60, 179, 113, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(60, 179, 113, 0.4);
    transform: translateY(-2px);
}

/* 导航链接激活状态 */
.nav-link.active {
    background-color: var(--light);
    color: var(--primary);
    font-weight: 600;
}

/* 软件卡片链接 */
.software-card-link {
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    position: relative;
}

.software-card-link:hover {
    transform: translateY(-4px);
}

.software-card-link h3 {
    transition: color 0.3s ease;
}

.software-card-link:hover h3 {
    color: var(--primary);
}

.software-card-link p {
    line-height: 1.5;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* 响应式调整 */
@media (max-width: 768px) {
    #sidebar {
        width: 280px;
    }
    
    .software-logo-wrapper {
        width: 56px;
        height: 56px;
    }
    
    .software-logo {
        width: 48px;
        height: 48px;
    }
    
    .software-logo-fallback {
        width: 56px;
        height: 56px;
        font-size: 20px;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 部分间距调整 */
.section {
    scroll-margin-top: 80px;
}

@media (min-width: 768px) {
    .section {
        scroll-margin-top: 32px;
    }
}

/* 卡片阴影增强 */
.shadow-sm {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

/* 侧边栏移动端显示 */
#sidebar.show {
    transform: translateX(0) !important;
}

#sidebar-overlay.show {
    display: block !important;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.software-card-link {
    animation: fadeIn 0.5s ease-out;
}

/* 链接按钮悬停效果 */
button {
    cursor: pointer;
    outline: none;
    border: none;
    background: transparent;
}

button:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* 可访问性增强 */
a:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* 确保内容不被侧边栏遮挡 */
@media (min-width: 768px) {
    main {
        min-height: 100vh;
    }
}

