* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.animate-slide-up {
    animation: slideUp 0.4s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-pulse-ring {
    animation: pulse-ring 2s infinite;
}

#tablePreview table {
    border-collapse: collapse;
    width: 100%;
    font-size: 13px;
}

#tablePreview th {
    background: #1a2332;
    color: #ffffff;
    font-weight: 600;
    padding: 10px 12px;
    text-align: left;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

#tablePreview td {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

#tablePreview tr:nth-child(even) td {
    background: #f8fafc;
}

#tablePreview tr:hover td {
    background: #ecfdf5;
}

.ai-message {
    animation: slideUp 0.4s ease-out;
}

.formula-block {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 14px 16px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    position: relative;
}

.formula-block .copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
}

.template-tag {
    white-space: nowrap;
}

@media (max-width: 767px) {
    #tablePreview {
        max-height: 200px;
    }

    #tablePreview th,
    #tablePreview td {
        padding: 6px 8px;
        font-size: 11px;
    }

    #requirementInput {
        padding-bottom: 48px;
    }

    #submitBtn {
        position: relative;
        bottom: auto;
        right: auto;
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }
}