/* Chat Arena Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-image: url('/chat_arena/images/bg1.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
/* Kein separater Header – Branding in der Karte */
.header { display: none; }

.logo {
    max-width: 260px;
    height: auto;
    margin-bottom: 12px;
}

.header h1 { display: none; }

.header p {
    color: #666;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    margin-top: 10px;
}

.welcome-section {
    text-align: center;
    margin-bottom: 20px;
}

.welcome-section h2 {
    color: #689281;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.welcome-section p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-width: 200px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #92C2D5, #689281);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(104, 146, 129, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #F19C46, #e88a2e);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(241, 156, 70, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
    min-width: auto;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    font-size: 1.2rem;
}

/* Form Sections */
.form-section {
    background: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 2px solid #689281;
}

.form-section h3 {
    color: #689281;
    font-size: 1.5rem;
    margin-bottom: 25px;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #689281;
    box-shadow: 0 0 0 3px rgba(104, 146, 129, 0.1);
}

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

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.room-info {
    background: rgba(104, 146, 129, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #689281;
}

.room-info h4 {
    color: #689281;
    margin-bottom: 8px;
}

.room-info p {
    color: #666;
    line-height: 1.5;
}

/* Chat Room */
.chat-room {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: linear-gradient(135deg, #689281, #92C2D5);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    flex-shrink: 0;
}

.chat-title-section h3 {
    font-size: 1.3rem;
    margin: 0 0 5px 0;
}

.chat-topic {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
    font-style: italic;
}

.chat-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.chat-container {
    display: flex;
    flex: 1;
    min-height: 0;
}

.chat-sidebar {
    width: 200px;
    background: rgba(104, 146, 129, 0.05);
    padding: 15px;
    border-right: 2px solid #689281;
    flex-shrink: 0;
}

.chat-sidebar h4 {
    color: #689281;
    margin-bottom: 10px;
    font-size: 1rem;
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 8px;
    border-radius: 6px;
    border-left: 3px solid #92C2D5;
    font-size: 0.85rem;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.message {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #92C2D5;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.message-author {
    font-weight: 600;
    color: #689281;
}

.message-time {
    font-size: 0.8rem;
    color: #999;
}

.message-content {
    color: #333;
    line-height: 1.5;
}

.message.moderator {
    border-left-color: #F19C46;
}

.message.moderator .message-author {
    color: #F19C46;
}

.message.typing {
    opacity: 0.7;
    border-left-color: #92C2D5;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-style: italic;
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #92C2D5;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot: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; }
}

.chat-input {
    padding: 10px 15px;
    background: rgba(104, 146, 129, 0.05);
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.chat-input input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.chat-input input:focus {
    outline: none;
    border-color: #689281;
}

/* Overlays */
.loading-overlay,
.message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #689281;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.message-box {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    max-width: 480px;
    margin: 20px;
}

/* Stelle sicher, dass Buttons in Overlays wirklich mittig stehen */
.message-box .form-actions {
    display: flex;
    justify-content: center;
    width: 100%;
}
.message-box .btn { margin-left: auto; margin-right: auto; display: inline-flex; }

.message-box p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #333;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        min-width: 100%;
        max-width: 300px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .chat-container {
        flex-direction: column;
    }
    
    .chat-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #689281;
    }
    
    .chat-header {
        flex-direction: column;
        text-align: center;
    }
    
    .chat-controls {
        justify-content: center;
    }
    
    .chat-messages {
        max-height: 300px;
    }
    
    .chat-input {
        flex-direction: column;
        gap: 15px;
    }
    
    .chat-input input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .welcome-section h2 {
        font-size: 1.5rem;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
}
