.roblox-loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    animation: robloxRotate 2s linear infinite, glowPulse 2s ease infinite;
    background-image: url('../noob.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

@keyframes robloxRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    animation: robloxRotate 2s linear infinite;
    background-image: url('../noob.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.ai-thinking {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.7rem 1rem;
    background: rgba(13, 17, 23, 0.95);
    border-left: 2px solid #58a6ff;
    border-radius: 6px;
    margin: 0.5rem 1rem;
    animation: fadeIn 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    position: relative;
    max-width: fit-content;
}

.ai-thinking-text {
    color: #c9d1d9;
    font-size: 0.85rem;
    font-weight: 500;
}

.ai-status-item {
    color: #8b949e;
    font-size: 0.8rem;
    font-weight: 400;
    padding-left: 0.5rem;
    animation: slideIn 0.2s ease;
}

.ai-status-item.success {
    color: #57f287;
}

.ai-status-item::before {
    content: '→ ';
    color: #58a6ff;
    font-weight: 600;
}

.ai-status-item.success::before {
    content: '✓ ';
    color: #57f287;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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


.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    width: 100%;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    min-height: 0;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.messages-container.disconnected {
    filter: blur(3px);
    opacity: 0.4;
    pointer-events: none;
}

.input-container {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: none;
    padding: 1.5rem;
    width: 100%;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    position: relative;
    animation: slideInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
}

.input-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: transparent;
    animation: none;
}

.input-wrapper {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.input-wrapper:focus-within {
    border-color: rgba(88, 166, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1),
                0 10px 40px rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
}

.input-wrapper.drag-active {
    border-color: #58a6ff;
    background: rgba(88, 166, 255, 0.05);
}

.plugin-required-popup {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(248, 81, 73, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(248, 81, 73, 0.4);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 32px rgba(248, 81, 73, 0.3);
    z-index: 1000;
    animation: slideUpFadeIn 0.3s ease;
    white-space: nowrap;
    pointer-events: auto;
}

.popup-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #f0f6fc;
}

.popup-content i {
    font-size: 1.2rem;
    color: #f85149;
}

.popup-content span {
    font-size: 0.95rem;
    font-weight: 500;
}

.get-plugin-btn {
    background: linear-gradient(135deg, #58a6ff, #1f6feb);
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    margin-left: 0.5rem;
}

.get-plugin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(88, 166, 255, 0.4);
}

.input-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.input-row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    width: 100%;
}

.input-area {
    flex: 1;
    background: transparent;
    border: none;
    color: #f0f6fc;
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    outline: none;
    min-height: 24px;
    max-height: 120px;
    line-height: 1.5;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.input-area::placeholder {
    color: #8b949e;
}

.input-area[contenteditable]:empty:before {
    content: attr(data-placeholder);
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    display: inline-block;
}

.input-area .mention-input {
    background: rgba(0, 255, 255, 0.15);
    color: #00ffff;
    padding: 1px 3px;
    border-radius: 4px;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

.mention-autocomplete {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    margin-bottom: 8px;
    background: rgba(22, 27, 34, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(88, 166, 255, 0.3);
    border-radius: 12px;
    max-height: 300px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    animation: slideUpFadeIn 0.2s ease;
}

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

.mention-autocomplete-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(88, 166, 255, 0.2);
    background: rgba(88, 166, 255, 0.05);
}

.mention-autocomplete-icon {
    font-size: 1.2rem;
}

.mention-autocomplete-title {
    color: #58a6ff;
    font-weight: 600;
    font-size: 0.9rem;
}

.mention-autocomplete-list {
    max-height: 240px;
    overflow-y: auto;
    padding: 4px;
}

.mention-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: #f0f6fc;
}

.mention-autocomplete-item:hover,
.mention-autocomplete-item.selected {
    background: rgba(88, 166, 255, 0.15);
    border-left: 3px solid #58a6ff;
    padding-left: 9px;
}

.mention-autocomplete-item-icon {
    font-size: 1.1rem;
    min-width: 20px;
    text-align: center;
}

.mention-autocomplete-item-name {
    font-weight: 500;
    flex: 1;
}

.mention-autocomplete-item-path {
    font-size: 0.75rem;
    color: #8b949e;
    font-family: 'Courier New', monospace;
}

.mention-autocomplete-empty {
    padding: 20px;
    text-align: center;
    color: #8b949e;
    font-size: 0.9rem;
}

.mention-autocomplete-empty-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: 0.5;
}

.attach-button {
    background: transparent;
    border: none;
    color: #8b949e;
    padding: 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    min-width: 36px;
    height: 36px;
    flex-shrink: 0;
    position: relative;
}

.attach-button:hover {
    background: rgba(88, 166, 255, 0.1);
    color: #58a6ff;
    transform: rotate(-5deg) scale(1.1);
}

.attach-button:active {
    transform: rotate(-5deg) scale(0.95);
}

.model-button {
    background: transparent;
    border: none;
    color: #8b949e;
    padding: 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.model-button:hover {
    background: rgba(88, 166, 255, 0.1);
    color: #58a6ff;
    transform: scale(1.1);
}

.model-button:active {
    transform: scale(0.95);
}

.streaming-cursor {
    animation: blink 1s infinite;
    color: #58a6ff;
    font-weight: bold;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.model-dropdown {
    position: absolute;
    bottom: 100%;
    left: 50px;
    margin-bottom: 10px;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    min-width: 200px;
    animation: dropdownSlide 0.3s ease;
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.model-dropdown-header {
    color: #8b949e;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
}

.model-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.model-option:hover:not(.disabled) {
    background: rgba(88, 166, 255, 0.1);
    transform: translateX(5px);
}

.model-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.model-option .model-check {
    color: #3fb950;
    font-size: 0.9rem;
    display: none;
}

.model-option.selected .model-check {
    display: block;
}

.model-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.model-name {
    color: #e1e4e8;
    font-size: 0.9rem;
    font-weight: 500;
}

.model-badge {
    background: linear-gradient(45deg, #58a6ff, #1f6feb);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.model-option.premium .model-badge {
    background: linear-gradient(45deg, #9d4edd, #7c3aed);
}

.model-option.disabled .model-badge {
    background: linear-gradient(45deg, #6e7681, #484f58);
}

.token-estimation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: rgba(13, 17, 23, 0.6);
    border: 1px solid rgba(134, 239, 172, 0.3);
    border-radius: 8px;
    font-size: 0.8rem;
    color: #86efac;
    font-weight: 500;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.token-estimation.warning {
    border-color: rgba(251, 191, 36, 0.5);
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.token-estimation.error {
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
}

.token-icon {
    font-size: 0.9rem;
}

.token-text {
    font-weight: 600;
}

.token-warning {
    color: #f87171;
    font-weight: 600;
    font-size: 0.75rem;
}

.send-button {
    background: linear-gradient(135deg, #58a6ff, #1f6feb);
    border: none;
    border-radius: 12px;
    color: white;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 36px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.send-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.send-button:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(88, 166, 255, 0.4),
                0 0 30px rgba(88, 166, 255, 0.2);
}

.send-button:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

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

.message {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation-fill-mode: forwards;
}

.message:nth-child(1) { animation-delay: 0.05s; }
.message:nth-child(2) { animation-delay: 0.1s; }
.message:nth-child(3) { animation-delay: 0.15s; }
.message:nth-child(4) { animation-delay: 0.2s; }
.message:nth-child(5) { animation-delay: 0.25s; }

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    margin-top: 0.25rem; 
}

.message-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.message-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(45deg, #58a6ff, #1f6feb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    position: absolute;
    top: 0;
    left: 0;
}

.message-avatar-ai .message-avatar-fallback {
    background: linear-gradient(45deg, #00d4ff, #9d4edd);
    font-size: 1.1rem;
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.user .message-avatar {
    background: linear-gradient(45deg, #58a6ff, #1f6feb);
    color: white;
}

.assistant .message-avatar {
    background: linear-gradient(45deg, #00d4ff, #9d4edd);
    color: white;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-text {
    background: rgba(22, 27, 34, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.2rem;
    line-height: 1.6;
    word-wrap: break-word;
    transition: all 0.3s ease;
    position: relative;
}

.message-text:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.user .message-text {
    background: linear-gradient(135deg, #0969da, #1f6feb);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(9, 105, 218, 0.3);
}

.user .message-text:hover {
    box-shadow: 0 6px 25px rgba(9, 105, 218, 0.4);
}

.mention {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.25), rgba(88, 166, 255, 0.2));
    color: #58a6ff;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 700;
    border: 1px solid rgba(88, 166, 255, 0.4);
    transition: all 0.2s ease;
    display: inline-block;
    text-shadow: 0 0 8px rgba(88, 166, 255, 0.3);
}

.mention:hover {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.35), rgba(88, 166, 255, 0.25));
    border-color: rgba(88, 166, 255, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(88, 166, 255, 0.3);
}

.user .message-text .mention {
    background: rgba(0, 255, 255, 0.2);
    color: #00ffff;
    border: 1px solid rgba(0, 255, 255, 0.5);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
    font-weight: 700;
    animation: mentionDetected 0.5s ease;
}

.user .message-text .mention:hover {
    background: rgba(0, 255, 255, 0.3);
    border-color: rgba(0, 255, 255, 0.7);
    box-shadow: 0 2px 12px rgba(0, 255, 255, 0.4);
}

@keyframes mentionDetected {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(0, 255, 255, 0);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(0, 255, 255, 0);
    }
}

.file-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #30363d;
}

.file-attachment {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    max-width: 200px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.file-attachment:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(88, 166, 255, 0.4);
    box-shadow: 0 4px 16px rgba(88, 166, 255, 0.2);
}

.file-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    color: #f0f6fc;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    color: #8b949e;
    font-size: 0.75rem;
}

.file-remove {
    background: none;
    border: none;
    color: #8b949e;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.file-remove:hover {
    background: rgba(248, 81, 73, 0.2);
    color: #f85149;
}

.file-attachment.image {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
}

.file-attachment.code {
    background: rgba(157, 78, 221, 0.1);
    border-color: rgba(157, 78, 221, 0.3);
}

.file-preview {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.drag-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 12px;
    border: 2px dashed #58a6ff;
    margin: 1.5rem;
}

.drag-content {
    text-align: center;
    pointer-events: none;
}

.drag-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.drag-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #58a6ff;
    margin-bottom: 0.5rem;
}

.drag-subtext {
    color: #8b949e;
    font-size: 0.9rem;
}

@media (min-width: 1200px) {
    .input-wrapper {
        max-width: 900px; 
    }
    
    .message {
        max-width: 900px;
    }
}

@media (min-width: 1600px) {
    .input-wrapper {
        max-width: 1000px;
    }
    
    .message {
        max-width: 1000px;
    }
}

@media (max-width: 768px) {
    .input-container {
        justify-content: stretch; 
        padding: 1rem;
    }

    .input-wrapper {
        max-width: none; 
    }

    .messages-container {
        padding: 1rem;
    }

    
    .code-panel-overlay {
        width: 100%;
    }

    .main-content.code-panel-active {
        margin-right: 0;
        display: none; 
    }
}

.message.assistant .message-text {
    line-height: 1.6;
}

.code-panel-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50%;
    background: rgba(13, 17, 23, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid rgba(88, 166, 255, 0.3);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
    z-index: 1001; 
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.code-panel-overlay.active {
    transform: translateX(0);
}

.code-panel-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: ew-resize;
    z-index: 10;
    transition: background 0.2s ease;
}

.code-panel-resize-handle:hover,
.code-panel-resize-handle.resizing {
    background: rgba(88, 166, 255, 0.5);
}

.code-panel-resize-handle::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 40px;
    background: rgba(88, 166, 255, 0.3);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.code-panel-resize-handle:hover::before {
    opacity: 1;
}

.code-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(22, 27, 34, 0.8);
}

.code-panel-title {
    color: #f0f6fc;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-panel-close {
    background: transparent;
    border: none;
    color: #8b949e;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.code-panel-close:hover {
    background: rgba(248, 81, 73, 0.1);
    color: #f85149;
    transform: rotate(90deg);
}

.code-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.main-content.code-panel-active {
    margin-right: 50%;
    transition: margin-right 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.code-artifact-box {
    margin: 1rem 0;
    padding: 1rem 1.25rem;
    background: rgba(88, 166, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(88, 166, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: fadeIn 0.5s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.code-artifact-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(88, 166, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.code-artifact-box:hover {
    background: rgba(88, 166, 255, 0.12);
    border-color: rgba(88, 166, 255, 0.5);
    box-shadow: 0 8px 24px rgba(88, 166, 255, 0.2);
    transform: translateY(-2px);
}

.code-artifact-box:hover::before {
    left: 100%;
}

.code-artifact-box:active {
    transform: translateY(0);
}

.artifact-icon {
    width: 40px;
    height: 40px;
    background: rgba(88, 166, 255, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #58a6ff;
    flex-shrink: 0;
}

.artifact-content {
    flex: 1;
    min-width: 0;
}

.artifact-title {
    color: #f0f6fc;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.artifact-meta {
    color: #8b949e;
    font-size: 0.85rem;
}

.artifact-arrow {
    color: #8b949e;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.code-artifact-box:hover .artifact-arrow {
    transform: translateX(4px);
    color: #58a6ff;
}

.code-artifact-box.streaming {
    cursor: default;
    animation: pulse 2s ease-in-out infinite;
}

.code-artifact-box.streaming:hover {
    transform: none;
}

@keyframes pulse {
    0%, 100% {
        border-color: rgba(88, 166, 255, 0.3);
    }
    50% {
        border-color: rgba(88, 166, 255, 0.6);
    }
}

.object-list-item,
.code-list-item {
    margin: 0.5rem 0;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: rgba(88, 166, 255, 0.05);
    border-left: 3px solid rgba(88, 166, 255, 0.4);
    border-radius: 6px;
    color: #e6edf3;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: all 0.2s ease;
    position: relative;
}

.object-list-item::before {
    content: '📦';
    position: absolute;
    left: 0.75rem;
    font-size: 1rem;
}

.code-list-item::before {
    content: '📝';
    position: absolute;
    left: 0.75rem;
    font-size: 1rem;
}

.object-list-item:hover,
.code-list-item:hover {
    background: rgba(88, 166, 255, 0.08);
    border-left-color: rgba(88, 166, 255, 0.6);
    transform: translateX(3px);
}

.object-list-item strong,
.code-list-item strong {
    color: #58a6ff;
    font-weight: 600;
}

.streaming-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.streaming-dots span {
    width: 6px;
    height: 6px;
    background: #58a6ff;
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.streaming-dots span:nth-child(1) {
    animation-delay: 0s;
}

.streaming-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.streaming-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.code-block-container {
    margin: 1rem 0;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.code-block-container:hover {
    box-shadow: 0 5px 20px rgba(88, 166, 255, 0.1);
    border-color: rgba(88, 166, 255, 0.3);
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #161b22;
    border-bottom: 1px solid #30363d;
}

.code-language {
    color: #58a6ff;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.copy-code-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(88, 166, 255, 0.05);
    border: 1px solid rgba(88, 166, 255, 0.2);
    color: #8b949e;
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.copy-code-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(88, 166, 255, 0.3), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.copy-code-btn:hover {
    background: rgba(88, 166, 255, 0.15);
    border-color: #58a6ff;
    color: #58a6ff;
    transform: translateY(-1px);
}

.copy-code-btn:hover::before {
    width: 200px;
    height: 200px;
}

.copy-code-btn svg {
    width: 14px;
    height: 14px;
}

.code-block {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    background: #0d1117;
}

.code-block code {
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    color: #e6edf3;
    line-height: 1.5;
}

.inline-code {
    background: rgba(88, 166, 255, 0.1);
    color: #58a6ff;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

.md-h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem 0;
    color: #f0f6fc;
    border-bottom: 1px solid #30363d;
    padding-bottom: 0.5rem;
}

.md-h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0.8rem 0 0.4rem 0;
    color: #f0f6fc;
}

.md-h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.6rem 0 0.3rem 0;
    color: #8b949e;
}

.md-list {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.md-list li {
    margin: 0.25rem 0;
    color: #e6edf3;
}

.message-text strong {
    font-weight: 600;
    color: #f0f6fc;
}

.message-text em {
    font-style: italic;
    color: #8b949e;
}

.message-text u {
    text-decoration: underline;
    text-decoration-color: #58a6ff;
    text-underline-offset: 2px;
}

.message-text del {
    text-decoration: line-through;
    color: #6e7681;
}

.message-text a {
    color: #58a6ff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.message-text a:hover {
    border-bottom-color: #58a6ff;
}

.code-block.javascript code,
.code-block.js code {
    color: #f1fa8c;
}

.code-block.lua code {
    color: #bd93f9;
}

.code-block.python code,
.code-block.py code {
    color: #50fa7b;
}

.code-block.html code,
.code-block.xml code {
    color: #ff79c6;
}

.code-block.css code {
    color: #8be9fd;
}

.no-chats {
    color: #6e7681;
    font-size: 0.85rem;
    text-align: center;
    padding: 1rem;
    font-style: italic;
}

.chat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    margin: 0.25rem 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.chat-item:hover {
    background: rgba(88, 166, 255, 0.1);
}

.chat-item.active {
    background: rgba(88, 166, 255, 0.15);
    border-left: 3px solid #58a6ff;
}

.chat-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.chat-title {
    font-size: 0.9rem;
    color: #f0f6fc;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.2rem;
}

.chat-date {
    font-size: 0.75rem;
    color: #8b949e;
}

.chat-delete {
    background: transparent;
    border: none;
    color: #6e7681;
    padding: 0.25rem;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.chat-item:hover .chat-delete {
    opacity: 1;
}

.chat-delete:hover {
    background: rgba(248, 81, 73, 0.2);
    color: #f85149;
}

.welcome-message {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 2.5rem;
    margin: 2rem auto;
    max-width: 700px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.welcome-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #58a6ff, #7c3aed, #ec4899);
}

.welcome-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.welcome-icon {
    width: 150px;
    height: 150px;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: none;
    animation: welcomePulse 3s ease-in-out infinite;
}

@keyframes welcomePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.welcome-title h2 {
    font-size: 1.8rem;
    color: #f0f6fc;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #f0f6fc, #58a6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    color: #8b949e;
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
}

.welcome-description {
    margin-bottom: 2rem;
    text-align: center;
}

.welcome-description p {
    color: #c9d1d9;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

.welcome-examples h3 {
    color: #f0f6fc;
    font-size: 1.2rem;
    margin: 0 0 1.5rem 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.example-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.example-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(88, 166, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.example-card:hover {
    border-color: #58a6ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    background: rgba(33, 38, 45, 0.8);
}

.example-card:hover::before {
    left: 100%;
}

.example-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(88, 166, 255, 0.1);
    border-radius: 8px;
    flex-shrink: 0;
}

.example-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.example-text strong {
    color: #f0f6fc;
    font-size: 1rem;
    font-weight: 600;
}

.example-text span {
    color: #8b949e;
    font-size: 0.9rem;
    line-height: 1.4;
}

.welcome-tip {
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tip-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(88, 166, 255, 0.2);
    border-radius: 8px;
    flex-shrink: 0;
}

.tip-content {
    color: #c9d1d9;
    font-size: 1rem;
    line-height: 1.5;
}

.welcome-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #8b949e;
    font-size: 0.9rem;
}

.feature-icon {
    font-size: 1.2rem;
    color: #58a6ff;
}

@media (max-width: 768px) {
    .welcome-message {
        margin: 1rem;
        padding: 1.5rem;
    }

    .welcome-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .example-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .welcome-features {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .welcome-title h2 {
        font-size: 1.5rem;
    }
}

.todo-message {
    background: rgba(88, 166, 255, 0.05);
    border: 1px solid rgba(88, 166, 255, 0.2);
}

.todo-list-container {
    background: rgba(13, 17, 23, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(88, 166, 255, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 0.5rem;
}

.todo-list-header {
    color: #58a6ff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(88, 166, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.todo-item {
    color: #e6edf3;
    font-size: 0.95rem;
    line-height: 1.8;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

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

.todo-item:hover {
    color: #58a6ff;
    padding-left: 0.5rem;
}

.auto-fetch-request {
    background: rgba(88, 166, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(88, 166, 255, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1rem 0;
    animation: fadeIn 0.5s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.auto-fetch-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.auto-fetch-icon {
    font-size: 1.5rem;
}

.auto-fetch-text {
    color: #f0f6fc;
    font-size: 1rem;
    font-weight: 500;
}

.auto-fetch-text strong {
    color: #58a6ff;
    font-weight: 600;
}

.auto-fetch-details {
    color: #8b949e;
    font-size: 0.9rem;
    padding: 0.75rem;
    background: rgba(13, 17, 23, 0.6);
    border-radius: 8px;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.auto-fetch-details code {
    background: rgba(88, 166, 255, 0.1);
    color: #58a6ff;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85em;
}

.auto-fetch-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.auto-fetch-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.auto-fetch-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.auto-fetch-btn:hover::before {
    width: 300px;
    height: 300px;
}

.auto-fetch-btn.accept {
    background: linear-gradient(135deg, #3fb950, #2ea043);
    color: white;
}

.auto-fetch-btn.accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(63, 185, 80, 0.4);
}

.auto-fetch-btn.decline {
    background: rgba(248, 81, 73, 0.15);
    border: 1px solid rgba(248, 81, 73, 0.3);
    color: #f85149;
}

.auto-fetch-btn.decline:hover {
    background: rgba(248, 81, 73, 0.25);
    border-color: #f85149;
}

.auto-fetch-btn.accept-all {
    background: linear-gradient(135deg, #58a6ff, #1f6feb);
    color: white;
}

.auto-fetch-btn.accept-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(88, 166, 255, 0.4);
}

.auto-fetch-btn.retry {
    background: rgba(88, 166, 255, 0.15);
    border: 1px solid rgba(88, 166, 255, 0.3);
    color: #58a6ff;
    margin-top: 0.5rem;
}

.auto-fetch-btn.retry:hover {
    background: rgba(88, 166, 255, 0.25);
    border-color: #58a6ff;
}

.auto-fetch-loading,
.auto-fetch-success,
.auto-fetch-error,
.auto-fetch-declined,
.auto-fetch-accepted {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

.auto-fetch-loading {
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.3);
    color: #58a6ff;
}

.auto-fetch-loading .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(88, 166, 255, 0.3);
    border-top-color: #58a6ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auto-fetch-success {
    background: rgba(63, 185, 80, 0.1);
    border: 1px solid rgba(63, 185, 80, 0.3);
    color: #3fb950;
}

.auto-fetch-error {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    color: #f85149;
    flex-direction: column;
    align-items: flex-start;
}

.auto-fetch-declined {
    background: rgba(139, 148, 158, 0.1);
    border: 1px solid rgba(139, 148, 158, 0.3);
    color: #8b949e;
}

.auto-fetch-accepted {
    background: rgba(63, 185, 80, 0.1);
    border: 1px solid rgba(63, 185, 80, 0.3);
    color: #3fb950;
}

@media (max-width: 768px) {
    .auto-fetch-buttons {
        flex-direction: column;
    }

    .auto-fetch-btn {
        width: 100%;
    }
}

.toolbox-grid-container {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(103, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toolbox-grid-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.toolbox-grid-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.toolbox-grid-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.toolbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.toolbox-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.toolbox-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.toolbox-card:hover {
    transform: translateY(-6px);
    border-color: rgba(88, 166, 255, 0.4);
    box-shadow: 0 8px 32px rgba(88, 166, 255, 0.2);
}

.toolbox-card:hover::before {
    opacity: 1;
}

.toolbox-card > * {
    position: relative;
    z-index: 1;
}

.toolbox-card-image-container {
    width: 100%;
    height: 150px;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbox-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.model-name {
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.model-creator {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.model-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.model-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #ffd700;
}

.model-favorites {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: rgba(255, 255, 255, 0.6);
}

.has-scripts-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: 4px;
    font-size: 0.75rem;
    color: #ffc107;
    margin-bottom: 0.5rem;
}

.insert-model-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.insert-model-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.insert-model-btn:active {
    transform: scale(0.98);
}

.insert-model-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    transform: none;
}

.toolbox-card.inserting {
    pointer-events: none;
    opacity: 0.6;
}

.toolbox-card.inserting .insert-model-btn {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 1024px) {
    .toolbox-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .toolbox-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .toolbox-card-image-container {
        height: 120px;
    }

    .toolbox-grid-container {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .toolbox-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .model-name {
        font-size: 0.85rem;
    }

    .insert-model-btn {
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }
}
