/* 无聊网3.0设计样式 - 突出现代年轻的无聊、空虚、孤独、一个人、懒文化 */

/* 基础重置 */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    background: #f8f9fa; /* 浅灰背景，营造空泛感 */
    color: #333; /* 深灰色文字，阅读友好 */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 主题色彩系统 */
:root {
    --primary-color: #2c3e50; /* 深灰蓝 - 沉稳压抑 */
    --secondary-color: #95a5a6; /* 石板灰 - 中性无聊 */
    --accent-color: #e74c3c; /* 红色 - 情绪爆发点 */
    --background-color: #f8f9fa; /* 浅灰背景 - 空泛感 */
    --text-color: #333333; /* 深灰色文字 */
    --text-secondary: #666666; /* 次要文字颜色 */
    --border-color: #e0e0e0; /* 边框颜色 */
    --shadow-color: rgba(0, 0, 0, 0.05); /* 阴影颜色 */
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --error-color: #f44336;
}

/* 深色模式 */
body.dark-mode {
    --primary-color: #1a252f;
    --secondary-color: #546e7a;
    --accent-color: #e53935;
    --background-color: #121212;
    --text-color: #ffffff;
    --text-secondary: #b0bec5;
    --border-color: #424242;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

/* 布局基础 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 主容器 */
.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--background-color);
}

/* 导航栏 */
.nav-bar {
    background: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo:hover {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.nav-link:hover {
    color: var(--secondary-color);
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.btn-accent {
    background: var(--accent-color);
    color: white;
}

.btn-accent:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--shadow-color);
}

.dark-mode .card {
    background: #1e1e1e;
    border-color: var(--border-color);
}

/* 文字样式 */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

p {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    line-height: 1.6;
}

/* 输入框样式 */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.dark-mode input[type="text"],
.dark-mode input[type="email"],
.dark-mode input[type="password"],
.dark-mode textarea,
.dark-mode select {
    background: #2d2d2d;
    color: white;
    border-color: var(--border-color);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

/* 图片样式 */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

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

.tag-secondary {
    background: var(--secondary-color);
    color: white;
}

.tag-accent {
    background: var(--accent-color);
    color: white;
}

/* 情绪标签 */
.emotion-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--secondary-color);
    color: white;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.emotion-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.emotion-tag.active {
    background: var(--primary-color);
    border-color: var(--accent-color);
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 2s linear infinite;
    margin: 2rem auto;
    opacity: 0.6;
}

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

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

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

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

.slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

/* 按钮悬停效果 */
.btn-hover {
    position: relative;
    overflow: hidden;
}

.btn-hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    transition: height 0.3s ease;
}

.btn-hover:hover::after {
    height: 100%;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 3px;
}

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

/* 选择文本样式 */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* 透明度 */
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* 显示和隐藏 */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

/* 媒体查询 */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .card {
        padding: 1rem;
    }
    
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }
}

/* 过渡动画 */
.transition {
    transition: all 0.3s ease;
}

/* 延迟动画 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
