* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.sidebar {
    width: 350px;
    background: #f0f2f5;
    border-right: 1px solid #e9edef;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    background: #008069;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* Add relative positioning */
}

.sidebar-header h1 {
    font-size: 18px;
    font-weight: 500;
}

.new-chat-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.new-chat-btn:hover {
    background: rgba(255,255,255,0.3);
}

.chat-list {
    flex: 1;
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e9edef;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.chat-item:hover {
    background: #e9edef;
}

.chat-item.active {
    background: #e9edef;
}

/* Updated styles for action buttons within chat item */
.chat-actions-menu {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 5px; /* Space between buttons */
}

.action-btn {
    background: none;
    border: none;
    color: white; /* Default color, overridden by specific classes */
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2); /* Add subtle shadow */
}

.action-btn:hover {
    filter: brightness(1.1);
}

.delete-btn {
    background: #ff4444; /* Red for delete */
}

.delete-btn:hover {
    background: #cc0000;
}

.leave-btn {
    background: #54a0ff; /* Blue for leave */
}

.leave-btn:hover {
    background: #2e86de;
}

/* Add these styles for the fire badge */
.fire-badge {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    animation: fireGlow 2s ease-in-out infinite;
    display: inline-block !important;
}

@keyframes fireGlow {
    0%, 100% {
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }
    50% {
        box-shadow: 0 1px 8px rgba(255, 107, 107, 0.4);
    }
}

/* Update the fireworks animation with more vibrant colors and better effects */
@keyframes firework-burst {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.8);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5) rotate(180deg);
        opacity: 1;
        box-shadow: 0 0 30px 5px rgba(255, 255, 255, 0.9);
    }
    100% {
        transform: translate(-50%, -50%) scale(0) rotate(360deg);
        opacity: 0;
        box-shadow: 0 0 60px 10px rgba(255, 255, 255, 0);
    }
}

@keyframes sparkle {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
        opacity: 0;
    }
}

/* Enhanced HyperEmojis styles */
.hyper-emoji {
    cursor: pointer;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    filter: drop-shadow(0 0 5px rgba(255, 107, 107, 0.5));
}

.hyper-emoji:hover:not(.played) {
    transform: scale(1.3) rotate(10deg);
    filter: drop-shadow(0 0 15px rgba(255, 107, 107, 0.8));
}

.hyper-emoji.played {
    cursor: default;
    opacity: 0.6;
    pointer-events: none;
    transform: none; /* Ensure played emojis don't retain hover transform */
    filter: none; /* Ensure played emojis don't retain hover filter */
}

/* Add click feedback */
.hyper-emoji:active:not(.played) {
    transform: scale(0.9);
}

/* Ensure proper spacing for HyperEmojis */
.message-content {
    line-height: 1.4;
}

.message-content > div {
    word-break: break-word;
}

/* Enhanced fireworks particles */
@keyframes hyper-firework-explode {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1) rotate(180deg);
        opacity: 0.9;
    }
    100% {
        transform: translate(
            calc(-50% + (var(--dx) * 1px)),
            calc(-50% + (var(--dy) * 1px))
        ) scale(0) rotate(360deg);
        opacity: 0;
    }
}

/* Sparkle trail effect */
@keyframes sparkle-trail {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.8);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(255, 255, 255, 0.4);
    }
    100% {
        box-shadow: 0 0 40px 20px rgba(255, 255, 255, 0);
    }
}

/* HyperEmojis badge for messages */
.hyper-emoji-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    animation: bounce 2s infinite;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-2px);
    }
}

/* Add sparkle effect on hover */
.message-content span[style*="cursor: pointer"]:hover::after {
    content: '✨';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
    animation: sparkle 0.6s ease-out;
}

