﻿@import url('./theme.css');

:root {
    --bg: var(--bg-main);
    --panel: var(--panel-main);
    --panel-soft: var(--panel-main);
    --line: rgba(255, 255, 255, 0.08);
    --text: #f6f4f6;
    --text-dim: rgba(255, 255, 255, 0.55);
    --accent-soft: rgba(var(--accent-rgb), 0.16);
    --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
body {
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
    background: radial-gradient(1200px 800px at 60% -20%, var(--bg-glow) 0%, var(--bg-main) 58%);
    color: var(--text);
}

.create-app {
    height: 100vh;
    display: grid;
    grid-template-columns: 62px 280px 1fr 276px;
    min-width: 1200px;
    overflow: hidden;
}

.left-rail {
    border-right: 1px solid var(--line);
    background: var(--rail-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 0 12px;
    gap: 20px;
}

.rail-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: contain;
    object-position: center;
}

.rail-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rail-group.bottom {
    margin-top: auto;
}

.rail-item {
    width: 50px;
    min-height: 62px;
    border-radius: 12px;
    border: 1px solid transparent;
    color: rgba(255,255,255,.6);
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    font-size: 11px;
}

.rail-item i {
    font-style: normal;
    font-size: 22px;
    line-height: 1;
}

.rail-item.active {
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.project-panel,
.asset-panel {
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(26, 12, 20, 0.9), rgba(18, 8, 14, 0.94));
    padding: 14px 10px;
    overflow: auto;
    min-height: 0;
}

.asset-panel {
    border-right: 0;
    border-left: 1px solid var(--line);
}

.panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 4px;
}

.panel-title h2 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1px;
}

.panel-title .small {
    font-size: 12px;
    color: var(--text-dim);
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.tab {
    flex: 1;
    text-align: center;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 6px;
    font-size: 14px;
    text-decoration: none;
}

.tab.active {
    border-color: rgba(var(--accent-rgb), 0.7);
    background: var(--accent-soft);
    color: #fff;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 2px;
    overflow: auto;
    height: calc(100% - 120px);
}

.project-card {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px;
}

.project-card .name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-card .line {
    color: var(--text-dim);
    padding: 6px 4px;
    border-radius: 8px;
    font-size: 13px;
}

.project-card .line.active {
    background: var(--accent-soft);
    border: 1px solid rgba(var(--accent-rgb), 0.72);
    color: #fff;
}

.workspace {
    position: relative;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(900px 520px at 50% 130%, rgba(68, 18, 28, 0.18), rgba(0,0,0,0) 64%),
        linear-gradient(180deg, rgba(18, 8, 14, 0.92), rgba(12, 6, 10, 0.96)),
        url('../images/theme_create_bg.png') center/cover no-repeat;
    overflow: hidden;
    min-height: 0;
}

.chat-scroll {
    flex: 1;
    overflow: auto;
    padding: 8px 4px 14px;
}

.empty-state {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: rgba(255, 255, 255, 0.38);
    gap: 8px;
}

.empty-state h3 {
    margin: 0;
    font-size: 34px;
    color: rgba(255, 255, 255, 0.45);
}

.msg-block {
    margin-bottom: 20px;
}

.msg-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.msg-grid.video {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 520px;
}

.media-card {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #121212;
}

.media-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.media-card.with-meta {
    position: relative;
}

.media-meta {
    position: absolute;
    left: 8px;
    bottom: 6px;
    font-size: 12px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 4px 7px;
}

.msg-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chip {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.86);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
}

.bubble {
    margin-top: 14px;
    max-width: 520px;
    margin-left: auto;
    background: var(--chat-bubble-bg);
    color: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    line-height: 1.6;
    font-size: 15px;
}

.system-error {
    margin-top: 12px;
    display: inline-block;
    color: var(--accent-weak);
    background: rgba(var(--accent-rgb), 0.18);
    border: 1px solid rgba(var(--accent-rgb), 0.45);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
}

