/* css/style.css - DreamDecoder Theme (Final Version) */

:root {
    --bg-dark: #0f0c29;
    --bg-gradient: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    --card-bg: rgba(255, 255, 255, 0.05);

    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #a855f7;

    --accent-glow: #d8b4fe;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
}

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

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}


header {
    border-bottom: 1px solid var(--card-border);
    background: rgba(15, 12, 41, 0.8);
    backdrop-filter: blur(10px);
}

.brand-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: white;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.brand-accent {
    color: var(--accent);
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

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

.nav-link.active {
    color: var(--accent);
    border-bottom: 1px solid var(--accent);
}


.hero-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    background: linear-gradient(to right, #fff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}


.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}


.mystic-border {
    border: 1px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.1) inset;

    position: relative;
}


.mystic-border::before {
    content: "✦";
    position: absolute;
    top: 10px;
    left: 10px;
    color: var(--accent);
    opacity: 0.6;
    font-size: 1.2rem;
}

.mystic-border::after {
    content: "✦";
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: var(--accent);
    opacity: 0.6;
    font-size: 1.2rem;
}


textarea {
    width: 100%;
    height: 12rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    color: white;
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    outline: none;
    resize: none;
    transition: all 0.3s;
}

textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}


.btn-mystic {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 0.5rem;
    border: none;
    background: linear-gradient(45deg, #6b21a8, #a855f7);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
}

.btn-mystic:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.6);
}

.btn-mystic:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


.output-area {
    font-family: var(--font-serif);
    line-height: 1.8;
    font-size: 1.1rem;
    color: #e2e8f0;
    white-space: pre-wrap;
    min-height: 100%;
}


.glow-orb {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--accent);
    filter: blur(150px);
    opacity: 0.2;
    z-index: -1;
    border-radius: 50%;
}


.max-w-5xl {
    max-width: 64rem;
    margin: 0 auto;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

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

.mb-12 {
    margin-bottom: 3rem;
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.gap-6 {
    gap: 1.5rem;
}

.w-full {
    width: 100%;
}

.grid {
    display: grid;
}

.hidden {
    display: none;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: 1fr 1fr;
    }

    .md\:gap-12 {
        gap: 3rem;
    }

    .md\:block {
        display: block;
    }
}




@media (min-width: 768px) {


    .grid {
        align-items: start;
    }


    .glass-card:first-child {
        position: sticky;
        top: 2rem;

    }


    .output-area {
        min-height: 400px;
    }
}


.output-area strong {
    font-weight: 700;
    font-size: 1.1em;
}


#loader {
    margin-left: 12px;

    width: 1.2rem;
    height: 1.2rem;
    min-width: 1.2rem;

}


.btn-mystic {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0px;

}

/* ================== 分类筛选 (Category Tabs) ================== */
.cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.cat-tab {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
}

.cat-tab:hover {
    border-color: var(--accent);
    color: var(--text-main);
}

.cat-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}


/* ================== 搜索框 (Search Form) ================== */
.search-form {
    display: flex;
    gap: 8px;
    margin: 20px 0;
    max-width: 500px;
}

.search-input {
    flex: 1;
    padding: 10px 16px;
    border-radius: 25px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: #fff;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--accent);
}

.search-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.search-btn:hover {
    background: #9333ea;
}

.search-clear {
    display: inline-flex;
    align-items: center;
    padding: 10px 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}

.search-clear:hover {
    color: #f87171;
}


/* ================== 结果信息 (Result Info) ================== */
.result-info {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 10px 0 20px;
}


/* ================== 分页 (Pagination) ================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 40px 0 20px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 18px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
}

.page-link:hover {
    border-color: var(--accent);
    color: var(--text-main);
}

.page-current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: bold;
}

.page-ellipsis {
    color: #555;
    padding: 0 4px;
}

.page-prev,
.page-next {
    font-weight: bold;
}


/* ================== 面包屑 (Breadcrumb) ================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--accent-glow);
    text-decoration: underline;
}

.breadcrumb-sep {
    color: #555;
}

.breadcrumb-current {
    color: var(--text-main);
}


/* ================== 空状态 (Empty State) ================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--text-main);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 20px;
}


/* ================== 辞典链接增强 ================== */
.dream-link-content {
    flex: 1;
    min-width: 0;
}

.dream-summary {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ================== 移动端适配 ================== */
@media (max-width: 768px) {
    .cat-tabs {
        gap: 6px;
    }

    .cat-tab {
        padding: 6px 12px;
        font-size: 0.78rem;
    }

    .breadcrumb {
        font-size: 0.78rem;
    }

    .search-form {
        max-width: 100%;
    }
}



/* Symbol Cards Styling */
.symbol-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
    backdrop-filter: blur(5px);
}

.symbol-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    /* 使用您现有的强调色 */
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Elegant CTA Banner Styling */
.glass-banner {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.funnel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--accent);
    border-radius: 50px;
    color: white;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.05em;
}

.funnel-btn:hover {
    background: var(--accent);
    color: #000;
    /* 或者任何深色背景 */
    box-shadow: 0 0 15px var(--accent-glow);
}



/* ======================================= */
/*  FIX: Restore Card UI for <a> Tags      */
/* ======================================= */

/* 1. 强制卡片链接去除下划线，并继承父元素的颜色 */
a.symbol-card,
a.symbol-card:hover {
    color: inherit;
    text-decoration: none;
}

/* 2. 确保卡片内的标题 (h3) 始终是白色 */
a.symbol-card h3 {
    /* 如果你的标题不是纯白，可以在这里改成你想要的颜色 */
    color: #ffffff;
}

/* 3. 确保描述文字 (p) 是你想要的灰色 */
a.symbol-card p {
    color: #94a3b8;
    /* 这是 Tailwind 的 gray-400，你可以调整 */
}

/* 4. （可选）让鼠标悬浮时，描述文字变得更亮一点 */
a.symbol-card:hover p {
    color: #cbd5e1;
    /* 这是 Tailwind 的 gray-300 */
}