/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Utility classes for inline forms */
.inline-form {
    display: inline;
}

.modal {
    display: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
}

/* Navigation */
.navbar {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffd700;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: #e0e0e0;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.nav-link-with-badge {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Online status */
.online-status {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    margin-left: 0.5rem;
}

/* Main content */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero section */
.hero-section {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    margin-bottom: 3rem;
}

.hero-logo {
    margin-bottom: 2rem;
}

.logo-image {
    width: 150px;
    height: 150px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.2);
}

/* Stats section */
.stats-section {
    text-align: center;
    margin-bottom: 3rem;
}

.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 2rem;
    color: white;
    max-width: 400px;
    margin: 0 auto;
}

.stats-card h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: white;
}

.stats-card p {
    opacity: 0.9;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ffd700;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #b0b0b0;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-accent {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: #1a1a2e;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

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

.btn-danger {
    background: linear-gradient(135deg, #f44336 0%, #da190b 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ff9800 0%, #e68900 100%);
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* User cards and grids */
.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.user-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.user-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.user-info h3 {
    color: #ffd700;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.user-stats {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.trophy-count {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.9rem;
}

.rank-pill {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.rank-bronze { background: #cd7f32; color: white; }
.rank-silver { background: #c0c0c0; color: #333; }
.rank-gold { background: #ffd700; color: #333; }
.rank-diamond { background: #b9f2ff; color: #333; }
.rank-mythic { background: #9c27b0; color: white; }
.rank-legendary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.rank-master { background: #ff6b6b; color: white; }
.rank-pro { background: linear-gradient(135deg, #ff4081 0%, #e91e63 100%); color: white; }

.user-modes, .user-availability {
    font-size: 0.9rem;
    color: #b0b0b0;
    margin-bottom: 0.5rem;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.user-actions .btn {
    flex: 1;
    min-width: 80px;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* Forms */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 0;
}

.form-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
}

.form-card h1 {
    color: #ffd700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.form-subtitle {
    color: #b0b0b0;
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e0e0e0;
    font-weight: 500;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    font-size: 1rem;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.1);
}

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

.form-errors {
    margin-top: 0.5rem;
}

.error {
    color: #ff6b6b;
    font-size: 0.9rem;
    display: block;
}

.form-footer {
    text-align: center;
    margin-top: 2rem;
    color: #b0b0b0;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
}

.form-footer a:hover {
    color: #ffd700;
}

/* Flash messages */
.flash-messages {
    margin-bottom: 2rem;
}

.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.alert-success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.alert-danger {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #ff6b6b;
}

.alert-warning {
    background: rgba(255, 152, 0, 0.2);
    border: 1px solid rgba(255, 152, 0, 0.3);
    color: #ff9800;
}

.alert-info {
    background: rgba(33, 150, 243, 0.2);
    border: 1px solid rgba(33, 150, 243, 0.3);
    color: #2196f3;
}

/* Search page */
.search-page {
    max-width: 1000px;
    margin: 0 auto;
}

.search-header {
    text-align: center;
    margin-bottom: 2rem;
}

.search-header h1 {
    color: #ffd700;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: #b0b0b0;
    font-size: 1.1rem;
}

.search-filters {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Profile page */
.profile-page {
    max-width: 800px;
    margin: 0 auto;
}

/* User ID display styles */
.user-id {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    margin: 10px 0;
    display: inline-block;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.id-label {
    font-weight: 600;
    margin-right: 8px;
}

.id-value {
    font-family: 'Courier New', monospace;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

/* Small user ID for search results */
.user-id-small {
    color: #667eea;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 4px 0;
    font-family: 'Courier New', monospace;
}

.profile-header {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    margin-bottom: 2rem;
}

.profile-header h1 {
    color: #ffd700;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.profile-stats {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.profile-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.profile-info {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
}

.info-section {
    margin-bottom: 2rem;
}

.info-section h3 {
    color: #ffd700;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-section p {
    color: #b0b0b0;
    line-height: 1.6;
}

.profile-actions {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    height: fit-content;
}

.profile-actions h3 {
    color: #ffd700;
    margin-bottom: 1rem;
    text-align: center;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Chat page */
.chat-page {
    max-width: 900px;
    margin: 0 auto;
    height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px 15px 0 0;
}

.back-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    color: #ffd700;
}

.chat-user-info h1 {
    color: #ffd700;
    margin-bottom: 0.25rem;
}

.chat-user-info p {
    color: #b0b0b0;
    font-size: 0.9rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.message {
    margin-bottom: 1rem;
    display: flex;
}

.message-sent {
    justify-content: flex-end;
}

.message-received {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 15px;
    position: relative;
}

.message-sent .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message-received .message-content {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.25rem;
    display: block;
}

.empty-chat {
    text-align: center;
    padding: 3rem;
    color: #b0b0b0;
}

.chat-form {
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 15px 15px;
    position: sticky;
    bottom: 0;
    backdrop-filter: blur(10px);
}

.message-form .form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.message-input {
    flex: 1;
    margin: 0;
    min-height: 100px;
    resize: vertical;
    font-size: 16px;
    line-height: 1.5;
    padding: 1rem;
}

.message-form .btn {
    margin: 0;
    padding: 1rem 1.5rem;
    height: fit-content;
    min-height: 50px;
}

/* Note and room code sections */
.note-section, .room-code-section {
    margin: 1rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 1rem;
}

.note-section details, .room-code-section details {
    cursor: pointer;
}

.note-section summary, .room-code-section summary {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffd700;
}

.note-section form, .room-code-section form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    margin-top: 0.5rem;
}

.note-section .form-textarea, .room-code-section .form-input {
    flex: 1;
    margin: 0;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    min-height: auto;
}

.chat-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Inbox page */
.conversations-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.conversation-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.conversation-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 215, 0, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.conversation-info h3 {
    color: #ffd700;
    margin-bottom: 0.5rem;
}

.conversation-preview {
    color: #b0b0b0;
    margin-bottom: 0.5rem;
}

.conversation-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.conversation-time {
    color: #888;
    font-size: 0.9rem;
    min-width: fit-content;
}

/* Requests page */
.requests-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.requests-section h2 {
    color: #ffd700;
    margin-bottom: 1rem;
}

.requests-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.request-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
}

.request-card.accepted {
    border-color: rgba(76, 175, 80, 0.3);
    background: rgba(76, 175, 80, 0.05);
}

.request-user h3 {
    color: #ffd700;
    margin-bottom: 0.5rem;
}

.request-time {
    color: #888;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: block;
}

.request-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.request-actions .btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.empty-message {
    color: #b0b0b0;
    font-style: italic;
    padding: 2rem;
    text-align: center;
}

/* Features section */
.features-section {
    padding: 4rem 2rem;
}

.features-section h2 {
    text-align: center;
    color: #ffd700;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.3);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: #ffd700;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: #b0b0b0;
    line-height: 1.6;
}

/* Danger zone styling */
.danger-zone {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 15px;
}

.danger-zone h3 {
    color: #ff6b6b;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.danger-zone p {
    color: #ffcdd2;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Legal pages */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.legal-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
}

.legal-content h1 {
    color: #ffd700;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.legal-intro {
    color: #b0b0b0;
    margin-bottom: 2rem;
    font-style: italic;
}

.legal-section {
    margin-bottom: 2rem;
}

.legal-section h2 {
    color: #ffd700;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.legal-section p {
    color: #e0e0e0;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.legal-section ul {
    color: #e0e0e0;
    line-height: 1.6;
    margin-left: 2rem;
}

.legal-section li {
    margin-bottom: 0.5rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.empty-state h2 {
    color: #ffd700;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #b0b0b0;
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    margin-top: 4rem;
    background: rgba(26, 26, 46, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    color: #b0b0b0;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ffd700;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .main-content {
        padding: 1rem;
    }

    .hero-section {
        padding: 2rem 1rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .user-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .profile-content {
        grid-template-columns: 1fr;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }

    .request-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .request-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .conversation-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .chat-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
/* Logout section styling */
.logout-section {
    margin: 30px 0 20px 0;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-section .btn {
    min-width: 120px;
}

/* Group Chat Styling */
.groups-page {
    max-width: 1000px;
    margin: 0 auto;
}

.groups-section {
    margin-bottom: 3rem;
}

.groups-section h2 {
    color: #ffd700;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 0.5rem;
}

.groups-list {
    display: grid;
    gap: 1rem;
}

.group-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.group-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.group-info h3 {
    color: #ffd700;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.group-description {
    color: #b0b0b0;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.group-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
}

.member-count, .privacy-indicator, .creator {
    color: #888;
}

.group-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Group Chat Interface */
.group-chat-page {
    display: grid;
    grid-template-columns: 1fr 300px;
    height: calc(100vh - 200px);
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.group-chat-header {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.group-info h1 {
    color: #ffd700;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.group-members {
    color: #b0b0b0;
    font-size: 0.9rem;
}

.group-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.admin-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #1a1a2e;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.group-chat-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.group-chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-sent .message-content {
    background: linear-gradient(135deg, #667eea, #764ba2);
    margin-left: auto;
    max-width: 70%;
}

.message-received .message-content {
    background: rgba(255, 255, 255, 0.1);
    margin-right: auto;
    max-width: 70%;
}

.message-content {
    padding: 1rem;
    border-radius: 15px;
    word-wrap: break-word;
}

.message-sender {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

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

.sender-name {
    font-weight: 600;
    color: #ffd700;
}

.sender-trophies {
    color: #888;
}

.message-body p {
    margin: 0;
    line-height: 1.4;
}

.message-time {
    color: #888;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    display: block;
}

.group-chat-input {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.input-container {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.message-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.75rem 1rem;
    color: #e0e0e0;
    resize: none;
    min-height: 45px;
    max-height: 100px;
    font-family: inherit;
}

.send-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.send-button:hover {
    transform: scale(1.05);
}

/* Refresh button for group chat - circular style to match send button */
.input-container .refresh-chat-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    min-width: 45px;
    margin-left: 0.5rem;
    color: white;
    font-size: 14px;
}

.input-container .refresh-chat-btn:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
}

/* Group Sidebar */
.group-sidebar {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1rem;
    overflow-y: auto;
}

.group-sidebar h3 {
    color: #ffd700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.members-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.member-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

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

.member-info {
    flex: 1;
    font-size: 0.9rem;
}

.member-name {
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 0.25rem;
}

.member-status {
    display: flex;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #888;
}

.group-description {
    margin-top: 2rem;
}

.group-description h4 {
    color: #ffd700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.group-description p {
    color: #b0b0b0;
    line-height: 1.4;
    font-size: 0.9rem;
}

/* Group Info Page */
.group-info-page {
    max-width: 800px;
    margin: 0 auto;
}

.detail-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.detail-card h3 {
    color: #ffd700;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.detail-item {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-item strong {
    color: #ffd700;
    display: inline-block;
    min-width: 100px;
}

.members-management h3 {
    color: #ffd700;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 0.5rem;
}

.member-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.member-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.member-details {
    flex: 1;
}

.member-name {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.member-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.member-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.current-user-badge {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.admin-section {
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.admin-section h3 {
    color: #ffd700;
    margin-bottom: 1rem;
}

.admin-info p {
    margin-bottom: 1rem;
}

.admin-info ul {
    margin-left: 1.5rem;
    color: #b0b0b0;
}

.danger-zone {
    background: rgba(255, 68, 68, 0.05);
    border: 1px solid rgba(255, 68, 68, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
}

.danger-zone h3 {
    color: #ff4444;
    margin-bottom: 1rem;
}

.admin-warning {
    margin-top: 1rem;
    color: #ffaa00;
    font-size: 0.9rem;
    background: rgba(255, 170, 0, 0.1);
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid #ffaa00;
}

/* Create Group Form */
.create-group-page {
    max-width: 600px;
    margin: 0 auto;
}

.form-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.create-group-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-help {
    color: #888;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.info-section {
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
}

.info-section h3 {
    color: #ffd700;
    margin-bottom: 1rem;
}

.guidelines-list {
    margin-left: 1.5rem;
    color: #b0b0b0;
}

.guidelines-list li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* Responsive Group Chat */
@media (max-width: 768px) {
    .group-chat-page {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .group-sidebar {
        order: -1;
        max-height: 200px;
    }
    
    .group-chat-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .group-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .member-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .member-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Text overflow and display fixes */
.message-content p, .chat-messages p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    max-width: 100%;
}

.user-card h3, .user-info h3 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 200px;
}

.filter-info {
    margin: 15px 0;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.form-help {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Mobile Chat Improvements */
.moderation-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.report-flag {
    color: #ff4757;
    font-size: 1.2em;
    text-decoration: none;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.report-flag:hover {
    background: rgba(255, 71, 87, 0.1);
    transform: scale(1.1);
}

/* Mobile-Friendly Chat Interface */
.mobile-chat-input {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-top: 10px;
}

.message-input-mobile {
    flex: 1;
    min-height: 50px !important;
    font-size: 16px !important; /* Prevents zoom on iOS */
    padding: 12px 15px !important;
    border-radius: 25px !important;
    resize: none;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.message-input-mobile:focus {
    border-color: var(--primary) !important;
    outline: none;
    background: rgba(255, 255, 255, 0.12) !important;
}

.btn-send {
    min-width: 80px;
    height: 50px;
    border-radius: 25px !important;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-chat-btn {
    min-width: 50px;
    height: 50px;
    border-radius: 25px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    margin-left: 5px;
}

.refresh-chat-btn:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.1) !important;
}

.refresh-chat-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Chat Messages Mobile Optimization */
.chat-messages {
    height: calc(100vh - 350px) !important;
    min-height: 400px !important;
    overflow-y: auto;
    padding: 20px;
    margin-bottom: 20px;
}

.message {
    margin-bottom: 15px;
    max-width: 85%;
}

.message-content p {
    font-size: 16px !important;
    line-height: 1.4;
    margin: 0;
    padding: 12px 16px;
}

.message-sent .message-content {
    background: linear-gradient(135deg, var(--primary), #667eea);
    margin-left: auto;
    border-radius: 18px 18px 4px 18px;
}

.message-received .message-content {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 18px 18px 18px 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .chat-actions {
        justify-content: space-between;
        width: 100%;
    }
    
    .chat-messages {
        height: calc(100vh - 280px) !important;
        padding: 15px;
    }
    
    .mobile-chat-input {
        padding: 15px;
        position: sticky;
        bottom: 0;
        background: var(--bg-dark);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .note-section, .room-code-section {
        margin: 10px 15px;
    }
}

/* Remove any debug/token display */
.debug-info, .token-display, .session-debug {
    display: none !important;
}

/* WhatsApp-style Group Search */
.search-section {
    margin: 20px 0;
    padding: 0 20px;
}

.search-form {
    margin-bottom: 10px;
}

.search-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-btn {
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #5a4fcf;
}

.clear-search {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.clear-search:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.search-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
    margin: 10px 0;
}

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

/* Group Invitation Button */
.group-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-direction: column;
}

.group-actions .btn-small {
    padding: 6px 12px;
    font-size: 0.85em;
}

/* Mobile Responsive Search */
@media (max-width: 768px) {
    .search-section {
        padding: 0 15px;
    }
    
    .search-input-wrapper {
        flex-direction: column;
        gap: 12px;
    }
    
    .search-input {
        width: 100%;
    }
    
    .search-btn {
        width: 100%;
        padding: 14px;
    }
    
    .clear-search {
        position: static;
        transform: none;
        align-self: flex-end;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
}

/* Empty Search Results */
.empty-search {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.empty-search h2 {
    color: var(--accent);
    margin-bottom: 10px;
}

.empty-search p {
    margin-bottom: 20px;
}

/* Invitation System Styling */
.invitation-page, .invitations-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.invitation-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.form-container {
    margin-bottom: 30px;
}

.invitation-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.invitation-info {
    margin-bottom: 20px;
}

.invite-code h3 {
    color: var(--primary);
    font-size: 1.5em;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.invite-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.invitation-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.detail-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.detail-value {
    color: var(--accent);
    font-weight: 500;
}

.invitation-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

.info-box {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(108, 92, 231, 0.05));
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
}

.info-box h3 {
    color: var(--primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box ul {
    list-style: none;
    padding: 0;
}

.info-box li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
}

.info-box li:last-child {
    border-bottom: none;
}

.info-box strong {
    color: var(--accent);
}

.invitations-list {
    margin-bottom: 30px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .invitation-page, .invitations-page {
        padding: 15px;
    }
    
    .invitation-form {
        padding: 20px;
    }
    
    .invitation-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .invitation-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .invitation-actions .btn {
        width: 100%;
    }
    
    .invite-link {
        font-size: 0.8em;
        padding: 10px;
    }
}

/* Copy button success state */
.btn.success-state {
    background: var(--success) !important;
    color: white !important;
}

/* Enhanced empty state for invitations */
.invitations-page .empty-state {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.invitations-page .empty-state h2 {
    color: var(--accent);
    margin-bottom: 15px;
}

.invitations-page .empty-state p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
    font-size: 1.1em;
}
/* Enhanced Group Chat Input for Bigger Chat Box */

.message-input-large {
    min-height: 80px !important;
    padding: 16px 20px !important;
    font-size: 1.1em !important;
    border-radius: 16px !important;
}

.message-input-large:focus {
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.3) !important;
}

/* Hide any debug/session info that might leak */
.session-info, .debug-data, .token-info, .code-display, 
input[type="hidden"], .csrf-token, .hidden-field {
    display: none !important;
}

/* Hide all hidden inputs that might accidentally be visible */
input[name="csrf_token"], input[name="group_id"] {
    display: none !important;
    position: absolute !important;
    left: -9999px !important;
    visibility: hidden !important;
}

/* Modal styling for report functionality */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    margin: 10% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--danger);
    margin: 0;
    font-size: 1.3em;
}

.close {
    color: rgba(255, 255, 255, 0.6);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: white;
}

.modal-body {
    padding: 25px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

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

.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    font-weight: 600;
}

.form-select, .form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 1em;
}

.form-select:focus, .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.2);
}

/* Mobile Modal */
@media (max-width: 768px) {
    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

/* Live Typing Indicators */
.typing-indicator {
    padding: 8px 16px;
    margin: 5px 0;
    background-color: rgba(108, 117, 125, 0.1);
    border-radius: 20px;
    font-size: 14px;
    color: #6c757d;
    font-style: italic;
    display: flex;
    align-items: center;
    max-width: 250px;
    animation: fadeIn 0.3s ease-in;
}

.typing-dots {
    display: flex;
    margin-right: 8px;
}

.typing-dots span {
    height: 8px;
    width: 8px;
    background-color: #6c757d;
    border-radius: 50%;
    display: inline-block;
    margin-right: 3px;
    animation: typingAnimation 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
    margin-right: 0;
}

.typing-text {
    color: #6c757d;
    font-size: 13px;
}

@keyframes typingAnimation {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

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