/* Reset and base styles */
* {
    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;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

.error-message {
    color: #e74c3c;
    margin-top: 10px;
    padding: 10px;
    background: #ffeaa7;
    border: 1px solid #fdcb6e;
    border-radius: 4px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #333;
}

/* Button styles */
.btn {
    background: #6c5ce7;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    background: #5f4fcf;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: #6c5ce7;
}

.btn-secondary {
    background: #74b9ff;
}

.btn-danger {
    background: #e17055;
}

.btn-success {
    background: #00b894;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Form styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6c5ce7;
}

.form-group small {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* Header styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #6c5ce7;
    font-size: 28px;
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #6c5ce7;
}

#welcomeUser {
    font-weight: 500;
    color: #333;
}

/* Navigation styles */
.nav {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav .container {
    display: flex;
    gap: 20px;
}

.nav-btn {
    background: transparent;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover,
.nav-btn.active {
    background: #6c5ce7;
    color: white;
    transform: translateY(-2px);
}

/* Main content styles */
.main {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

.tab-content {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.tab-content.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header h2 {
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filters input,
.filters select {
    width: auto;
    min-width: 150px;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* Chat logs styles */
.chat-log-item {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-log-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.chat-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.chat-log-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-log-username {
    font-weight: 600;
    color: #6c5ce7;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.3s ease;
}

.chat-log-username:hover {
    color: #5f4fcf;
    text-decoration: underline;
}

.chat-log-channel {
    background: #74b9ff;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.chat-log-timestamp {
    color: #666;
    font-size: 14px;
}

.chat-log-message {
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    word-wrap: break-word;
}

.chat-log-badges {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.badge {
    background: #00b894;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Channel management styles */
.channel-item {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.channel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.channel-info h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.channel-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e17055;
}

.status-indicator.active {
    background: #00b894;
}

.channel-actions {
    display: flex;
    gap: 10px;
}

.channel-keywords {
    margin-top: 10px;
}

.channel-keywords strong {
    color: #333;
    margin-right: 10px;
}

.keyword-tag {
    background: #ffeaa7;
    color: #333;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 8px;
    display: inline-block;
    margin-bottom: 5px;
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination-info {
    color: #666;
    font-size: 14px;
    margin: 0 20px;
}

/* Login form styles */
.login-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #6c5ce7;
}

.login-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters input,
    .filters select {
        min-width: auto;
    }
    
    .chat-log-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .channel-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .nav .container {
        flex-wrap: wrap;
    }
}

/* Animation keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-log-item,
.channel-item {
    animation: fadeIn 0.3s ease;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #6c5ce7;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5f4fcf;
}

/* Profile management styles */
.profile-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.profile-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
}

.profile-section h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f8f9fa;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-preview {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.profile-preview-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #6c5ce7;
}

.profile-preview-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 3px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #666;
}

.info-grid {
    display: grid;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-item label {
    font-weight: 500;
    color: #666;
    margin-bottom: 0;
}

.info-item span {
    color: #333;
    font-weight: 500;
}

/* Success message styling */
.success-message {
    color: #00b894;
    background: #d1f2eb;
    border: 1px solid #a7e5d4;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    display: none;
}

.success-message.show {
    display: block;
}

/* Responsive profile layout */
@media (max-width: 768px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .profile-section {
        padding: 20px;
    }
}
