/* ChatCrush - Main Stylesheet */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

/* Welcome Box */
.welcome-box, .admin-login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.welcome-box h1, .admin-login-box h1 {
    text-align: center;
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.tagline {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 16px;
}

.radio-group {
    display: flex;
    gap: 15px;
}

.radio-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-option span {
    display: block;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 18px;
}

.radio-option input[type="radio"]:checked + span {
    background: #ff4757;
    color: white;
    border-color: #ff4757;
    transform: scale(1.05);
}

.radio-option:hover span {
    border-color: #ff4757;
}

.topic-select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.topic-select:focus {
    outline: none;
    border-color: #ff4757;
    background: white;
}

.start-btn {
    width: 100%;
    padding: 15px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-btn:hover {
    background: #ff6b81;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.3);
}

.disclaimer {
    text-align: center;
    color: #7f8c8d;
    font-size: 13px;
    margin-top: 20px;
}

/* Chat Container */
.chat-container {
    width: 100vw;
    height: 100vh;
    background: white;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stranger-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    font-size: 40px;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stranger-info h3 {
    color: white;
    margin: 0;
    font-size: 20px;
}

.status {
    color: #2ecc71;
    font-size: 14px;
}

.chat-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.topic-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.end-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.end-btn:hover {
    background: #c0392b;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
}

.system-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    max-width: 70%;
    animation: slideIn 0.3s ease;
}

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

.message.user {
    align-self: flex-end;
    align-items: flex-end;
}

.message.admin {
    align-self: flex-start;
    align-items: flex-start;
}

.message-content {
    padding: 12px 18px;
    border-radius: 18px;
    word-wrap: break-word;
}

.message.user .message-content {
    background: #ff4757;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.admin .message-content {
    background: white;
    color: #2c3e50;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message-time {
    font-size: 11px;
    color: #95a5a6;
    margin-top: 5px;
    padding: 0 5px;
}

/* Chat Input */
.chat-input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

#messageForm {
    display: flex;
    gap: 10px;
}

#messageInput {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s ease;
}

#messageInput:focus {
    border-color: #ff4757;
}

#messageForm button {
    background: #ff4757;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#messageForm button:hover {
    background: #ff6b81;
}

/* Admin Login */
.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: #ff4757;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .welcome-box, .admin-login-box {
        padding: 25px;
    }
    
    .chat-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .message {
        max-width: 85%;
    }
}
