/* Base styles */
:root {
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --heading-color: #1a3a6c;
    --accent-color: #2c5282;
    --border-color: #dee2e6;
    --card-bg: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius: 12px;
    --chat-bg: #f0f4f8;
    --user-msg-bg: #2c5282;
    --user-msg-color: white;
    --bot-msg-bg: #e9ecef;
    --bot-msg-color: #212529;
}


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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

.text-block {
    width: 60%;
    margin: 0 auto;
    text-align: left;
    padding: 10px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-new {
    display: flex;
    gap: 20px;
    max-width: 900px;
    margin: 0px auto;
    padding: 20px;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.image-column {
    flex: 0 0 40%;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
}

.text-column {
    flex: 1;
    padding: 10px;
    line-height: 1.6;
}

.image-column img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

@media (max-width: 600px) {
    .container-new {
        flex-direction: column;
    }

    .image-column {
        flex-basis: auto;
        width: 100%;
        height: 200px;
    }
}

header {
    text-align: center;
    padding: 3rem 0 2rem;
}

header h1 {
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.authors {
    font-size: 1.1rem;
    color: #6c757d;
    font-style: italic;
}

main {
    padding: 1rem 0 3rem;
}

section {
    margin-bottom: 2.5rem;
}

h2 {
    color: var(--heading-color);
    font-weight: 600;
    font-size: 2.2rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

h3 {
    color: var(--heading-color);
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

p {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.examples-section {
    padding: 0 0 0;
}

.examples-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.examples-section h2::after {
    left: 50%;
    transform: translateX(-50%);
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.example-btn {
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.example-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.btn-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
    justify-content: space-between;
    display: flex;
    align-items: center;/
}

.btn-title img {
    vertical-align: middle;
}

.btn-desc {
    font-size: 0.95rem;
    color: #6c757d;
    flex-grow: 1;
}

.img-container {
    text-align: center;
}

.img-container img {
    max-width: 100%;
    height: auto;
}

/* Footer styles */
footer {
    text-align: center;
    padding: 2rem 0;
    color: #6c757d;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
}

/* Chat-style modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.3s ease;
}

.chat-container {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--accent-color);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.chat-title {
    margin: 0;
    font-size: 1.5rem;
    color: white;
}

.close-btn {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.close-btn:hover {
    color: #e9ecef;
}

.chat-messages {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    background-color: var(--chat-bg);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 80%;
    padding: 1rem;
    border-radius: 18px;
    line-height: 1.5;
    position: relative;
    animation: fadeIn 0.3s ease;
    display: flex;
    gap: 0.75rem;
}

.user-message {
    align-self: flex-end;
    background-color: var(--user-msg-bg);
    color: var(--user-msg-color);
    border-bottom-right-radius: 4px;
}

.bot-message {
    align-self: flex-start;
    background-color: var(--bot-msg-bg);
    color: var(--bot-msg-color);
    border-bottom-left-radius: 4px;
}

.message-header {
    font-weight: bold;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.message-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.user-icon {
    background: linear-gradient(135deg, #2c5282, #1a3a6c);
    color: white;
}

.bot-icon {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.message-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.message-content-wrapper {
    flex: 1;
}

.message-content {
    font-size: 16px;
    white-space: pre-wrap;
    font-family: inherit;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-left: 0.5rem;
}

.code-block {
    background-color: #2d2d2d;
    color: #f8f8f2;
    border-radius: 8px;
    padding: 1rem;
    margin: 0.5rem 0;
    overflow-x: auto;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--card-bg);
}

.chat-input input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input input:focus {
    border-color: var(--accent-color);
}

.chat-input button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 500;
    margin-left: 0.5rem;
    transition: var(--transition);
}

.chat-input button:hover {
    background-color: #1a3a6c;
}


.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 50px auto;
}

pre {
    background-color: #f8f9fa;
    border: 1px solid #f8f9fa;
    padding: 15px;
    margin: 5px 0;
    border-radius: 5px;
    overflow-x: auto !important;
    white-space: pre-wrap;
    word-wrap: break-word;
}

code {
    font-size: 1.2em;
    color: black !important;
}

.grid-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 20px;
    text-align: center;
    font-size: 1.1em;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
}

.grid-item h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.5em;
}

.grid-item p {
    color: #555;
    line-height: 1.6;
}

.grid-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-color: #a0d0ed;
    cursor: pointer;
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

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

/* Responsive design */
@media (max-width: 992px) {
    .examples-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .examples-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 1rem;
    }

    header {
        padding: 2rem 0 1.5rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .chat-container {
        width: 95%;
        height: 90vh;
    }

    .message {
        max-width: 90%;
    }
}