:root {
    --sidebar-width: 260px;
    --primary-color: #000;
    --bg-color: #fff;
    --secondary-bg: #f9f9f9;
    --text-color: #333;
    --accent-yellow: #ffcc00;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    height: 100vh;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    padding: 24px;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    background-color: #fff;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    font-size: 10px;
    border: 1px solid #ccc;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: normal;
    color: #666;
}

.new-workflow-btn {
    width: 100%;
    padding: 12px;
    background-color: #fff;
    border: 1px solid #000;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.new-workflow-btn:hover {
    background-color: #f5f5f5;
}

.menu-item {
    padding: 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #666;
    font-weight: 500;
    transition: 0.2s;
}

.menu-item.active {
    background-color: #f5f5f5;
    color: #000;
    font-weight: 600;
}

.menu-item:hover {
    background-color: #fafafa;
    color: #000;
}

.menu-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

/* Bottom Menu */
.bottom-menu {
    margin-top: auto;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
    padding: 20px 0;
}

.hero-text h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.hero-text p {
    color: #666;
    font-size: 16px;
}

.hero-tag {
    background-color: var(--accent-yellow);
    padding: 20px;
    transform: rotate(15deg);
    font-weight: 900;
    font-size: 24px;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
}

/* Filters */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
}

.filter-btn:hover {
    border-color: #000;
}

.filter-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.tag-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-yellow);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    color: #000;
}

.search-bar {
    margin-left: auto;
    border: none;
    background-color: #f6f6f6;
    padding: 12px 24px;
    border-radius: 999px;
    width: 300px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ccc;
    font-size: 14px;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.card {
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s;
    cursor: pointer;
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
}

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

.card-image {
    width: 100%;
    aspect-ratio: 500 / 667;
    /* 保持 500x667 的比例 */
    position: relative;
    overflow: hidden;
}

/* Abstract Color Blocks for Placeholders */
.bg-1 {
    background: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 100%);
}

.bg-2 {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}

.bg-3 {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
}

.bg-4 {
    background: linear-gradient(135deg, #cfd9df 0%, #e2ebf0 100%);
}

.bg-5 {
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
}

.bg-6 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.block-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.block-1 {
    background-color: #4facfe;
    width: 60%;
    height: 60%;
    top: 10%;
    left: 10%;
    position: absolute;
}

.block-2 {
    background-color: #00f2fe;
    width: 40%;
    height: 40%;
    bottom: 10%;
    right: 10%;
    position: absolute;
}

.card-content {
    padding: 12px;
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
}

.card-title {
    color: #fff;
}

.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

.badge.hot {
    background: rgba(255, 69, 58, 0.9);
}

/* Login Button Top Right */
.login-btn-top {
    position: absolute;
    top: 24px;
    right: 40px;
    padding: 8px 24px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.2s;
}

.login-btn-top:hover {
    transform: scale(1.05);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-box {
    background-color: #fff;
    padding: 40px;
    border-radius: 24px;
    width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.input-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.input-group input {
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: #000;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background-color: #333;
}


/* User Info Top Right */
.user-info-top {
    position: absolute;
    top: 24px;
    right: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #fff;
    padding: 6px 6px 6px 16px;
    border-radius: 999px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    z-index: 100;
    border: 1px solid #eee;
    transition: transform 0.2s;
    flex-wrap: nowrap;
}

.user-info-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

.user-name {
    font-weight: 700;
    font-size: 14px;
    color: #333;
    margin-right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-balance {
    font-size: 13px;
    color: #856404;
    background: #fff3cd;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #ffeeba;
}

.task-status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    font-size: 13px;
    color: #fff;
    animation: pulse 2s ease-in-out infinite;
}

.task-status-indicator .task-icon {
    font-size: 14px;
    animation: spin 2s linear infinite;
}

.task-status-indicator .task-text {
    font-weight: 500;
    white-space: nowrap;
}

.task-status-indicator .task-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(102, 126, 234, 0);
    }
}

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

    100% {
        transform: rotate(360deg);
    }
}

.logout-btn {
    font-size: 12px;
    color: #666;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    background: #f5f5f5;
    padding: 6px 12px;
    border-radius: 20px;
    margin-left: 8px;
    font-weight: 600;
}

.logout-btn:hover {
    background-color: #000;
    color: #fff;
}

.footer {
    margin-top: auto;
    padding: 20px 0;
    border-top: 1px solid #eee;
    text-align: center;
    color: #999;
    font-size: 12px;
}

/* ==============================================================
   NEW DASHBOARD STYLES (MATCHING FIGMA)
============================================================== */

