body {
    margin: 0;
    font-family: 'Inter', Arial, sans-serif;
    background: linear-gradient(180deg, #e9edfb 0%, #f7f8fc 100%);
    color: #222;
}
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 0 20px;
}
.subtitle {
    color: #6c7ae0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 10px;
}
h1 {
    font-size: 2.8rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 16px 0;
    color: #4b3cc6;
}
.desc {
    text-align: center;
    font-size: 1.2rem;
    color: #444;
    margin-bottom: 48px;
}
.questions-section, .chat-section {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(80, 90, 180, 0.08);
    padding: 36px 24px 32px 24px;
    margin-bottom: 40px;
    max-width: 100%;
}
.questions-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    color: #222;
}
.cards {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 28px;
    justify-content: center;
    overflow-x: auto;
}
.card {
    background: #f8faff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(80, 90, 180, 0.06);
    padding: 28px 22px 22px 22px;
    min-width: 270px;
    max-width: 320px;
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}
.card-header.aws {
    color: #f59e42;
}
.card-header.azure {
    color: #5b8def;
}
.card-header.gcp {
    color: #3ecf8e;
}
.card-header .icon {
    font-size: 1.3rem;
}
.card-questions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.card-questions div {
    background: #fff;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 1rem;
    color: #333;
    box-shadow: 0 1px 4px rgba(80, 90, 180, 0.04);
    transition: background 0.2s;
    cursor: pointer;
}
.card-questions div:hover {
    background: #e9edfb;
}
/* Chat Interface Styles */
.chat-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 32px 0 32px;
    margin-bottom: 0;
}
.chat-header {
    font-size: 1.35rem;
    font-weight: 700;
    color: #222;
    margin: 0;
}
.chat-controls {
    display: flex;
    gap: 8px;
}
.chat-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.new-chat-btn {
    background: #6c7ae0;
    color: white;
}
.new-chat-btn:hover {
    background: #5a6bd8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 122, 224, 0.3);
}
.history-btn {
    background: #f4f7ff;
    color: #6c7ae0;
    border: 1px solid #e0e7ff;
}
.history-btn:hover {
    background: #e9edfb;
    border-color: #6c7ae0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 122, 224, 0.15);
}
.delete-btn {
    background: #fee7e7;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.delete-btn:hover {
    background: #fca5a5;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}
.chat-btn svg {
    flex-shrink: 0;
}
.chat-messages {
    padding: 18px 32px 0 32px;
    min-height: 80px;
}
.message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
    width: 100%; /* Full width for alignment */
}
.message.bot {
    flex-direction: row;
    justify-content: flex-start;
    margin-left: 0;
}
.message.user {
    flex-direction: row;
    justify-content: flex-end;
    margin-left: 0;
}
.message .avatar {
    background: #7c6ae6;
    color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-top: 2px;
}
.message.user .avatar {
    order: 2;
    background: #4b3cc6;
    margin-left: 12px;
}
.message .bubble {
    background: #f7f8fc;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 1rem;
    color: #222;
    box-shadow: 0 1px 4px rgba(80, 90, 180, 0.04);
    max-width: calc(100% - 60px); /* Back to original width calculation */
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    line-height: 1.7;
}
.message.bot .bubble {
    background: #f4f7ff;
    border-left: 4px solid #6c7ae0;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 1.07rem;
    color: #2a2a2a;
    padding: 18px 28px;
    margin-bottom: 2px;
    max-width: calc(100% - 60px); /* Back to original width calculation */
}
.message.bot .bubble * {
    margin-top: 0;
    margin-bottom: 0;
}
.message.bot .bubble h1,
.message.bot .bubble h2,
.message.bot .bubble h3 {
    margin: 2px 0 1px 0;
    font-weight: 500;
}
.message.bot .bubble p {
    margin: 1px 0 1px 0;
    line-height: 1.5;
}
.message.bot .bubble ul,
.message.bot .bubble ol {
    margin: 1px 0 1px 14px;
    padding: 0;
}
.message.bot .bubble li {
    margin: 1px 0;
    line-height: 1.5;
}
.message .timestamp {
    font-size: 0.85rem;
    color: #888;
    margin-left: 54px;
    margin-top: 2px;
}
.message.user .timestamp {
    margin-left: 0;
    margin-right: 54px;
    text-align: right;
}

