* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 182, 193, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 218, 225, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.chat-container {
    width: 100%;
    max-width: 450px;
    height: 85vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.chat-header {
    background: linear-gradient(135deg, #ff6b9d 0%, #feca57 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    box-shadow: 0 2px 15px rgba(255, 107, 157, 0.4);
}

.avatar-container {
    position: relative;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffeef1 0%, #ffe0ec 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 10px rgba(255, 182, 193, 0.3);
}

.status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #ff6b9d;
    border-radius: 50%;
    border: 3px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 157, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 107, 157, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 157, 0); }
}

.header-info {
    flex: 1;
}

.chat-header h1 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.status-text {
    font-size: 0.85rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.reset-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    border-radius: 12px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(248, 249, 250, 0.8));
}

.message {
    margin-bottom: 20px;
    animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    display: flex;
    justify-content: flex-end;
}

.message.assistant {
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    gap: 8px;
}

.mini-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffeef1 0%, #ffe0ec 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 5px;
    box-shadow: 0 2px 5px rgba(255, 182, 193, 0.3);
}

.message-content {
    max-width: 70%;
    padding: 14px 18px;
    border-radius: 20px;
    word-wrap: break-word;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.message.user .message-content {
    background: linear-gradient(135deg, #ff898e 0%, #ff855c 100%);
    color: white;
    border-bottom-right-radius: 5px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.message.assistant .message-content {
    background: white;
    color: #444;
    border: 1px solid rgba(255, 182, 193, 0.2);
    border-bottom-left-radius: 5px;
    animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.message-content p {
    margin: 0;
    line-height: 1.5;
}

.message-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 8px;
}

.message-content pre {
    background: #f4f4f4;
    padding: 8px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 8px 0;
}

.message-content code {
    background: #f4f4f4;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.typing-indicator {
    display: inline-block;
    padding: 14px 18px;
    background: white;
    border: 1px solid rgba(255, 182, 193, 0.2);
    border-radius: 20px;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.typing-indicator span {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b9d 0%, #feca57 100%);
    margin: 0 3px;
    animation: typing 1.5s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-12px) scale(1.2);
        opacity: 1;
    }
}

.chat-input-container {
    padding: 20px;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(255, 182, 193, 0.2);
    backdrop-filter: blur(10px);
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    position: relative;
}

.chat-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid rgba(255, 182, 193, 0.3);
    border-radius: 25px;
    font-size: 15px;
    resize: none;
    outline: none;
    max-height: 120px;
    line-height: 1.5;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.chat-input:focus {
    border-color: rgba(255, 107, 157, 0.5);
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 182, 193, 0.15);
}

.send-btn {
    padding: 12px;
    background: linear-gradient(135deg, #ff6b9d 0%, #feca57 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 48px;
    height: 48px;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.send-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.send-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.send-btn:disabled {
    background: linear-gradient(135deg, #b2bec3 0%, #dfe6e9 100%);
    cursor: not-allowed;
    box-shadow: none;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 182, 193, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff6b9d 0%, #feca57 100%);
    background-clip: padding-box;
}

.heart-animation {
    position: absolute;
    pointer-events: none;
    animation: floatHeart 3s ease-out forwards;
    font-size: 20px;
    z-index: 1000;
}

@keyframes floatHeart {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-30px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-80px) scale(0.8);
    }
}

.message.assistant .message-content::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 10px;
    width: 10px;
    height: 10px;
    background: white;
    border-left: 1px solid rgba(255, 182, 193, 0.2);
    border-bottom: 1px solid rgba(255, 182, 193, 0.2);
    transform: rotate(-45deg);
}

.message.user .message-content::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 10px;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
    transform: rotate(45deg);
}

/* Scrollbar customizado para o modal-body */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #ffb6c1;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #ff6b9d;
}

/* Ajustes para tablets pequenos e smartphones */
@media (max-width: 640px) {
    .benefits-list li {
        padding: 6px 8px;
        padding-left: 30px;
        font-size: 0.85rem;
    }
    
    .limit-icon {
        font-size: 40px;
        margin-bottom: 10px;
    }
    
    .price-value {
        font-size: 1.8rem;
    }
}

