@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

:root {
    /* Cyber theme colors - matching main site */
    --bg-start: #000000;
    --bg-end: #0a0a0a;
    --accent-purple: #0080ff;
    --accent-cyan: #00ffff;
    --accent-pink: #00ffff;
    --glass-bg: rgba(0, 20, 30, 0.6);
    --glass-border: rgba(0, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --success: #00ff88;
    --warning: #ffb347;
    --error: #ff4444;
}

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

/* UMTS Logo - Top Left Corner */
.umts-logo-corner {
    position: fixed;
    top: 30px;
    left: 30px;
    width: 120px;
    height: 120px;
    z-index: 100;
    animation: logoFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.6));
    transition: transform 0.3s ease;
    cursor: pointer;
}

.umts-logo-corner:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 40px rgba(0, 255, 255, 0.9));
}

@keyframes logoFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

body {
    font-family:
        "Poppins",
        "Segoe UI",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    min-height: 100vh;
    background: #000000;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    padding: clamp(24px, 4vw, 48px) clamp(12px, 4vw, 48px);
    position: relative;
}

/* Animated grid background */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(0deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes gridMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 50px 50px;
    }
}

.scene {
    position: relative;
    width: min(1200px, 100%);
    min-height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    mix-blend-mode: lighten;
    animation: float 16s ease-in-out infinite;
    pointer-events: none;
}

.orb-left {
    width: 400px;
    height: 400px;
    left: -100px;
    top: 40%;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(0, 255, 255, 0.3),
        transparent 70%
    );
    animation-delay: -3s;
}

.orb-right {
    width: 350px;
    height: 350px;
    right: -80px;
    top: -100px;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(0, 128, 255, 0.25),
        transparent 70%
    );
    animation-delay: -6s;
}

.orb-top {
    width: 300px;
    height: 300px;
    left: 50%;
    transform: translateX(-50%);
    top: -150px;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(0, 255, 255, 0.2),
        transparent 70%
    );
    animation-delay: -9s;
}

