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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('background-image-min.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    border: none;
    outline: none;
}

/* Header Styles */
.header {
    text-align: center;
    padding: 20px 0 20px;
    border: none;
    outline: none;
}

.welcome-info {
    font-family: 'Mulish', sans-serif;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 400;
    letter-spacing: 0.5px;
    background: rgba(30, 30, 30, 0.25);
    border-radius: 18px;
    padding: 15px 25px;
    margin: 20px auto 0 auto;
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.13);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d;
    will-change: transform;
}

.welcome-info-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.welcome-info-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.welcome-info-text {
    flex: 1;
}

/* Chat Section */
.chat-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-bottom: none;
    outline: none;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(30, 30, 30, 0.25);
    border-radius: 18px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    min-height: 300px;
    max-height: 70vh;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: transparent;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: fadeIn 0.3s ease-in;
}

.message.user {
    justify-content: flex-end;
}

.message-content {
    font-family: 'Mulish', sans-serif;
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.82rem;
    line-height: 1.4;
    white-space: pre-line;
}

.message.user .message-content {
    background: linear-gradient(135deg, #A1BDE5, #8BA8D4);
    color: white;
    border-bottom-right-radius: 6px;
}

.message.assistant .message-content {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 6px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Input Section */
.input-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    background: none;
    border: none;
    box-shadow: none;
    /* Remove transform/transition styles */
}

.input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d;
    will-change: transform;
}

@media (max-width: 768px) {
    .input-container {
        border: none;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        border-radius: 18px;
        background: rgba(30, 30, 30, 0.25);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }
}

@media (max-width: 480px) {
    .input-container {
        border: none;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        border-radius: 18px;
        background: rgba(30, 30, 30, 0.25);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }
}

.message-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.message-input::placeholder {
    color: #888;
}

.message-input:focus {
    border-color: #A1BDE5;
    background: rgba(161, 189, 229, 0.1);
    box-shadow: 0 0 0 3px rgba(161, 189, 229, 0.2);
}

.send-button {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #A1BDE5, #8BA8D4);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(161, 189, 229, 0.3);
}

.send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.send-button:active {
    transform: translateY(0);
}

.send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading Animation */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    border: 1px solid #333;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #888;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}



/* Responsive Design */
@media (max-width: 768px) {
    .container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 100vh;
        height: auto;
        position: relative;
        padding-bottom: 112px; /* input-section height + margin */
    }
    .input-section {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        max-width: 800px;
        width: 100%;
        margin: 0 auto;
        z-index: 10;
        background: inherit;
        box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
        margin-bottom: 48px;
    }
    .chat-section {
        margin: 12px 0;
        flex: none;
        min-height: unset;
        max-height: unset;
        height: auto;
    }
    .chat-container {
        flex: none;
        min-height: 60px;
        max-height: calc(100vh - 140px); /* Prevent overlap with input-section */
        overflow-y: auto;
    }
    
    .header {
        padding: 2px 0 2px;
    }
    
    .welcome-info {
        font-size: 0.85rem;
        padding: 8px 12px;
        margin: 0px auto 5px auto; /* Move higher by reducing top margin */
        gap: 8px;
    }
    
    .message-content {
        max-width: 85%;
        font-size: 0.7rem;
    }
    
    .input-section {
        padding: 5px 0;
    }
    
    .input-container {
        gap: 8px;
    }
    
    .message-input {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    
    .send-button {
        width: 32px;
        height: 32px;
    }
    .avatar {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 100vh;
        height: auto;
        position: relative;
        padding-bottom: 96px; /* input-section height + margin */
    }
    .input-section {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        max-width: 800px;
        width: 90%;
        margin: 0 auto;
        z-index: 10;
        background: inherit;
        box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
        margin-bottom: 40px;
    }
    .chat-section {
        margin: 8px 0;
        flex: none;
        min-height: unset;
        max-height: unset;
        height: auto;
    }
    .chat-container {
        flex: none;
        min-height: 40px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
    
    .header {
        padding: 1px 0 1px;
    }
    
    .welcome-info {
        font-size: 0.75rem;
        padding: 6px 10px;
        margin: 0px auto 5px auto;
        gap: 6px;
    }
    
    .input-section {
        padding: 3px 0;
    }
    
    .message-input {
        font-size: 0.7rem;
        padding: 6px 10px;
    }
    .send-button {
        width: 28px;
        height: 28px;
    }
    .avatar {
        width: 16px;
        height: 16px;
    }
}

/* Attribution Footer */
.attribution-footer {
    padding: 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    transition: box-shadow 0.3s, background 0.3s;
    position: relative;
    overflow: hidden;
}

.attribution-toggle {
    cursor: pointer;
    user-select: none;
    padding: 4px 0 2px 0;
    background: rgba(0,0,0,0.08);
    color: rgba(161, 189, 229, 0.5);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: none;
    outline: none;
    min-height: 16px;
    transition: background 0.2s, color 0.2s;
}
.attribution-toggle:focus {
    outline: 1.5px solid #A1BDE5;
}

#attributionToggleIcon {
    font-size: 0.8em;
    transition: transform 0.3s, color 0.2s;
    color: rgba(161, 189, 229, 0.5);
}

.footer-content-wrapper {
    max-height: 400px;
    opacity: 1;
    transition: max-height 0.4s cubic-bezier(.4,0,.2,1), opacity 0.3s;
    overflow: hidden;
    background: rgba(0,0,0,0.13);
    box-shadow: none;
}

.attribution-footer.collapsed .footer-content-wrapper {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.attribution-footer.expanded .footer-content-wrapper {
    max-height: 400px;
    opacity: 1;
    pointer-events: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    padding: 6px 0 8px 0;
}

.developer-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.developer-info p {
    margin: 0;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
}

.developer-info strong {
    color: #A1BDE5;
}

.icon-attribution {
    font-size: 0.55rem;
}

.attribution-footer a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.6rem;
}

.attribution-footer a:hover {
    color: #A1BDE5;
    text-decoration: underline;
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer-content {
        gap: 4px;
    }
    
    .developer-info p {
        font-size: 0.5rem;
    }
    
    .icon-attribution {
        font-size: 0.4rem;
    }
    .attribution-footer a {
        font-size: 0.5rem;
    }
    .attribution-toggle {
        font-size: 0.6rem;
        min-height: 12px;
    }
    #attributionToggleIcon {
        font-size: 0.7em;
    }
}

/* Data Usage Banner Styles */
.data-usage-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.data-usage-banner.show {
    opacity: 1;
    visibility: visible;
}

.banner-content {
    background: rgba(30, 30, 30, 0.95);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    margin: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    text-align: center;
}

.banner-content h3 {
    font-family: 'Mulish', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.banner-content p {
    font-family: 'Mulish', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #e0e0e0;
    text-align: left;
}

.banner-content a {
    color: #A1BDE5;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.banner-content a:hover {
    color: #8BA8D4;
    text-decoration: underline;
}

.banner-continue-btn {
    background: linear-gradient(45deg, #A1BDE5, #8BA8D4);
    color: #ffffff;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-family: 'Mulish', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(161, 189, 229, 0.3);
}

.banner-continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(161, 189, 229, 0.4);
}

.banner-continue-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .banner-content {
        padding: 25px;
        margin: 15px;
    }
    
    .banner-content h3 {
        font-size: 1.3rem;
    }
    
    .banner-content p {
        font-size: 0.9rem;
    }
    
    .banner-continue-btn {
        padding: 10px 25px;
        font-size: 0.95rem;
    }
} 