body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #ffffff;
    margin: 0;
    color: #333333;
    background-attachment: fixed;
    overflow-x: hidden;
    overflow-y: auto;
}

.chat-container {
    width: 100%;
    max-width: 1200px;
    flex-grow: 1;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 10px 15px;
    box-sizing: border-box;
    height: calc(100vh - 60px);
}

.chat-box {
    flex-grow: 1;
    padding: 16px;
    overflow-y: auto;
    max-height: calc(100vh - 180px);
    height: calc(100vh - 180px);
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin: 15px 0;
    margin-top: 45px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.message {
    margin-bottom: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.6;
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

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

.user-message {
    align-self: flex-end;
    margin-left: auto;
    background: #ff8c00;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-bottom-right-radius: 0;
}

.ai-message {
    align-self: flex-start;
    margin-right: auto;
    background: #f5f5f5;
    color: #333333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-bottom-left-radius: 0;
}

.input-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.input-area {
    display: flex;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
}

.input-group {
    position: relative;
    flex-grow: 1;
    margin-right: 12px;
    width: 100%;
}

.input-area input[type="text"] {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: #f9f9f9;
    color: #333333;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    box-sizing: border-box;
}

.media-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    color: #666;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: all 0.2s ease;
}

.input-area button#send-button {
    padding: 14px 22px;
    background: #ff8c00;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.input-area button#send-button:hover {
    background: #ff9d2f;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.input-area button#send-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.model-selection-area {
    display: none;
}

.selected-model-container {
    display: flex;
    align-items: center;
    padding: 4px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 4px 10px;
}

.model-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

.selected-model {
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
    cursor: pointer;
}

.model-select-button-header {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 0.7rem;
    padding: 0 0 0 4px;
    margin-left: 4px;
}

.intro-animation {
    display: none;
}

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.notification {
    background: #333;
    color: white;
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 350px;
    opacity: 0.9;
    animation: slideIn 0.3s ease-out;
}

.notification.fade-out {
    animation: fadeOut 0.3s forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 0.9; }
}

@keyframes fadeOut {
    from { opacity: 0.9; }
    to { opacity: 0; }
}

