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

body {
    font-family: 'Play', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #507DBC 0%, #A1C6EA 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #04080F 0%, #507DBC 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    opacity: 0.95;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.header-description {
    opacity: 0.9;
    font-size: 1rem;
    font-style: italic;
    margin-top: 0.5rem;
}

.main-content {
    padding: 2rem;
}

.chat-container {
    min-height: auto;
    max-height: fit-content;
    overflow-y: visible;
    border: 2px solid #eee;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: #f9f9f9;
}

.welcome-message {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.welcome-message h2 {
    color: #507DBC;
    margin-bottom: 1rem;
    font-weight: 700;
}

.welcome-message ul {
    list-style: none;
    margin: 1rem 0;
}

.subscription-info {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(80, 125, 188, 0.1) 0%, rgba(161, 198, 234, 0.1) 100%);
    border-radius: 12px;
    border: 2px solid #A1C6EA;
}

.subscription-info h3 {
    color: #507DBC;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.subscription-info p {
    margin-bottom: 0.8rem;
    color: #333;
}

.topics-list {
    list-style: none;
    margin: 1rem 0;
    text-align: left;
    display: inline-block;
}

.topics-list li {
    padding: 0.3rem 0;
    color: #507DBC;
    font-weight: 600;
}

.topics-list li:before {
    content: "✓ ";
    color: #507DBC;
    font-weight: bold;
    margin-right: 0.5rem;
}

.session-note {
    font-size: 0.85rem;
    font-style: italic;
    color: #666;
    margin-top: 1rem;
}

.learn-more-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #507DBC 0%, #A1C6EA 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.learn-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(80, 125, 188, 0.4);
}

.message {
    margin-bottom: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 18px;
    max-width: 85%;
}

.user-message {
    background: linear-gradient(135deg, #507DBC 0%, #A1C6EA 100%);
    color: white;
    margin-left: auto;
    text-align: right;
}

.bot-message {
    background: white;
    color: #333;
    border: 2px solid #eee;
    line-height: 1.6;
}

.bot-message p {
    margin: 0.8rem 0;
}

.bot-message p:first-child {
    margin-top: 0;
}

.bot-message p:last-child {
    margin-bottom: 0;
}

.bot-message .list-item {
    margin: 0.5rem 0;
    padding-left: 1rem;
}

.bot-message .section-header {
    font-weight: 700;
    color: #507DBC;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.bot-message .section-header:first-child {
    margin-top: 0;
}

.bot-message strong {
    color: #04080F;
    font-weight: 700;
}

.sources-message {
    background: #f0f9ff;
    color: #555;
    border: 1px solid #bfdbfe;
    font-size: 0.9rem;
}

.sources-message a {
    color: #507DBC;
    text-decoration: none;
    font-weight: 600;
}

.error-message {
    background: #fee2e2;
    color: #dc2626;
}

.loading {
    opacity: 0.6;
    font-style: italic;
}

.input-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#questionInput {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #507DBC;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    font-family: 'Play', sans-serif;
}

#sendBtn {
    padding: 1.2rem 2.5rem;
    background: linear-gradient(135deg, #507DBC 0%, #A1C6EA 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Play', sans-serif;
    transition: transform 0.2s, box-shadow 0.2s;
}

#sendBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(80, 125, 188, 0.4);
}

#sendBtn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.examples {
    text-align: center;
    margin-bottom: 1.5rem;
}

.example-btn {
    margin: 0.5rem;
    padding: 1rem 2rem;
    background: white;
    border: 2px solid #DAE3E5;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Play', sans-serif;
}

.example-btn:hover {
    background: linear-gradient(135deg, #507DBC 0%, #A1C6EA 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(80, 125, 188, 0.3);
}

.footer {
    background: #04080F;
    color: #DAE3E5;
    border-top: 1px solid #507DBC;
    padding: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

.support-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #507DBC;
}

.support-text {
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.payment-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.subscription-links {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
}

.subscription-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #507DBC 0%, #A1C6EA 100%);
    border-radius: 50%;
    text-decoration: none;
    font-size: 2rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.subscription-icon:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 20px rgba(80, 125, 188, 0.6);
}

.support-btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    background: linear-gradient(135deg, #507DBC 0%, #A1C6EA 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.support-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(80, 125, 188, 0.5);
}

.author-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #507DBC;
}

.author-section p {
    margin: 0;
    line-height: 1.6;
}

.author-section a {
    color: #A1C6EA;
    text-decoration: none;
    font-weight: 600;
}

.author-section a:hover {
    color: #BBD1EA;
    text-decoration: underline;
}

.powered-by {
    color: #DAE3E5;
    font-size: 0.9rem;
}

.disclaimer {
    margin-top: 0.5rem;
    font-style: italic;
    color: #f59e0b;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #DAE3E5;
    border-top: 4px solid #507DBC;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 16px;
    }

    .header {
        padding: 1.5rem 1rem;
    }

    .header h1 {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .header-description {
        font-size: 0.9rem;
    }

    .main-content {
        padding: 1.5rem 1rem;
    }

    .chat-container {
        min-height: auto;
        max-height: fit-content;
        overflow-y: visible;
        padding: 1rem;
    }

    .welcome-message {
        padding: 1rem;
    }

    .welcome-message h2 {
        font-size: 1.3rem;
    }

    .subscription-info {
        padding: 1rem;
        margin-top: 1.5rem;
    }

    .subscription-info h3 {
        font-size: 1.1rem;
    }

    .topics-list {
        font-size: 0.9rem;
    }

    .learn-more-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .message {
        max-width: 90%;
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }

    .input-container {
        flex-direction: column;
        gap: 0.8rem;
    }

    #questionInput {
        width: 100%;
        padding: 0.9rem 1.2rem;
        font-size: 0.95rem;
    }

    #sendBtn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }

    .examples {
        margin-bottom: 1rem;
    }

    .example-btn {
        margin: 0.4rem;
        padding: 0.8rem 1.3rem;
        font-size: 0.9rem;
    }

    .footer {
        padding: 1.5rem 1rem;
    }

    .support-section {
        margin-bottom: 1.2rem;
        padding-bottom: 1.2rem;
    }

    .support-text {
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
    }

    .support-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }

    .subscription-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.6rem;
        font-size: 0.85rem;
    }

    .subscription-links span {
        width: 100%;
        text-align: center;
        margin-bottom: 0.3rem;
    }

    .subscription-icon {
        width: 55px;
        height: 55px;
        font-size: 1.8rem;
    }

    .author-section {
        margin-bottom: 1.2rem;
        padding-bottom: 1.2rem;
    }

    .author-section p {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .powered-by {
        font-size: 0.8rem;
    }

    .loading-overlay p {
        font-size: 0.9rem;
        padding: 0 1rem;
    }
}