.grid-overlay {
    position: absolute;
    inset: -200px;
    background: radial-gradient(
        circle at 50% 0%,
        rgba(0, 255, 255, 0.08),
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
}

.glass-shell {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: clamp(28px, 4vw, 40px);
    border-radius: 32px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 0 50px rgba(0, 255, 255, 0.2),
        0 35px 120px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(24px) saturate(140%);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glass-shell::before {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 30px;
    background: linear-gradient(
        145deg,
        rgba(0, 255, 255, 0.05),
        rgba(0, 128, 255, 0.02)
    );
    pointer-events: none;
}

.shell-header {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(16px, 4vw, 32px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    border-radius: 24px;
    background: linear-gradient(
        135deg,
        rgba(0, 255, 255, 0.3),
        rgba(0, 128, 255, 0.2)
    );
    box-shadow:
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.brand-text h1 {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 700;
    letter-spacing: -0.4px;
    background: linear-gradient(45deg, #00ffff, #0080ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-text p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 6px;
}

.actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.upload-btn {
    position: relative;
    overflow: hidden;
    border: 2px solid var(--accent-cyan);
    border-radius: 14px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #000;
    background: linear-gradient(
        135deg,
        rgba(0, 255, 255, 0.9),
        rgba(0, 128, 255, 0.7)
    );
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.4);
    backdrop-filter: blur(18px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.3),
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-btn:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.6);
}

.upload-btn:hover::after {
    opacity: 1;
}

.status-badge {
    position: relative;
    z-index: 2;
    margin-top: 24px;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 20, 30, 0.6);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: var(--text-secondary);
}

.status-badge::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 12px currentColor;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.status-success {
    color: var(--success);
}
.status-info {
    color: var(--accent-cyan);
}
.status-error {
    color: var(--error);
}

.shell-body {
    position: relative;
    z-index: 2;
    margin-top: clamp(28px, 4vw, 36px);
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: clamp(24px, 5vw, 36px);
}

.chat-column {
    display: flex;
}

.chat-panel {
    position: relative;
    flex: 1;
    border-radius: 28px;
    padding: clamp(24px, 3vw, 32px);
    background: rgba(0, 20, 30, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow:
        0 0 30px rgba(0, 255, 255, 0.15),
        inset 0 0 20px rgba(0, 255, 255, 0.05);
    backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 85%;
    animation: slide-up 0.25s ease;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 18px;
    backdrop-filter: blur(8px);
}

.bot-avatar {
    background: linear-gradient(
        135deg,
        rgba(0, 255, 255, 0.7),
        rgba(0, 128, 255, 0.5)
    );
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.user-message {
    margin-left: auto;
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: linear-gradient(
        135deg,
        rgba(0, 128, 255, 0.7),
        rgba(0, 255, 255, 0.6)
    );
    color: #000;
    box-shadow: 0 0 15px rgba(0, 128, 255, 0.5);
}

.message-content {
    position: relative;
    padding: 16px 18px;
    border-radius: 18px;
    backdrop-filter: blur(14px);
    background: rgba(0, 20, 30, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.user-message .message-content {
    background: linear-gradient(
        145deg,
        rgba(0, 255, 255, 0.2),
        rgba(0, 128, 255, 0.15)
    );
    color: var(--text-primary);
    border-color: rgba(0, 255, 255, 0.5);
}

.message-hint {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.equipment-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 260px;
}

.equipment-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.equipment-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.equipment-category {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-cyan);
}

.equipment-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.equipment-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 14px;
    font-size: 12px;
}

.equipment-meta dt {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.equipment-meta dd {
    color: var(--text-primary);
}

.chat-input-row {
    display: flex;
    gap: 12px;
    margin-top: clamp(18px, 3vw, 24px);
}

#chatInput {
    flex: 1;
    border: 1px solid rgba(0, 255, 255, 0.4);
    background: rgba(0, 20, 30, 0.8);
    border-radius: 16px;
    padding: 16px 20px;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

#chatInput::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#chatInput:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    background: rgba(0, 30, 40, 0.9);
}

.send-btn {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    border: 2px solid var(--accent-cyan);
    display: grid;
    place-items: center;
    background: linear-gradient(
        135deg,
        rgba(0, 255, 255, 0.9),
        rgba(0, 128, 255, 0.7)
    );
    color: #000;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

.send-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.6);
}

.info-column {
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 3vw, 24px);
}

.info-card {
    border-radius: 24px;
    padding: clamp(20px, 3vw, 26px);
    backdrop-filter: blur(18px);
    background: rgba(0, 20, 30, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow:
        0 0 30px rgba(0, 255, 255, 0.15),
        inset 0 0 20px rgba(0, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: rgba(0, 255, 255, 0.6);
    box-shadow:
        0 0 40px rgba(0, 255, 255, 0.25),
        inset 0 0 30px rgba(0, 255, 255, 0.08);
    transform: translateY(-2px);
}

.total-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-secondary);
}

.info-value {
    font-size: clamp(32px, 6vw, 46px);
    font-weight: 700;
    color: var(--accent-cyan);
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

.categories-card h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.categories-list {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 360px;
    overflow-y: auto;
}

.empty-message {
    font-size: 13px;
    color: var(--text-secondary);
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(0, 20, 30, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.category-item:hover {
    border-color: rgba(0, 255, 255, 0.6);
    background: rgba(0, 30, 40, 0.9);
    transform: translateX(5px);
}

.category-count {
    font-weight: 600;
    color: var(--accent-cyan);
}

.loading-message .message-content {
    display: grid;
    place-items: center;
    gap: 12px;
}

.loading-spinner {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--accent-cyan);
    animation: spin 0.75s linear infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -18px, 0);
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1024px) {
    .shell-body {
        grid-template-columns: 1fr;
    }

    .info-column {
        order: -1;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .info-card {
        flex: 1 1 240px;
    }
}

@media (max-width: 720px) {
    .umts-logo-corner {
        width: 80px;
        height: 80px;
        top: 20px;
        left: 20px;
    }

    body {
        padding: 24px 16px;
    }

    .shell-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .info-column {
        flex-direction: column;
    }

    .info-card {
        width: 100%;
    }

    .chat-panel {
        padding: 20px;
    }
}