/* Ajustes para smartphones pequenos */
@media (max-width: 380px) {
    .modal-header h2 {
        font-size: 1rem;
    }
    
    .upgrade-section h3 {
        font-size: 1rem;
    }
    
    .benefits-list li {
        font-size: 0.8rem;
        padding: 5px 8px;
        padding-left: 28px;
    }
    
    .price-value {
        font-size: 1.6rem;
    }
    
    .upgrade-btn {
        padding: 12px 20px;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .chat-container {
        height: 100vh;
        max-width: 100%;
        border-radius: 0;
    }
    
    .chat-header {
        border-radius: 0;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .modal-overlay {
        padding: 0;
    }
    
    .modal-content {
        height: 100vh;
        max-height: 100vh;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
    }
    
    .modal-header {
        padding: 10px 15px;
        border-radius: 0;
    }
    
    .modal-header h2 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 15px;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .limit-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }
    
    .limit-message {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }
    
    .wait-message {
        font-size: 0.9rem;
        padding: 10px 15px;
        margin-bottom: 20px;
    }
    
    .divider {
        font-size: 0.75rem;
    }
    
    .divider::before,
    .divider::after {
        width: 35%;
    }
    
    .upgrade-section {
        padding: 15px;
        margin-top: 15px;
    }
    
    .upgrade-section h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .benefits-list {
        margin: 15px 0;
    }
    
    .benefits-list li {
        padding: 8px 10px;
        padding-left: 35px;
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .benefits-list li::before {
        left: 10px;
        font-size: 1rem;
    }
    
    .price-tag {
        padding: 15px;
    }
    
    .price-tag::after {
        font-size: 18px;
        top: 8px;
        right: 10px;
    }
    
    .price-label {
        font-size: 0.8rem;
        margin-bottom: 5px;
    }
    
    .price-value {
        font-size: 2rem;
        margin: 8px 0;
    }
    
    .price-period {
        font-size: 0.95rem;
    }
    
    .upgrade-btn {
        padding: 15px 25px;
        font-size: 0.95rem;
        margin-top: 15px;
        border-radius: 25px;
    }
    
    .modal-close {
        width: 32px;
        height: 32px;
        font-size: 22px;
        top: 12px;
        right: 12px;
    }
}

/* Contador de mensagens */
.message-counter {
    position: absolute;
    bottom: -30px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    color: #666;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    transition: all 0.3s ease;
}

.message-counter.counter-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.message-counter.counter-critical {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Modal de Upgrade */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 10px;
}

.modal-overlay.modal-active {
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 24px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    position: relative;
    transform: scale(0.8) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (max-width: 480px) {
    .modal-content {
        max-height: 95vh;
    }
}

.modal-overlay.modal-active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    background: #ff6b9d;
    color: white;
    padding: 10px 25px;
    text-align: center;
    border-radius: 24px 24px 0 0;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 15s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    position: relative;
    z-index: 1;
}

.modal-body {
    padding: 10px;
    text-align: center;
    overflow-y: auto;
    flex: 1;
}

.limit-icon {
    font-size: 72px;
    margin-bottom: 20px;
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.limit-message {
    font-size: 1.15rem;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.6;
}

.limit-message strong {
    color: #ff6b9d;
    font-weight: 700;
}

.wait-message {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 25px;
    background: #fff5f7;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid #ffe0e6;
}

.wait-message strong {
    color: #e74c3c;
}

.divider {
    color: #95a5a6;
    font-style: normal;
    font-weight: 500;
    position: relative;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 2px;
    background: #ecf0f1;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.upgrade-section {
    background: #fef5f7;
    border: 2px solid #ffe0e6;
    border-radius: 20px;
    padding: 20px;
    margin-top: 25px;
    position: relative;
}

.upgrade-section h3 {
    color: #ff6b9d;
    margin-bottom: 25px;
    font-size: 1.4rem;
    font-weight: 700;
}

.benefits-list {
    list-style: none;
    text-align: left;
    margin: 25px 0;
    padding: 0;
}

.benefits-list li {
    padding: 12px 15px;
    font-size: 1rem;
    color: #34495e;
    background: white;
    border-radius: 10px;
    position: relative;
    padding-left: 40px;
    transition: all 0.3s ease;
    border: 1px solid #f0f3f7;
}

.benefits-list li:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(255, 107, 157, 0.15);
    border-color: #ffb6c1;
}

.benefits-list li::before {
    content: '✓';
    position: absolute;
    left: 15px;
    color: #27ae60;
    font-weight: bold;
    font-size: 1.2rem;
}

.benefits-list li:last-child {
    margin-bottom: 0;
}

.price-tag {
    background: transparent;
    border: 2px solid #ff6b9d;
    color: #ff6b9d;
    padding: 20px 25px;
    border-radius: 15px;
    position: relative;
    margin: 20px 0;
    text-align: center;
}

.price-tag::after {
    content: 'OFERTA ESPECIAL';
    position: absolute;
    top: -10px;
    right: 20px;
    background: #ff6b9d;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

@keyframes shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes flame {
    0%, 100% { transform: scale(1) rotate(-5deg); }
    50% { transform: scale(1.2) rotate(5deg); }
}

.price-label {
    display: block;
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: #666;
}

.price-value {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    margin: 5px 0;
    color: #ff6b9d;
    line-height: 1;
}

.price-period {
    display: block;
    font-size: 0.95rem;
    opacity: 0.7;
    font-weight: 500;
    color: #666;
    margin-top: 5px;
}

.pricing-info {
    margin: 25px 0 0;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 107, 157, 0.2);
    border-bottom: 1px solid rgba(255, 107, 157, 0.2);
}

.price-note {
    text-align: center;
    margin-top: 15px;
    color: #888;
    font-size: 0.9rem;
}

.price-note small {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(255, 107, 157, 0.08);
    border-radius: 20px;
}

.upgrade-btn {
    background: #03A000;
    background: linear-gradient(140deg, rgb(3 169 0) 0%, rgb(63 179 111) 100%);
    line-height: 1.4;
    color: white;
    border: none;
    padding: 20px 45px;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.upgrade-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.upgrade-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(255, 107, 157, 0.45);
}

.upgrade-btn:hover::before {
    width: 400px;
    height: 400px;
}

.upgrade-btn:active {
    transform: translateY(-1px) scale(1);
}

.modal-close {
    position: absolute;
    top: -10px;
    right: -5px;
    background: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    color: #7f8c8d;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.modal-close:hover {
    background: #fff5f7;
    color: #ff6b9d;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}