.dashboard-body {
    background-color: #fafcff;
    font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.dashboard-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    background-color: #fafcff;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Decorative background elements */
.dashboard-decor-1 {
    position: absolute;
    width: 700px;
    height: 340px;
    left: 217px;
    top: -149px;
    background: radial-gradient(circle, rgba(162, 198, 255, 0.4) 0%, rgba(250, 252, 255, 0) 70%);
    pointer-events: none;
    z-index: -1;
}

.dashboard-decor-2 {
    position: absolute;
    width: 340px;
    height: 340px;
    left: -81px;
    bottom: -81px;
    background: radial-gradient(circle, rgba(200, 162, 255, 0.4) 0%, rgba(250, 252, 255, 0) 70%);
    pointer-events: none;
    z-index: -1;
}

/* Sidebar */
.dashboard-sidebar {
    width: 240px;
    height: 100%;
    flex-shrink: 0;
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    padding: 29px 0;
    overflow-y: auto;
}

.sidebar-logo {
    margin-left: 24px;
    margin-bottom: 20px;
}

.sidebar-badge {
    margin: 0 24px 20px 24px;
    background: #f7f8fa;
    border: 1px solid #ddd;
    border-radius: 100px;
    padding: 4px 20px;
    display: inline-block;
    color: #999;
    font-size: 13px;
    text-align: center;
    align-self: flex-start;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 0 12px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.sidebar-item:hover {
    background: #f5f5f5;
    color: #333;
}

.sidebar-item.active {
    background: linear-gradient(122deg, #dde9ff 44%, #f9efff 94%);
    color: #266eff;
    font-weight: 600;
}

.sidebar-category {
    margin-top: 16px;
    margin-bottom: 4px;
    padding: 0 20px;
    color: #c5c5c5;
    font-size: 12px;
}

/* Header / Top Bar */
.dashboard-top-bar {
    position: absolute;
    top: 24px;
    left: 240px;
    right: 24px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 10;
}

.dashboard-notice {
    position: absolute;
    left: 56px;
    background: #e5edff;
    border: 1px solid #fff;
    border-radius: 100px;
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    color: #111;
    font-size: 16px;
    width: 556px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.dashboard-user-area {
    display: flex;
    gap: 12px;
    align-items: center;
}

.header-points {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 20px;
    background: rgba(242, 178, 0, 0.15);
    border-radius: 1000px;
    font-weight: 600;
    font-size: 16px;
    color: #000;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 6px 16px;
    background: linear-gradient(114deg, #e7efff 44%, #f6e6ff 94%);
    border-radius: 1000px;
    font-weight: 600;
    font-size: 16px;
    color: #000;
    cursor: pointer;
}

.header-login-btn-new {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 6px 20px;
    background: linear-gradient(114deg, #e7efff 44%, #f6e6ff 94%);
    border-radius: 1000px;
    font-weight: 600;
    font-size: 16px;
    color: #000;
    cursor: pointer;
    border: none;
    transition: transform 0.2s;
}

.header-login-btn-new:hover {
    transform: scale(1.03);
}

/* Main Content Container */
.dashboard-main-container {
    flex-grow: 1;
    margin-top: 92px;
    margin-right: 24px;
    margin-bottom: 29px;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid #fff;
    border-radius: 28px;
    box-shadow: 0 4px 60px rgba(0, 0, 0, 0.03);
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.main-inner {
    flex: 1;
    overflow-y: auto;
    padding-top: 24px;
    position: relative;
}

/* Page Titles */
.page-title {
    text-align: center;
    font-size: 40px;
    margin-bottom: 8px;
    font-weight: bold;
    color: #000;
}

.page-title .highlight {
    color: #338cfe;
}

.page-subtitle {
    text-align: center;
    font-size: 12px;
    color: #fff;
    background: linear-gradient(-90deg, #aa6dff 0%, #0077ff 100%);
    padding: 4px 16px;
    border-radius: 100px;
    display: inline-block;
    margin: 0 auto 40px auto;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* Filters */
.dashboard-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    align-items: center;
    padding-left: 68px;
}

.dashboard-filters .filter-btn {
    padding: 8px 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #f7f8fa;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    height: 40px;
    display: flex;
    align-items: center;
    transition: 0.2s;
}

.dashboard-filters .filter-btn:hover {
    border-color: #aa6dff;
}

.dashboard-filters .filter-btn.active {
    background: linear-gradient(to left, #aa6dff 11%, #07f 146%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 12px rgba(255, 89, 0, 0.1);
}

.dashboard-filters .search-bar {
    margin-left: auto;
    height: 40px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #999;
    font-size: 14px;
    width: 418px;
    border: none;
    margin-right: 68px;
}

.dashboard-filters .search-bar input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    font-size: 14px;
    color: #333;
}

.dashboard-filters .search-bar input::placeholder {
    color: #999;
}

/* Grid */
.dashboard-grid-container {
    display: flex;
    gap: 16px;
    padding: 0 68px 40px 68px;
    align-items: flex-start;
}

.masonry-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.card-item {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #eee;
    transition: opacity 0.4s ease, transform 0.2s;
    display: block;
    opacity: 0;
}

.card-item.img-loaded {
    opacity: 1;
}

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

.card-item img {
    width: 100%;
    height: auto;
    display: block;
}

.card-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(51, 51, 51, 1) 10%, rgba(51, 51, 51, 0));
    padding: 24px 16px 16px 16px;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: flex-end;
    height: 88px;
    color: white;
}

/* Floating Advisor */
.floating-advisor {
    position: absolute;
    right: 32px;
    bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 20;
    transition: transform 0.2s;
}

.floating-advisor:hover {
    transform: translateY(-4px);
}

.floating-advisor span {
    font-size: 12px;
    color: #fff;
    margin-top: 8px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}