/* Reset and base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

h1 {
    text-align: center;
    margin-bottom: 40px;
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Main chat container */
.chat-input-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    padding: 15px 25px;
    max-width: 950px;
    width: 100%;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.chat-input-container:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Chat icons */
.chat-icon {
    width: 50px;
    height: 50px;
    border-radius: 25px;
    margin: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.chat-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #74C0FC, #667eea);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.chat-icon:hover::before {
    opacity: 0.1;
}

.chat-icon:hover {
    transform: scale(1.15);
    background: rgba(116, 192, 252, 0.1);
}

.chat-icon:active {
    transform: scale(0.95);
}

.chat-icon svg {
    width: 28px;
    height: 28px;
    fill: #74C0FC;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.chat-icon:hover svg {
    fill: #5ba7f7;
    transform: scale(1.1);
}

/* Input wrapper */
.input-wrapper {
    position: relative;
    flex: 1;
    margin: 0 18px;
}

.chat-input {
    width: 100%;
    background: rgba(245, 245, 245, 0.8);
    border: none;
    padding: 18px 55px 18px 22px;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    color: #2c3e50;
}

.chat-input:focus {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 
        0 0 0 3px rgba(116, 192, 252, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.chat-input::placeholder {
    color: #95a5a6;
    font-weight: 400;
}

/* Emoji inside input */
.emoji-inside {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.emoji-inside:hover {
    background: rgba(116, 192, 252, 0.1);
    transform: translateY(-50%) scale(1.1);
}

.emoji-inside svg {
    width: 26px;
    height: 26px;
    fill: #74C0FC;
    transition: all 0.3s ease;
}

.emoji-inside:hover svg {
    fill: #5ba7f7;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .chat-input-container {
        padding: 10px 15px;
        border-radius: 40px;
    }
    
    .chat-icon {
        width: 36px;
        height: 36px;
        margin: 0 4px;
    }
    
    .chat-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .input-wrapper {
        margin: 0 10px;
    }
    
    .chat-input {
        padding: 14px 45px 14px 18px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .chat-input-container {
        padding: 8px 12px;
    }
    
    .chat-icon {
        width: 32px;
        height: 32px;
        margin: 0 3px;
    }
    
    .chat-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .input-wrapper {
        margin: 0 8px;
    }
}

/* Animation for loading state */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.chat-input-container.loading .chat-icon {
    animation: pulse 2s infinite;
}

/* Accessibility improvements */
.chat-icon:focus {
    outline: 2px solid #74C0FC;
    outline-offset: 2px;
}

.chat-input:focus {
    outline: none;
}

/* Tooltip styles */
.chat-icon[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

.emoji-inside[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}