/* Reset and Global Styles */
.center-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.15; /* transparansi logo */
    width: 150px;  /* atur ukuran sesuai logo */
    pointer-events: none; /* supaya tidak mengganggu klik elemen lain */
    z-index: 0;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: monospace;
    background-size: cover !important;
    background: url(https://neurapepeai.com/assets/bg-1.webp);
    background-repeat: no-repeat;
    margin: 0;
    padding: 0;
    color: #d4d4d4;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Chat Header */
.chat-header {
    width: 100vw;
    padding: 12px 24px;
    background: linear-gradient(90deg, rgb(8 8 8 / 41%) 0%, rgb(4 36 2 / 95%) 100%);
    border-bottom: 1px solid rgba(42, 166, 72, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
}

#token-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(42, 166, 72, 0.5);
    box-shadow: 0 0 16px rgba(42, 166, 72, 0.4);
    object-fit: cover;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#token-logo:hover {
    transform: scale(1.1);
    box-shadow: 0 0 24px rgba(42, 166, 72, 0.6);
}

.chat-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
    flex: 1;
    text-align: center;
    letter-spacing: 1px;
}

#token-symbol {
    color: #2aa648;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.8px;
}

.back-btn {
    background: none;
    border: none;
    color: #2aa648;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 12px;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.back-btn:hover {
    background: rgba(42, 166, 72, 0.2);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Chat Container */
.chat-container {
    width: 100%;
    max-width: 960px;
    background: rgb(8 8 8 / 46%);
    border-radius: 20px;
    box-shadow: 0 12px 60px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    margin: 80px 16px 16px;
    height: calc(100vh - 120px); /* Large chatbox, leaves space for header and footer */
    border: 1px solid rgba(42, 166, 72, 0.15);
    overflow: hidden;
}

/* Suggestions */
.suggestions {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    flex-wrap: wrap;
    animation: fadeIn 0.6s ease-in-out;
    flex-shrink: 0;
}

.suggestion-card {
    background: rgb(4 34 1 / 19%);
    border: 1px solid rgba(42, 166, 72, 0.3);
    border-radius: 16px;
    padding: 16px 20px;
    width: 280px;
    text-align: center;
    font-size: 14px;
    color: #b4b4b4;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.suggestion-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(42, 166, 72, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.suggestion-card:hover::before {
    opacity: 1;
}

.suggestion-card:hover {
    background: rgba(42, 166, 72, 0.12);
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(42, 166, 72, 0.35);
    color: #ffffff;
}

.suggestion-card .icon {
    display: block;
    font-size: 26px;
    margin-bottom: 12px;
    color: #2aa648;
    transition: transform 0.3s ease;
}

.suggestion-card:hover .icon {
    transform: scale(1.2);
}

/* Chat Body */
.chat-body {
    flex: 1;
    padding: 24px;
    padding-bottom: 80px; /* Extra padding to prevent footer overlap */
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(8, 8, 8, 0.92) 0%, rgba(22, 22, 39, 0.92) 100%);
    scrollbar-width: thin;
    scrollbar-color: rgba(42, 166, 72, 0.3) rgba(0, 0, 0, 0.7);
}

.chat-body::-webkit-scrollbar {
    width: 8px;
}

.chat-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.7);
}

.chat-body::-webkit-scrollbar-thumb {
    background: rgba(42, 166, 72, 0.3);
    border-radius: 4px;
}

.chat-message {
    margin: 16px 0;
    padding: 12px 18px;
    border-radius: 14px;
    max-width: 70%;
    font-size: 14px;
    line-height: 1.6;
    position: relative;
    animation: fadeIn 0.4s ease forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chat-message:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.user-message {
    background: linear-gradient(90deg, #2aa64830 0%, #00b7d436 100%);
    color: #fff;
    margin-left: auto;
    border: solid 1px #00ab4c;
}

.agent-message {
    background: rgb(22 22 39 / 35%);
    color: #d0d0d0;
    margin-right: auto;
    border: 1px solid rgba(42, 166, 72, 0.25);
}

.error-message {
    background: linear-gradient(90deg, #e63946 0%, #f25f5c 100%);
    color: #fff;
    margin-right: auto;
    box-shadow: 0 4px 16px rgba(230, 57, 70, 0.4);
}

.ai-thinking {
    display: flex;
    gap: 8px;
    margin: 16px 0;
    margin-right: auto;
    padding: 12px 18px;
}

.ai-thinking .dot {
    width: 8px;
    height: 8px;
    background: #2aa648;
    border-radius: 50%;
    animation: thinking 1.2s infinite ease-in-out;
    box-shadow: 0 0 10px rgba(42, 166, 72, 0.6);
}

.ai-thinking .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-thinking .dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* Chat Footer */
.chat-footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 960px;
    padding: 16px 24px;
    background: rgb(8 8 8 / 54%);
    border-top: 1px solid rgba(42, 166, 72, 0.15);
    backdrop-filter: blur(12px);
    z-index: 500;
}

.input-container {
    display: flex;
    align-items: center;
    background: rgba(22, 22, 39, 0.8);
    border-radius: 14px;
    padding: 8px 14px;
    border: 1px solid rgba(42, 166, 72, 0.25);
    transition: all 0.3s ease;
}

.input-container:focus-within {
    border-color: #2aa648;
    box-shadow: 0 0 16px rgba(42, 166, 72, 0.5);
}

.chat-input {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: #ffffff;
    outline: none;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.chat-input::placeholder {
    color: #5a5a5a;
}

.send-btn {
    background: linear-gradient(90deg, #2aa648 0%, #00b7d4 100%);
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(42, 166, 72, 0.6);
}

.send-btn svg {
    width: 20px;
    height: 20px;
}

.privacy-notice {
    margin-top: 12px;
    font-size: 12px;
    color: #5a5a5a;
    text-align: center;
}

.privacy-notice a {
    color: #2aa648;
    text-decoration: none;
    transition: color 0.3s ease;
}

.privacy-notice a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes thinking {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(-6px); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 600px) {
    .chat-header {
        padding: 10px 16px;
    }

    .chat-header h3 {
        font-size: 20px;
    }

    #token-logo {
        width: 34px;
        height: 34px;
    }

    .back-btn {
        font-size: 14px;
        padding: 6px 12px;
    }

    .chat-container {
        margin: 64px 8px 8px;
        height: calc(100vh - 100px); /* Adjusted for mobile */
    }

    .chat-body {
        padding: 16px;
        padding-bottom: 80px; /* Consistent padding for mobile */
    }

    .suggestions {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 16px;
    }

    .suggestion-card {
        width: 100%;
        max-width: 340px;
        padding: 14px;
        font-size: 13px;
    }

    .chat-message {
        max-width: 80%;
        font-size: 13px;
        padding: 10px 14px;
    }

    .chat-footer {
        padding: 12px 16px;
        max-width: 100%;
    }

    .input-container {
        padding: 6px 12px;
    }

    .chat-input {
        font-size: 13px;
    }

    .send-btn {
        padding: 8px 14px;
    }
}

@media (max-width: 400px) {
    .chat-header {
        padding: 8px 12px;
    }

    .chat-header h3 {
        font-size: 18px;
    }

    #token-logo {
        width: 30px;
        height: 30px;
    }

    .back-btn {
        font-size: 13px;
        padding: 5px 10px;
    }

    .chat-container {
        margin: 60px 4px 4px;
    }

    .suggestion-card {
        font-size: 12px;
    }

    .chat-message {
        font-size: 12px;
    }

    .privacy-notice {
        font-size: 11px;
    }
}