.model-select-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: linear-gradient(to bottom, #ffffff, #f5f5f5);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.model-select-button:hover {
    background: linear-gradient(to bottom, #ffffff, #f0f0f0);
    border-color: rgba(255, 140, 0, 0.4);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.model-select-label {
    font-weight: 600;
    color: #555;
}

.selected-model {
    color: #ff8c00;
    font-weight: 600;
}

.model-select-icon {
    margin-left: 10px;
    font-size: 0.8rem;
    color: #ff8c00;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 28px;
    background: linear-gradient(to right, #ff8c00, #ffaa44);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-header h2 {
    font-size: 1.6rem;
    margin: 0;
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 20px;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-body {
    padding: 28px;
    overflow-y: auto;
    max-height: calc(90vh - 90px);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    background-color: #fafafa;
}

.model-card {
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 22px;
    transition: all 0.25s ease;
    cursor: pointer;
    background: #ffffff;
    position: relative;
    overflow: visible;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.model-card:hover {
    border-color: rgba(255, 140, 0, 0.4);
    background: #fff;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.model-card.selected {
    border-color: #ff8c00;
    background: rgba(255, 140, 0, 0.05);
    box-shadow: 0 6px 18px rgba(255, 140, 0, 0.15);
}

.model-card.selected::before {
    content: "✓";
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff8c00;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.model-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.model-card-title {
    font-weight: 600;
    font-size: 1.2rem;
    color: #333;
    margin: 0;
}

.model-card-provider {
    font-size: 0.85rem;
    color: #fff;
    background: #ff8c00;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.model-card-description {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
    flex-grow: 1;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

.model-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-badge {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.06);
    color: #555;
}

.feature-badge.active {
    background: rgba(255, 140, 0, 0.15);
    color: #d67600;
}

pre.code-block {
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
    overflow-x: auto;
    position: relative;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #ccc;
    max-width: 100%;
}

.code-block.language {
    padding-top: 36px;
}

.code-language-label {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 10px;
    font-size: 0.8rem;
    color: #ddd;
    border-top-left-radius: 5px;
    border-bottom-right-radius: 5px;
    font-family: 'Poppins', sans-serif;
}

.copy-code-button {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255, 140, 0, 0.2);
    border: 1px solid rgba(255, 140, 0, 0.4);
    color: #ff8c00;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 4px;
}

.copy-code-button:hover {
    background: rgba(255, 140, 0, 0.3);
    border-color: rgba(255, 140, 0, 0.6);
}

.copy-code-button.copied {
    background: rgba(39, 174, 96, 0.2);
    border-color: rgba(39, 174, 96, 0.4);
    color: #27ae60;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #999;
}

.token.punctuation {
    color: #ccc;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol {
    color: #f8c555;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin {
    color: #b5bd68;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.token.variable,
.token.inserted {
    color: #8abeb7;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #cc99cc;
}

.token.regex,
.token.important {
    color: #f08d49;
}

.token.important,
.token.bold {
    font-weight: bold;
}

.token.italic {
    font-style: italic;
}

.token.entity {
    cursor: help;
}

.token.deleted {
    color: #f55;
}

code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 4px;
    border-radius: 3px;
}

pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 15px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: black;
    z-index: 5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 40px;
    box-sizing: border-box;
}

.header-spacer {
    width: 150px;
}

.model-selection-header {
    width: 150px;
}

.logo {
    height: 55px;
    width: auto;
    transition: all 0.2s ease;
    position: relative;
    top: 8px;
    margin: 0 auto;
}

.footer {
    text-align: center;
    padding: 15px 0;
    background-color: black;
    color: #fff;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 12px;
}

.social-link {
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
}

.social-link:hover {
    color: #ff8c00;
    background: rgba(255, 140, 0, 0.2);
    transform: translateY(-2px);
}

.media-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.preview-wrapper {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#image-preview-wrapper {
    width: 200px;
}

#image-preview-wrapper img {
    width: 100%;
    display: block;
}

.remove-media-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    z-index: 2;
}

.welcome-message {
    padding: 16px;
    background: rgba(255, 140, 0, 0.05);
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 140, 0, 0.2);
}

.welcome-message h2 {
    color: #333;
    margin-top: 0;
    margin-bottom: 12px;
}

.welcome-message ul {
    padding-left: 18px;
    margin: 12px 0;
}

.welcome-message li {
    margin-bottom: 6px;
    color: #444;
}

.orange-text {
    color: #ff8c00;
}

.text-content {
    line-height: 1.6;
    white-space: pre-wrap;
}

.ai-message .text-content {
    margin-bottom: 8px;
}

.ai-message .text-content:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .chat-container {
        padding: 8px 10px;
        height: calc(100vh - 60px);
    }
    
    .model-selection-header {
        width: 110px;
    }
    
    .header-spacer {
        width: 110px;
    }
    
    .selected-model {
        font-size: 0.7rem;
    }
    
    .logo {
        height: 45px;
        top: 6px;
    }
    
    .chat-box {
        margin-top: 40px;
        max-height: calc(100vh - 160px);
        height: calc(100vh - 160px);
        padding: 12px;
    }
    
    .input-area {
        padding: 10px 12px;
    }
    
    .input-area input[type="text"] {
        padding: 10px 36px 10px 12px;
        font-size: 0.95rem;
    }
    
    .input-area button#send-button {
        padding: 10px 16px;
        font-size: 0.95rem;
    }
    
    .message {
        padding: 10px 14px;
        margin-bottom: 12px;
        max-width: 90%;
    }
    
    .welcome-message {
        padding: 12px;
    }
    
    .welcome-message h2 {
        font-size: 1.3rem;
    }
    
    .welcome-message p, .welcome-message li {
        font-size: 0.9rem;
    }
    
    .modal-content {
        max-height: 85vh;
        width: 95%;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .chat-box {
        margin-top: 40px;
        max-height: calc(100vh - 150px);
        height: calc(100vh - 150px);
        padding: 10px;
    }
    
    .model-selection-header {
        width: 90px;
    }
    
    .header-spacer {
        width: 90px;
    }
    
    .selected-model {
        font-size: 0.65rem;
    }
    
    .message {
        max-width: 95%;
    }
    
    .input-group {
        margin-right: 8px;
    }
    
    .input-area {
        gap: 8px;
        padding: 10px;
    }
    
    .input-area button#send-button {
        padding: 10px 14px;
        white-space: nowrap;
    }
    
    .footer {
        font-size: 0.8rem;
        padding: 12px 10px;
    }
    
    .social-links {
        gap: 15px;
        margin-top: 10px;
    }
    
    .social-link {
        font-size: 1rem;
        width: 32px;
        height: 32px;
    }
}