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

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    color: #333;
    overflow: hidden;
}

.landing-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.landing-content {
    text-align: center;
    color: white;
    padding: 40px;
    max-width: 1000px;
    width: 100%;
}

.landing-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.landing-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.landing-tagline {
    font-size: 1.1rem;
    margin-bottom: 40px;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.feature {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.feature h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.feature p {
    font-size: 0.95rem;
    margin: 0;
    opacity: 0.85;
}

.landing-cta {
    margin: 30px 0;
    padding: 20px;
}

.cta-text {
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.btn-large {
    padding: 18px 60px;
    font-size: 20px;
    font-weight: 700;
    display: inline-block;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-large:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.login-hint {
    font-size: 0.9rem;
    margin-top: 15px;
    opacity: 0.8;
}

.landing-benefits {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    max-width: 500px;
    margin: 20px auto 0;
    text-align: left;
}

.landing-benefits h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
}

.landing-benefits ul {
    list-style: none;
    padding: 0;
}

.landing-benefits li {
    padding: 10px 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.landing-benefits li:last-child {
    border-bottom: none;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background: white;
    color: #667eea;
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

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

.notification-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.notification-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.notification-banner-text strong {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
}

.notification-banner-text p {
    margin: 0;
    font-size: 14px;
    opacity: 0.95;
}

.notification-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.notification-banner .btn {
    white-space: nowrap;
}

.chat-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 300px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, width 0.3s ease;
}

.sidebar.collapsed {
    transform: translateX(-300px);
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
}

.chat-container.sidebar-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-header {
    padding: 20px;
    background: #1a252f;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.5rem;
}

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

.room-item {
    padding: 15px 20px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.room-item:hover {
    background: #34495e;
}

.room-item.active {
    background: #34495e;
    border-left-color: #667eea;
}

.user-info {
    padding: 20px;
    background: #1a252f;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.logout-link {
    color: #a0a0a0;
    text-decoration: none;
    font-size: 0.9rem;
}

.logout-link:hover {
    color: white;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.welcome-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
}

.welcome-screen h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.chat-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.chat-screen.hidden {
    display: none;
}

.chat-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    font-size: 1.3rem;
    color: white;
}

.notification-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: white;
    opacity: 0.95;
}

.notification-status span {
    font-size: 18px;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 5px;
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu:hover span {
    background: #e0e0e0;
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }
    
    .sidebar {
        width: 280px;
        transform: translateX(-280px);
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 0;
    max-height: calc(100vh - 240px);
    height: 100%;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 70%;
}

.message.own {
    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 {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-user {
    font-weight: 600;
    font-size: 0.9rem;
    color: #667eea;
}

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

.message-edited {
    font-size: 0.7rem;
    color: #999;
    font-style: italic;
    margin-left: 4px;
}

.message.own {
    cursor: pointer;
    user-select: none;
}

.message.own:hover .message-text {
    opacity: 0.9;
}

.message-text {
    background: #f0f0f0;
    padding: 10px 14px;
    border-radius: 12px;
    word-wrap: break-word;
}

.message-text a {
    color: #667eea;
    text-decoration: underline;
    word-break: break-all;
}

.message-text a:hover {
    color: #5568d3;
}

.message.own .message-text {
    background: #667eea;
    color: white;
}

.message.own .message-text a {
    color: #ffffff;
    text-decoration: underline;
    font-weight: 500;
}

.message.own .message-text a:hover {
    color: #f0f0f0;
}

.message.own .message-user {
    color: #667eea;
}

.message-input-container {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

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

.message-input:focus {
    outline: none;
    border-color: #667eea;
}

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

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
}

.modal-content h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.modal-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 20px;
}

.modal-input:focus {
    outline: none;
    border-color: #667eea;
}

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

.message-actions {
    text-align: center;
}

.message-actions h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.message-actions .btn {
    width: 100%;
    margin-bottom: 10px;
}

.btn-danger {
    background: #e74c3c;
}

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

.hidden {
    display: none;
}

/* Profile Page Styles */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    background: #f5f7fa;
}

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

.profile-header h1 {
    color: #2c3e50;
    font-size: 2rem;
}

.profile-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.profile-form {
    max-width: 500px;
    margin: 0 auto;
}

.profile-preview {
    text-align: center;
    margin-bottom: 30px;
}

.profile-image-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

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

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input:disabled {
    background: #f5f7fa;
    color: #999;
    cursor: not-allowed;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #666;
}

.btn-large {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.profile-link {
    display: block;
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 4px;
}

.profile-link:hover {
    text-decoration: underline;
}
