* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: #1e1e1e;
    color: #fff;
    height: 100vh;
    overflow: hidden;
}

.chat-container {
    max-width: 800px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
}

/* Chat header */
.chat-header {
    background: #2d2d2d;
    padding: 15px 20px;
    border-bottom: 1px solid #3a3a3a;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #b0b0b0;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    animation: pulse-status 2s ease-in-out infinite;
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Messages area */
.messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.messages-area::-webkit-scrollbar {
    width: 8px;
}

.messages-area::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.messages-area::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 4px;
}

.message {
    display: flex;
    gap: 10px;
    animation: fadeInMessage 0.4s ease;
}

@keyframes fadeInMessage {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.from-her {
    align-self: flex-start;
    flex-direction: row;
}

.message.from-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.message-content {
    max-width: 70%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.from-her .message-bubble {
    background: #3a7bd5;
    color: #fff;
    border-bottom-left-radius: 4px;
}

.message.from-user .message-bubble {
    background: #3a3a3a;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message-image {
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.message-image img {
    width: 100%;
    height: auto;
    display: block;
}

.message-image:hover {
    transform: scale(1.02);
}

.message-image.blurred img {
    filter: blur(20px);
}

.message-image.blurred {
    position: relative;
}

.message-image.blurred::after {
    content: '🔒 Click to unlock';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    pointer-events: none;
}

/* Typing indicator */
.typing-indicator {
    padding: 0 20px 10px;
    display: none;
    align-items: center;
    gap: 10px;
}

.typing-indicator.show {
    display: flex;
    animation: fadeInMessage 0.3s ease;
}

.typing-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.typing-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.typing-bubble {
    background: #3a7bd5;
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: typing-bounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

/* Buttons area */
.buttons-area {
    padding: 15px 20px 20px;
    background: #2d2d2d;
    border-top: 1px solid #3a3a3a;
    display: none;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.buttons-area.show {
    display: flex;
    animation: fadeInButtons 0.4s ease;
}

@keyframes fadeInButtons {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hint arrows for first interaction */
.buttons-hint {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    animation: bounce-hint 2s ease-in-out infinite;
    pointer-events: none;
    z-index: 10;
}

.buttons-hint.hidden {
    display: none;
}

.hint-text {
    font-size: 14px;
    font-weight: 600;
    color: #e74c3c;
    text-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
    white-space: nowrap;
}

.hint-arrow {
    font-size: 24px;
    color: #e74c3c;
    filter: drop-shadow(0 0 8px rgba(231, 76, 60, 0.6));
}

@keyframes bounce-hint {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

.choice-button {
    padding: 14px 20px;
    background: #3a3a3a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
}

/* Pulse animation for first-time buttons */
.choice-button.first-time {
    animation: pulse-button 2s ease-in-out infinite;
}

@keyframes pulse-button {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(231, 76, 60, 0);
    }
}

.choice-button:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    transform: translateX(5px);
}

.choice-button:active {
    transform: translateX(5px) scale(0.98);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease;
}

.modal-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #2d2d2d;
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    border: 1px solid #3a3a3a;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-image-preview {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    margin-bottom: 25px;
    filter: blur(20px);
    position: relative;
}

.modal-image-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.modal-content h2 {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 15px;
    line-height: 1.4;
}

.modal-content p {
    color: #b0b0b0;
    font-size: 16px;
    margin-bottom: 25px;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-button {
    padding: 16px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    color: white;
}

.modal-button-confirm {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.4);
}

.modal-button-confirm:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(231, 76, 60, 0.6);
}

.modal-button-leave {
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
}

.modal-button-leave:hover {
    background: #4a4a4a;
}

/* Responsive */
@media (max-width: 768px) {
    .chat-header {
        padding: 12px 15px;
    }
    
    .header-avatar {
        width: 36px;
        height: 36px;
    }
    
    .header-name {
        font-size: 15px;
    }
    
    .messages-area {
        padding: 15px;
    }
    
    .message-content {
        max-width: 80%;
    }
    
    .message-bubble {
        font-size: 14px;
        padding: 10px 14px;
    }
    
    .buttons-area {
        padding: 12px 15px 15px;
    }
    
    .choice-button {
        font-size: 14px;
        padding: 12px 16px;
    }
}
