:root {
    --bg: #0d1117;
    --text: #f0f6fc;
    --muted: #8b949e;
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --gradient: linear-gradient(135deg, #7928CA, #FF0080);
    --green: #238636;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(121, 40, 202, 0.12) 0%, transparent 60%);
    z-index: -1;
    animation: rotate 25s linear infinite;
}

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

.container {
    width: 100%;
    max-width: 820px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

header {
    text-align: center;
}

.gradient-text {
    font-size: 3rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    color: transparent;
    font-weight: 700;
}

header p {
    color: var(--muted);
    margin-top: 0.4rem;
}

.glass-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(15px);
}

.full-width {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* Chat */
.chat-window {
    height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    scroll-behavior: smooth;
}

.message {
    padding: 0.9rem 1.3rem;
    border-radius: 18px;
    max-width: 82%;
    line-height: 1.5;
    font-size: 1.05rem;
    animation: fadeUp 0.25s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

.ai-message {
    background: rgba(121, 40, 202, 0.18);
    border: 1px solid rgba(121, 40, 202, 0.35);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.user-message {
    background: rgba(35, 134, 54, 0.18);
    border: 1px solid rgba(35, 134, 54, 0.35);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Typing dots */
.typing {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 1rem 1.3rem;
}

.typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    animation: blink 1.2s infinite;
}

.typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {

    0%,
    80%,
    100% {
        opacity: 0.3;
    }

    40% {
        opacity: 1;
    }
}

/* Input */
.input-area {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.input-area input[type="text"] {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: white;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    outline: none;
    transition: border 0.3s;
}

.input-area input[type="text"]:focus {
    border-color: #FF0080;
}

.icon-btn {
    border-radius: 50%;
    width: 46px;
    height: 46px;
    border: 1px solid var(--border);
    background: var(--glass);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.mic-btn.listening {
    background: rgba(255, 0, 128, 0.2);
    border-color: #FF0080;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 128, 0.4);
    }

    70% {
        box-shadow: 0 0 0 12px transparent;
    }
}

.send-btn {
    height: 46px;
    padding: 0 1.4rem;
}

/* Buttons */
button {
    font-family: 'Outfit';
    font-weight: 600;
    padding: 0.75rem 1.4rem;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    transition: all 0.2s;
}

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

.primary-btn:hover {
    opacity: 0.88;
    transform: translateY(-2px);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* Preview card */
.preview-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.listing-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

/* Images */
.image-gallery {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.preview-img {
    width: 140px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.preview-img:hover {
    transform: scale(1.05);
}

/* Description */
.desc-label {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.description-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.description-box table {
    width: 100%;
    border-collapse: collapse;
}

.description-box td {
    padding: 0.3rem 0.8rem 0.3rem 0;
}

.description-box td:first-child {
    color: var(--muted);
    width: 40%;
}

/* Pricing */
.pricing-box {
    background: rgba(35, 134, 54, 0.08);
    border: 1px solid rgba(35, 134, 54, 0.3);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}

.price-summary {
    font-size: 0.95rem;
    color: #a0d9a0;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.price-buttons {
    display: flex;
    gap: 1rem;
}

.price-btn {
    flex: 1;
    padding: 0.8rem;
    border-radius: 10px;
    border: none;
    font-family: 'Outfit';
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.auction-btn {
    background: rgba(255, 165, 0, 0.15);
    border: 1px solid rgba(255, 165, 0, 0.4);
    color: #ffcc55;
}

.auction-btn:hover {
    background: rgba(255, 165, 0, 0.25);
}

.bin-btn {
    background: rgba(35, 134, 54, 0.15);
    border: 1px solid rgba(35, 134, 54, 0.5);
    color: #58d65a;
}

.bin-btn:hover {
    background: rgba(35, 134, 54, 0.25);
}

.action-bar {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    border-top: 1px solid var(--border);
    padding-top: 1.2rem;
}
/* ── Camera Modal ─────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-card { max-width: 480px; width: 100%; display: flex; flex-direction: column; gap: 1rem; }
.modal-title { font-size: 1.4rem; font-weight: 700; }
.modal-subtitle { color: var(--muted); font-size: 0.95rem; }
.modal-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.upload-label { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.modal-close { margin-top: 0.5rem; align-self: flex-start; }

.camera-preview-wrap { position: relative; border-radius: 12px; overflow: hidden; background: #000; }
.camera-preview-wrap video { width: 100%; max-height: 280px; object-fit: cover; display: block; }
.snap-btn { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); padding: 0.7rem 2rem; }

.identify-preview { display: flex; flex-direction: column; gap: 0.75rem; }
.identify-preview img { width: 100%; max-height: 200px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.identify-status { font-size: 0.95rem; color: #a0d9a0; font-weight: 600; }
/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: rgba(26, 26, 46, 0.98);
    z-index: 1000;
    transition: left 0.3s ease;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    color: #fff;
}

.sidebar-section-title {
    font-size: 0.9rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    color: #eee;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-list li:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-list li.active {
    background: linear-gradient(135deg, rgba(88,214,141,0.2) 0%, rgba(33,150,243,0.2) 100%);
    border: 1px solid rgba(88,214,141,0.5);
}