.save-pdf-btn {
    background: #6c7ae0;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    margin-left: 54px;
    margin-top: 6px;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.save-pdf-btn:hover {
    background: #5a6bd8;
}

.save-pdf-btn:active {
    background: #4a5bc7;
    transform: translateY(1px);
}

.quick-actions {
    display: flex;
    gap: 10px;
    padding: 10px 32px 0 32px;
}
.quick-action {
    background: #f2f4fa;
    border: none;
    border-radius: 20px;
    padding: 7px 18px;
    font-size: 1rem;
    color: #4b3cc6;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}
.quick-action:hover {
    background: #e9edfb;
}
.chat-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 32px 0 32px;
}
.chat-input {
    flex: 1;
    border: 1px solid #e0e3ef;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 1rem;
    outline: none;
    background: #f7f8fc;
    color: #222;
    transition: border 0.2s;
}
.chat-input:focus {
    border: 1.5px solid #6c7ae0;
}
.send-btn {
    background: #6c7ae0;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.send-btn:hover {
    background: #4b3cc6;
}
@media (max-width: 900px) {
    .cards {
        gap: 16px;
    }
    .chat-section {
        padding: 0 0 12px 0;
    }
    .chat-header-row, .chat-messages, .quick-actions, .chat-input-row {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* Thinking animation styles */
.message.thinking .bubble {
    font-style: italic;
    color: #666;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.dot {
    animation: thinking 1.4s ease-in-out infinite both;
    display: inline-block;
    margin-left: 1px;
}

.dot:nth-of-type(1) {
    animation-delay: 0s;
}

.dot:nth-of-type(2) {
    animation-delay: 0.2s;
}

.dot:nth-of-type(3) {
    animation-delay: 0.4s;
}

@keyframes thinking {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    40% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.chat-separator {
    text-align: center;
    margin: 20px 0;
    color: #666;
    font-size: 0.9rem;
}

.chat-separator hr {
    border: none;
    border-top: 1px solid #e0e3ef;
    margin: 10px 0;
}

.chat-separator small {
    background: #f7f8fc;
    padding: 0 15px;
    color: #888;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.close-btn {
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.modal-body {
    padding: 0;
    max-height: calc(80vh - 120px);
    overflow-y: auto;
}

/* History Items */
.history-item {
    padding: 20px 28px;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.history-item:hover {
    background-color: #f9fafb;
}

.history-item:last-child {
    border-bottom: none;
}

.history-prompt {
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    line-height: 1.5;
}

.history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.history-timestamp {
    font-size: 0.85rem;
    color: #6b7280;
}

.show-response-btn {
    background: #6c7ae0;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.show-response-btn:hover {
    background: #5a6bd8;
    transform: translateY(-1px);
}

.history-response {
    margin-top: 12px;
    padding: 16px;
    background: #f8faff;
    border-left: 3px solid #6c7ae0;
    border-radius: 0 8px 8px 0;
    line-height: 1.6;
    color: #374151;
}

.history-response h1,
.history-response h2,
.history-response h3 {
    color: #4b3cc6;
    margin-top: 16px;
    margin-bottom: 8px;
}

.history-response h1 { font-size: 18px; }
.history-response h2 { font-size: 16px; }
.history-response h3 { font-size: 14px; }

.history-response p {
    margin: 8px 0;
}

.history-response ul,
.history-response ol {
    margin: 8px 0;
    padding-left: 20px;
}

.history-response li {
    margin: 4px 0;
}

.history-response code {
    background-color: #f1f5f9;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    border: 1px solid #e2e8f0;
    font-size: 85%;
}

.empty-history {
    text-align: center;
    padding: 60px 28px;
    color: #6b7280;
}

.empty-history svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 900px) {
    .cards {
        gap: 16px;
    }
    .chat-section {
        padding: 0 0 12px 0;
    }
    .chat-header, .chat-messages, .quick-actions, .chat-input-row {
        padding-left: 12px;
        padding-right: 12px;
    }
    .chat-header-row {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .chat-controls {
        width: 100%;
        justify-content: center;
    }
    
    .chat-btn {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .history-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .show-response-btn {
        align-self: flex-start;
    }
}
