/* ====================================
   周公解梦工具 - 专用样式
   ==================================== */

/* ========== 基础布局 ========== */
.section-title {
    font-size: 1.8em;
    color: #2c3e50;
    margin: 30px 0 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-subtitle {
    color: #666;
    font-size: 1em;
    margin: -10px 0 20px 0;
}

/* ========== 今日解梦展示区 ========== */
.today-dream-section {
    margin-bottom: 40px;
}

.today-dream-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.today-dream-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.4);
}

.today-dream-card::before {
    content: '🌙';
    position: absolute;
    top: -30px;
    right: -30px;
    font-size: 150px;
    opacity: 0.1;
    transform: rotate(15deg);
}

.today-dream-card::after {
    content: '⭐';
    position: absolute;
    bottom: -20px;
    left: -20px;
    font-size: 100px;
    opacity: 0.08;
}

.dream-icon {
    font-size: 4em;
    margin-bottom: 20px;
    display: block;
    position: relative;
    z-index: 1;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.dream-keyword {
    font-size: 2.2em;
    color: white;
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.dream-summary {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
    margin-bottom: 20px;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.dream-jixiong {
    display: inline-block;
    padding: 10px 25px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.dream-jixiong.ji {
    background: rgba(67, 233, 123, 0.3);
    border-color: rgba(67, 233, 123, 0.5);
}

.dream-jixiong.xiong {
    background: rgba(255, 107, 107, 0.3);
    border-color: rgba(255, 107, 107, 0.5);
}

.dream-jixiong.zhong {
    background: rgba(255, 193, 7, 0.3);
    border-color: rgba(255, 193, 7, 0.5);
}

.dream-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.btn-action {
    padding: 14px 35px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-action:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-action:active {
    transform: translateY(0);
}

/* ========== 搜索区域 ========== */
.search-section {
    margin-bottom: 40px;
}

.search-box {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 15px 25px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-size: 1em;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    padding: 10px 25px;
    background: #f5f5f5;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

/* ========== 搜索结果 ========== */
.search-results {
    margin-top: 20px;
}

.search-result-item {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-result-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    transform: translateX(5px);
}

.search-result-icon {
    font-size: 2.5em;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
}

.search-result-keyword {
    font-size: 1.3em;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
}

.search-result-keyword .highlight {
    background: #fff3cd;
    color: #856404;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.search-result-summary {
    color: #666;
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 8px;
}

.search-result-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.search-result-category {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f0f0;
    color: #666;
    border-radius: 12px;
    font-size: 0.85em;
}

.search-result-jixiong {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.search-result-jixiong.ji {
    background: #d4edda;
    color: #155724;
}

.search-result-jixiong.xiong {
    background: #f8d7da;
    color: #721c24;
}

.search-result-jixiong.zhong {
    background: #fff3cd;
    color: #856404;
}

.search-no-results {
    text-align: center;
    padding: 50px;
    color: #999;
    font-size: 1.1em;
}

/* ========== 热门解梦网格 ========== */
.hot-dreams-section {
    margin-bottom: 40px;
}

.hot-dreams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.hot-dream-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.hot-dream-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.hot-dream-card:hover::before {
    transform: scaleX(1);
}

.hot-dream-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
    transform: translateY(-5px);
}

.hot-dream-icon {
    font-size: 3.5em;
    margin-bottom: 15px;
    display: block;
}

.hot-dream-keyword {
    font-size: 1.2em;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 10px;
}

.hot-dream-jixiong {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 8px;
}

.hot-dream-jixiong.ji {
    background: #d4edda;
    color: #155724;
}

.hot-dream-jixiong.xiong {
    background: #f8d7da;
    color: #721c24;
}

.hot-dream-jixiong.zhong {
    background: #fff3cd;
    color: #856404;
}

.hot-dream-summary {
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
}

/* ========== 分类网格 ========== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.category-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 16px;
    padding: 30px 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-5px);
}

.category-icon {
    font-size: 3.5em;
    margin-bottom: 15px;
    display: block;
}

.category-name {
    font-size: 1.15em;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 8px;
}

.category-description {
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
}

.category-count {
    font-size: 0.9em;
    color: #999;
}

/* ========== 解梦列表 ========== */
.category-dreams-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.dreams-list {
    display: grid;
    gap: 15px;
}

.dream-item {
    background: white;
    border-left: 4px solid #667eea;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
}

.dream-item:hover {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    transform: translateX(5px);
}

.dream-item-icon {
    font-size: 2.5em;
    flex-shrink: 0;
}

.dream-item-content {
    flex: 1;
}

.dream-item-keyword {
    font-size: 1.2em;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
}

.dream-item-summary {
    color: #666;
    font-size: 0.95em;
    line-height: 1.6;
}

.dream-item-jixiong {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    flex-shrink: 0;
}

.dream-item-jixiong.ji {
    background: #d4edda;
    color: #155724;
}

.dream-item-jixiong.xiong {
    background: #f8d7da;
    color: #721c24;
}

.dream-item-jixiong.zhong {
    background: #fff3cd;
    color: #856404;
}

/* ========== 加载动画 ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-up {
    animation: slideInUp 0.6s ease;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 1.5em;
    }

    .section-title {
        font-size: 1.4em;
    }

    .today-dream-card {
        padding: 40px 25px;
    }

    .dream-icon {
        font-size: 3em;
    }

    .dream-keyword {
        font-size: 1.8em;
    }

    .dream-summary {
        font-size: 1em;
        padding: 0 10px;
    }

    .dream-actions {
        flex-wrap: wrap;
        gap: 10px;
    }

    .btn-action {
        padding: 12px 25px;
        font-size: 0.95em;
    }

    .search-box {
        flex-direction: column;
        gap: 10px;
    }

    .btn-primary {
        width: 100%;
    }

    .hot-dreams-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .category-card {
        padding: 25px 20px;
    }

    .category-icon {
        font-size: 3em;
    }

    .category-name {
        font-size: 1em;
    }

    .category-description {
        font-size: 0.85em;
    }

    .dream-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .dream-item-icon {
        font-size: 2em;
    }

    .dream-item-keyword {
        font-size: 1.1em;
    }

    .dream-item-summary {
        font-size: 0.9em;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .search-result-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    .search-result-icon {
        font-size: 2em;
    }

    .search-result-keyword {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .tool-header h1 {
        font-size: 1.3em;
    }

    .today-dream-card {
        padding: 30px 20px;
    }

    .dream-icon {
        font-size: 2.5em;
    }

    .dream-keyword {
        font-size: 1.5em;
    }

    .dream-summary {
        font-size: 0.95em;
    }

    .hot-dreams-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .category-card {
        padding: 20px 15px;
    }

    .category-icon {
        font-size: 2.5em;
    }
}

/* ========== 消息提示 ========== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    animation: slideInRight 0.3s ease;
}

.toast.success {
    background: #4caf50;
}

.toast.error {
    background: #f44336;
}

.toast.info {
    background: #2196f3;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.hide {
    animation: slideOutRight 0.3s ease forwards;
}