.composer {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    background: linear-gradient(180deg, var(--composer-bg-start), var(--composer-bg-end));
}

.composer-top {
    display: flex;
    gap: 8px;
    align-items: center;
    min-height: 46px;
    margin-bottom: 10px;
    color: var(--text-dim);
}

.thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
}

.thumb img { width: 100%; height: 100%; object-fit: cover; }

.upload-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.prompt {
    flex: 1;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 15px;
    outline: none;
}

.composer-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
}

.primary {
    border: 1px solid rgba(var(--accent-rgb), 0.74);
    background: var(--accent-soft);
    color: #fff;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 14px;
}

.select {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 14px;
}

.send {
    margin-left: auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    background: var(--accent);
    color: #fff;
    font-size: 18px;
}

.asset-tabs {
    display: flex;
    gap: 8px;
    margin: 8px 0 14px;
}

.asset-tab {
    border-radius: 8px;
    border: 1px solid transparent;
    padding: 6px 10px;
    font-size: 13px;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.05);
}

.asset-tab.active {
    border-color: rgba(var(--accent-rgb), 0.7);
    color: #fff;
    background: var(--accent-soft);
}

.asset-section {
    margin-bottom: 14px;
}

.asset-section h4 {
    margin: 0 0 8px;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 500;
}

.asset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.asset-grid .media-card {
    aspect-ratio: 16 / 9;
}

.product-composer .composer-top {
    flex-wrap: wrap;
    align-items: flex-start;
}

.product-workspace .chat-scroll {
    min-height: 0;
}

.product-project-card {
    border-color: rgba(255,255,255,.08);
    background: rgba(255,255,255,.035);
}

.product-project-card.active {
    border-color: rgba(var(--accent-rgb), .45);
    background: linear-gradient(180deg, rgba(54, 16, 24, 0.6), rgba(29, 12, 18, 0.72));
}

.product-project-card .name {
    justify-content: flex-start;
    gap: 8px;
}

.avatar-dot {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ff8f52, #ff4a74);
    border: 1px solid rgba(255,255,255,.25);
    flex-shrink: 0;
}

.product-project-card .edit-icon {
    margin-left: auto;
    color: rgba(255,255,255,.75);
}

.product-project-card .line {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-project-card .line.active {
    background: rgba(var(--accent-rgb), .2);
    border: 1px solid rgba(var(--accent-rgb), .5);
}

.product-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.product-tag {
    border: 1px solid rgba(var(--accent-rgb), 0.55);
    background: rgba(57, 18, 25, 0.82);
    color: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    white-space: nowrap;
}

.product-link {
    margin-left: auto;
    color: var(--accent-weak);
    font-size: 13px;
}

.product-wide-grid {
    grid-template-columns: 1fr;
}

.product-banner {
    aspect-ratio: 16 / 6;
}

.modal-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.dropdown {
    position: absolute;
    pointer-events: auto;
    background: rgba(24, 10, 18, 0.96);
    border: 1px solid var(--line);
    border-radius: 10px;
    min-width: 160px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.34);
}

.dropdown .item {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 14px;
}

.dropdown .item:last-child { border-bottom: 0; }
.dropdown .item.active { color: #fff; background: rgba(255, 255, 255, 0.05); }

.ratio-panel {
    position: absolute;
    pointer-events: auto;
    width: 360px;
    background: rgba(24, 10, 18, 0.96);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
}

.ratio-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.ratio {
    border: 1px solid var(--line);
    border-radius: 7px;
    text-align: center;
    padding: 7px 4px;
    font-size: 12px;
    color: var(--text-dim);
}

.ratio.active {
    border-color: rgba(var(--accent-rgb), 0.78);
    color: #fff;
}

@media (max-width: 1400px) {
    .create-app {
        min-width: 1024px;
        grid-template-columns: 58px 250px 1fr 240px;
    }

    .panel-title h2 { font-size: 28px; }
}