@keyframes quote-pop {
    0% { transform: scale(0.9); opacity: 0; }
    60% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.quote-anim {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(0,0,0,0.04);
    animation: quote-pop 360ms cubic-bezier(.2,.9,.3,1);
}

@keyframes konami-pop {
    0% { transform: scale(0.8); opacity: 0; }
    40% { transform: scale(1.15) rotate(-6deg); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.konami-anim {
    display: inline-block;
    margin-left: 8px;
    width: 36px;
    height: 24px;
    position: relative;
    vertical-align: middle;
    animation: konami-pop 420ms cubic-bezier(.2,.9,.3,1);
}
.konami-anim .bar {
    position: absolute;
    bottom: 0;
    width: 6px;
    border-radius: 3px;
    background: linear-gradient(180deg,#ffd166,#ff6b6b);
    opacity: 0.95;
    transform-origin: bottom center;
}
.konami-anim .bar:nth-child(1){ left:0; height:100%; background:#ff6b6b; }
.konami-anim .bar:nth-child(2){ left:6px; height:70%; background:#ff8e53; }
.konami-anim .bar:nth-child(3){ left:12px; height:50%; background:#ffd166; }
.konami-anim .bar:nth-child(4){ left:18px; height:70%; background:#4ecdc4; }
.konami-anim .bar:nth-child(5){ left:24px; height:40%; background:#5f27cd; }
.konami-anim .bar:nth-child(6){ left:30px; height:85%; background:#54a0ff; }

.chat-avatar {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 15px;
}

.chat-info {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* Allow shrinking */
}

.chat-name {
    font-weight: 500;
    color: #111b21;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    position: relative;
}

.chat-preview {
    font-size: 13px;
    color: #667781;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #efeae2;
}

.chat-header {
    background: #008069;
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Added for spacing items in header */
}

.contact-info {
    display: flex;
    align-items: center;
}

.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    font-weight: bold;
}

.contact-details h3 {
    font-size: 16px;
    font-weight: 500;
}

.contact-details p {
    font-size: 13px;
    opacity: 0.8;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAATklEQVQYV2NkYGD4z0ABYByUFVnAwCDMyP8MxCDAwMDwH4RRgYGB4T8IqwIDAwMDP9BWBEYGBgY/oOwIvxKAACTJAYd2ZG8yQAAAABJRU5lPerkJggg==');
}

.message {
    display: flex;
    margin-bottom: 8px;
    align-items: flex-end;
}

.message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 8px;
    position: relative;
    word-wrap: break-word;
    min-width: 40px;
}

.message.user .message-content {
    background: #dcf8c6;
    border-top-right-radius: 0;
}

.message.ai .message-content {
    background: white;
    border-top-left-radius: 0;
    box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
}

.message-content img {
    cursor: pointer;
    transition: transform 0.2s;
}

.message-content img:hover {
    transform: scale(1.05);
}

.message-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 4px;
    font-size: 11px;
    color: #667781;
}

.message-time {
    margin-right: 4px;
}

.message-status {
    margin-left: 4px;
    font-size: 12px;
}

.message-status i {
    font-size: 12px;
}

.message-input-container {
    background: #f0f2f5;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 10;
}

.message-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    outline: none;
    font-size: 15px;
}

.send-btn {
    background: #008069;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.send-btn:hover {
    background: #005f56;
}

.send-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #667781;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal h2 {
    margin-bottom: 20px;
    color: #111b21;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #667781;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #e9edef;
    border-radius: 4px;
    font-size: 15px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #e9edef;
    border-radius: 4px;
    font-size: 15px;
    background: white;
}

.form-group select:focus {
    outline: none;
    border-color: #008069;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: #008069;
    color: white;
}

.btn-secondary {
    background: #f0f2f5;
    color: #667781;
}

.typing-indicator {
    display: none;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
}

.typing-indicator.active {
    display: flex;
}

.typing-bubble {
    width: 8px;
    height: 8px;
    background: #aaa;
    border-radius: 50%;
    margin: 0 2px;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-bubble:nth-child(1) { animation-delay: -0.32s; }
.typing-bubble:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.btn-icon {
    background: none;
    border: none;
    color: #008069; /* Default color for icons */
    cursor: pointer;
    padding: 8px;
    font-size: 20px;
    transition: opacity 0.3s;
}

.btn-icon:hover {
    opacity: 0.7;
}

.btn-icon:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Image preview modal */
.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    cursor: pointer;
}

.image-preview-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.back-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    font-size: 18px;
    margin-right: 10px;
}

.sidebar.mobile {
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

.chat-area.mobile {
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
}

.login-warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-in-out;
}

.login-warning-popup {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    margin: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease-out;
}

.login-warning-popup i {
    color: #ff9800;
    font-size: 48px;
    margin-bottom: 16px;
}

.login-warning-popup h3 {
    color: #111b21;
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: 500;
}

.login-warning-popup p {
    color: #667781;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #333;
}

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

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

/* Add new styles for human chat features */
.pending-invites {
    background: #f8f9fa;
    border-bottom: 1px solid #e9edef;
    padding: 15px;
}

.pending-invites h3 {
    font-size: 14px;
    color: #667781;
    margin-bottom: 10px;
}

.invite-item {
    background: white;
    border: 1px solid #e9edef;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.invite-code {
    display: flex;
    gap: 5px;
    align-items: center;
}

.invite-code code {
    background: #f0f2f5;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
}

.copy-btn,
.delete-invite-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #667781;
    transition: color 0.3s;
}

.copy-btn:hover {
    color: #008069;
}

.delete-invite-btn:hover {
    color: #ff4444;
}

.chat-type-badge {
    background: #008069;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

/* Add these styles for better recording button feedback */
.recording-btn {
    position: relative;
    color: #008069;
}

.recording-btn.recording {
    color: #ff4444;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.recording-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ff4444;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    margin: 0 10px;
}

.recording-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: blink 1s infinite;
}

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

.voice-message {
    margin-top: 8px;
}

.voice-message audio {
    width: 100%;
    max-width: 200px;
}

/* Add fire points display styles */
.fire-points-display {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    margin-left: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tutorial-step-with-fire {
    background: #f8f9fa;
    border-left: 4px solid #ff8e53;
    border-radius: 8px;
    margin: 10px 0;
    padding: 15px;
}

.tutorial-step-with-fire .fire-points-large {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    margin-bottom: 10px;
}

/* Tutorial Modal Styles */
.tutorial-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998; /* Below login warning if that's higher */
    animation: fadeIn 0.3s ease-in-out;
}

.tutorial-modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    margin: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px; /* Ensure content area is not too small */
}

.tutorial-modal-content h2 {
    color: #111b21;
    font-size: 24px;
    margin-bottom: 15px;
}

.tutorial-modal-content p {
    color: #667781;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.tutorial-icon {
    font-size: 60px;
    color: #008069;
    margin-bottom: 20px;
}

.tutorial-step-indicator {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

.tutorial-navigation {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

.tutorial-navigation .btn-secondary {
    background: #f0f2f5;
    color: #667781;
}

.tutorial-navigation .btn-primary {
    background: #008069;
    color: white;
}

.tutorial-navigation .btn-skip {
    background: none;
    border: none;
    color: #667781;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    margin-top: 10px;
}

.tutorial-navigation .btn-skip:hover {
    text-decoration: underline;
}

/* Tutorial button styles */
.tutorial-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.tutorial-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

/* Add pulse animation for better visibility */
.tutorial-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(102, 126, 234, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0;
    }
}

/* Add color variations for different fireworks */
.firework-color-1 { background: linear-gradient(45deg, #ff6b6b, #ff8e53); }
.firework-color-2 { background: linear-gradient(45deg, #4ecdc4, #44a08d); }
.firework-color-3 { background: linear-gradient(45deg, #a8edea, #fed6e3); }
.firework-color-4 { background: linear-gradient(45deg, #ffecd2, #fcb69f); }
.firework-color-5 { background: linear-gradient(45deg, #ff9a9e, #fecfef); }
.firework-color-6 { background: linear-gradient(45deg, #fad0c4, #ffd1ff); }

/* Enhanced emoji click effects */
.message-content span[style*="cursor: pointer"][style*="color: #ffa500"] {
    color: #ffdd00 !important;
    text-shadow: 0 0 10px #ffaa00, 0 0 20px #ffaa00, 0 0 30px #ffaa00;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px #ffaa00, 0 0 20px #ffaa00;
    }
    to {
        text-shadow: 0 0 20px #ffaa00, 0 0 30px #ffaa00, 0 0 40px #ffaa00;
    }
}

/* Add mobile responsive styling */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        height: 100vh;
    }
    
    .sidebar {
        width: 100%;
        height: 100vh;
    }
    
    .sidebar-header {
        padding: 15px;
        justify-content: space-between;
    }
    
    .new-chat-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .chat-item {
        padding: 12px;
    }
    
    .chat-avatar {
        width: 45px;
        height: 45px;
        margin-right: 12px;
    }
    
    .chat-area {
        width: 100%;
        height: 100vh;
    }
    
    .chat-header {
        padding: 12px 15px;
    }
    
    .contact-avatar {
        width: 35px;
        height: 35px;
    }
    
    .messages-container {
        padding: 15px;
        padding-bottom: 80px; /* Space for fixed input bar */
    }
    
    .message-content {
        max-width: 85%;
        font-size: 14px;
    }
    
    .message-input-container {
        padding: 8px 15px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #f0f2f5;
        border-top: 1px solid #e9edef;
        display: flex;
        align-items: center;
        gap: 8px;
        z-index: 100;
    }
    
    .message-input {
        flex: 1;
        min-width: 0;
        padding: 10px 15px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .btn-icon,
    .send-btn {
        flex-shrink: 0;
    }
    
    .recording-indicator {
        position: absolute;
        bottom: 70px;
        left: 50%;
        transform: translateX(-50%);
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .modal-content,
    .tutorial-modal-content,
    .login-warning-popup {
        width: 95%;
        padding: 20px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .messages-container {
        padding-bottom: 70px;
    }
    
    .fire-badge {
        font-size: 9px;
        padding: 1px 4px;
    }
}

/* Ensure fire badge is visible on mobile */
.chat-item .fire-badge {
    display: inline-block !important;
    margin-left: 8px;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .chat-item .fire-badge {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    .chat-name {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px;
    }
}

/* New styles for TipModal */
.tip-modal-content {
    max-width: 500px;
    text-align: center;
}

.tip-modal-content h2 {
    color: #008069;
}

.tip-modal-content .form-group label {
    text-align: left;
    font-weight: 500;
    margin-bottom: 10px;
    color: #111b21;
}

.preset-tips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.preset-tip-button {
    background: #e0e0e0;
    border: 1px solid #ccc;
    color: #333;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    min-width: 100px;
    flex: 1 1 auto; /* Allow buttons to grow/shrink */
    max-width: 48%; /* Two columns per row */
}

.preset-tip-button.selected {
    background: #008069;
    color: white;
    border-color: #005f56;
    box-shadow: 0 2px 5px rgba(0, 128, 105, 0.3);
    transform: translateY(-2px);
}

.preset-tip-button:hover:not(.selected) {
    background: #d0d0d0;
    transform: translateY(-1px);
}

.preset-tip-button:active:not(.selected) {
    transform: translateY(0);
}

.tip-amount-input,
.tip-message-input {
    border: 1px solid #e9edef;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    width: 100%;
    margin-top: 5px;
    box-sizing: border-box; /* Ensure padding doesn't affect total width */
}

.tip-amount-input::-webkit-inner-spin-button,
.tip-amount-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.tip-amount-input {
    -moz-appearance: textfield; /* Firefox */
}

.tip-modal-content .modal-actions {
    justify-content: center;
}

.tip-modal-content .modal-actions .btn-primary {
    padding: 12px 25px;
    font-size: 16px;
}

/* New: Always visible Tip Button */
.tip-main-button {
    background: linear-gradient(135deg, #ff9800 0%, #ffc107 100%); /* Golden gradient */
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    animation: pulse-gold 2s infinite ease-in-out;
}

.tip-main-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}

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

.tip-main-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #ccc 0%, #aaa 100%);
    box-shadow: none;
    animation: none;
}

/* Animation for the golden pulse glow */
@keyframes pulse-gold {
    0% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 0px rgba(255, 152, 0, 0.7);
    }
    50% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 152, 0, 0.9);
    }
    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 0px rgba(255, 152, 0, 0.7);
    }
}

/* Mobile-specific tip button position */
@media (max-width: 768px) {
    .tip-main-button {
        bottom: 80px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .tip-main-button {
        bottom: 70px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

.message-sender-info {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    font-size: 12px;
    color: #555;
}

.message-avatar-small {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 6px;
    object-fit: cover;
    background: #ccc; /* Placeholder background */
}

.message-username {
    font-weight: 600;
    color: #111b21;
}

/* New style for the locked overlay */
.locked-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #333 0%, #111 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000; /* Highest z-index */
    color: white;
    text-align: center;
    flex-direction: column;
    padding: 20px;
}

.locked-overlay .lock-icon {
    font-size: 80px;
    margin-bottom: 30px;
    color: #ffcc00; /* Goldish color for the lock */
    animation: bounceIn 0.8s ease-out;
}

.locked-overlay h2 {
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: 600;
}

.locked-overlay p {
    font-size: 18px;
    max-width: 500px;
    line-height: 1.5;
    opacity: 0.9;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .locked-overlay .lock-icon {
        font-size: 60px;
        margin-bottom: 20px;
    }
    .locked-overlay h2 {
        font-size: 24px;
    }
    .locked-overlay p {
        font-size: 16px;
    }
}