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

body {
    font-family: 'Roboto', sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
}

/* Main Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 1.4rem;
}

h1 {
    font-size: 2.5rem;
    color: #1a73e8;
    font-weight: 700;
}

.subtitle {
    color: #5f6368;
    font-size: 1.34rem;
    font-weight: 300;
}

/* Chat Rooms */
.chat-rooms {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-room {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #f8f9fa;
    border: 1px solid #eaeaea;
    padding: 20px;
}

.chat-room {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    background-color: #f8f9fa;
    border: 1px solid #eaeaea;
    padding: 20px;
}

.chat-room.active {
    border: 3px solid #4CAF50; /* Green border for active rooms */
}

.chat-room:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.room-info {
    width: 100%;
}

.room-number, .room-users {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1rem;
    color: #333;
}

.user-count {
    font-weight: normal;
    color: #000; /* Default black color for zero */
}

.user-count.active {
    color: #4CAF50; /* Green color for active rooms */
}

.room-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.enter-button {
    background-color: #4CAF50;
    font-size: 1rem;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

.enter-button:hover {
    background-color: #3e8e41;
}

.share-button {
    background-color: #1a73e8;
    font-size: 1rem;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

.share-button:hover {
    background-color: #0d62d1;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
}

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

.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    margin: 0;
}

/* Improve desktop modal centering */
@media (min-width: 769px) {
    .modal-content {
        text-align: center;
    }
    
    .modal-content form {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .modal-content .form-group {
        width: 100%;
        text-align: left;
    }
    
    .modal-content .form-submit-button {
        margin: 0 auto;
    }
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
}

.close-modal:hover,
.close-modal:focus {
    color: black;
    text-decoration: none;
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.share-option {
    padding: 12px;
    border: none;
    border-radius: 4px;
    background-color: #f0f0f0;
    cursor: pointer;
    font-size: 1rem;
    text-align: left;
    transition: background-color 0.2s;
}

.share-option:hover {
    background-color: #e0e0e0;
}

#copyLink {
    background-color: #1a73e8;
    color: white;
}

#copyLink:hover {
    background-color: #0d62d1;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 0.1rem;
    padding-top: 0.1rem;
    color: #5f6368;
    font-size: 1rem;
}

/* Create Room Form */
.create-room-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background-color: #f8f9fa;
    border: 1px solid #eaeaea;
    padding: 20px;
    margin-top: 7px;
    text-align: center;
}

.create-room-title {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.create-room-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.form-group {
    width: 100%;
    max-width: 400px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    text-align: center;
}

.form-group input::placeholder {
    text-align: center;
}

#user-name-input {
    text-align: center;
}

#user-name-input::placeholder {
    text-align: center;
}

.form-help-text {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
    text-align: center;
}

@media (max-width: 768px) {
    .form-help-text {
        font-size: 0.8rem;
        padding-bottom: 10px;
    }
}

/* Desktop-specific styles */
@media (min-width: 769px) {
    /* Explicitly ensure mobile elements are never shown on desktop */
    .mobile-menu-toggle,
    .mobile-dropdown {
        display: none !important;
    }
    
    /* Ensure desktop menu is always shown on desktop */
    .menu-links {
        display: flex !important;
    }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    /* Explicitly ensure desktop menu is never shown on mobile */
    .menu-links {
        display: none !important; /* Hide regular menu on mobile */
    }
    
    /* Explicitly ensure mobile menu elements are visible on mobile */
    .mobile-menu-toggle {
        display: block !important; /* Show mobile menu toggle on mobile */
    }
    
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.06rem;
    }
    
    .room-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .enter-button, .share-button {
        padding: 8px 16px;
        font-size: 1rem;
    }
}

/* Mobile calendar styles - add this to your styles.css file */
@media (max-width: 768px) {
    /* Calendar specific adjustments */
    .calendar-container {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Ensure the calendar fits the screen width */
    .month-view, .week-view, .day-view {
        width: 100%;
        max-width: 100%;
        font-size: 0.8rem;
    }
    
    /* Make day cells smaller but still usable */
    .day-cell {
        min-height: 60px;
    }
    
    /* Adjust event display for smaller cells */
    .event-item {
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Adjust modal for better mobile experience */
    .modal-content {
        width: 95%;
        max-width: none;
        padding: 15px;
    }
    
    /* Make form elements more touch-friendly */
    .form-group input, 
    .form-group select, 
    .form-group textarea {
        font-size: 16px;
        padding: 10px;
    }
}

/* Today's Events Section */
.todays-events-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background-color: #f8f9fa;
    border: 1px solid #eaeaea;
    padding: 20px;
    margin-top: 25px;
    text-align: center;
}

.todays-events-title {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.todays-events-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.event-card {
    width: 100%;
    max-width: 600px;
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.event-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #1a73e8;
}

.event-time {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.event-description {
    margin: 15px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    white-space: pre-wrap;
    text-align: center;
}

.event-description.collapsed {
    max-height: 100px;
    overflow: hidden;
    position: relative;
    padding-bottom: 30px; 
}

.event-description.collapsed::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(transparent, white);
}

.event-room {
    margin-top: 10px;
    font-weight: 500;
}

.event-room a {
    color: #4CAF50;
    text-decoration: none;
}

.event-room a:hover {
    text-decoration: underline;
}

.see-more-btn {
    display: block;
    margin: 10px auto 0 auto;
    background: none;
    border: none;
    color: #3a86ff;
    cursor: pointer;
    padding: 5px 0;
    text-align: center;
    font-size: 0.9rem;
}

.description-text {
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
    line-height: 1.5;
}

.see-more-btn:hover {
    text-decoration: underline;
}

.no-events {
    color: #666;
    font-style: italic;
    padding: 20px;
}

.loading-events {
    color: #666;
    padding: 20px;
}

.timezone-selector-container {
    margin-top: 15px;
    text-align: center;
}

.timezone-selector {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    margin-left: 10px;
}

@media (max-width: 768px) {
    .event-card {
        width: 90%;
    }
    
    .timezone-selector-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .timezone-selector {
        margin-left: 0;
        width: 80%;
    }
}

/* Online Users Section */
.online-users-container {
    background-color: #f5f5f5;
    border-radius: 12px;
    padding: 20px;
    display: block;
    margin: 25px auto 10px auto;
    font-size: 14px;
    width: 100%;
    max-width: 936px; /* Match the effective width of containers inside .container */
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #eaeaea;
}

.online-users-count {
    font-weight: bold;
    color: #4CAF50;
    font-size: 15px; /* Slightly larger font */
}

.online-users-list-container {
    margin-top: 8px; /* Increased from 5px */
    padding: 8px; /* Increased from 5px */
    background-color: #fff;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    max-height: 100px;
    overflow-y: auto;
    text-align: center;
}

.online-users-list {
    display: inline;
    line-height: 1.6;
    text-align: center;
}

.online-user {
    display: inline-block;
    margin: 3px 5px; /* Slightly increased margins */
    padding: 3px 10px; /* Slightly increased padding */
    background-color: #e8f5e9;
    border-radius: 12px;
    color: #2e7d32;
    font-size: 12px;
    transition: background-color 0.2s ease; /* Smooth hover effect */
}

.online-user:hover {
    background-color: #c8e6c9; /* Darker green on hover */
    cursor: pointer;
}

.no-users {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 5px;
}

#namePopupModal {
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#namePopupModal .modal-content {
    max-width: 400px;
}

#user-name-input {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-bottom: 5px;
}

#name-error-message {
    color: red;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
    text-align: center;
}

/* Profile styles */
.profile-container {
    max-width: 936px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
}

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

.profile-name {
    font-size: 2rem;
    color: #1a73e8;
    margin-bottom: 10px;
    text-align: center;
}

.profile-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: center;
}

.status-online {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-offline {
    background-color: #f5f5f5;
    color: #757575;
}

.profile-info {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.info-item {
    margin-bottom: 15px;
    text-align: center;
}

.info-label {
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
    text-align: center;
}

.info-value {
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    word-break: break-word;
    text-align: center;
}

.profile-actions {
    margin-top: 30px;
    text-align: center;
}

.edit-profile-btn {
    background-color: #1a73e8;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.edit-profile-btn:hover {
    background-color: #0d62d1;
}

/* Members page styles */
.members-container {
    max-width: 100%; /* Take up full width of its parent container */
    margin: 0 auto;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
}

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

.member-card {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.member-name {
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #1a73e8;
    text-align: center;
}

.member-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-top: 5px;
}

.member-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.member-joined {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    text-align: center;
}

.search-container {
    margin-bottom: 20px;
    text-align: center;
}

#member-search {
    padding: 10px;
    width: 100%;
    max-width: 400px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Member since styling */
.member-since {
    margin: 10px 0 20px;
    color: #666;
    font-size: 0.9rem;
    text-align: center;
}

.tab-pane.active {
    display: block;
}

/* Member card avatar */
.member-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #1a73e8;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile adjustments for modals */
@media (max-width: 768px) {
    .modal {
        align-items: center; /* Center vertically on mobile */
        justify-content: center; /* Center horizontally on mobile */
        padding: 0; /* Remove padding */
    }
    
    .modal-content {
        max-height: 80vh; /* Slightly shorter to ensure it's fully visible */
        width: 90%; /* Slightly wider on mobile */
        margin: 0; /* Remove any margin */
    }
    
    #namePopupModal {
        align-items: center; /* Ensure vertical centering */
    }
    
    #namePopupModal .modal-content {
        margin: 0; /* Remove any margin */
    }
}

/* New room creation styles */
.highlight-room {
    animation: highlight-pulse 3s ease-in-out;
}

@keyframes highlight-pulse {
    0% { box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(66, 133, 244, 0); }
    100% { box-shadow: 0 0 0 0 rgba(66, 133, 244, 0); }
}

/* Mobile-specific styling for login/register modal input fields */
@media (max-width: 768px) {
    /* Make form groups full width */
    #namePopupModal .form-group {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Make inputs full width */
    #namePopupModal .form-group input {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Consistent spacing between form elements */
    #namePopupModal .form-group {
        margin-bottom: 15px !important;
    }
    
    /* Ensure error message has consistent spacing */
    #namePopupModal #name-error-message {
        width: 100% !important;
        margin-bottom: 15px !important;
    }
}

@media (max-width: 768px) {
    .enter-button, .share-button {
        width: calc(50% - 7.5px) !important;
        padding: 8px 16px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        flex: 0 0 auto !important;
    }
    
    .room-buttons {
        gap: 15px;
        width: 100%;
        justify-content: center;
    }
}

/* Hide scrollbars for all elements while maintaining scroll functionality */
* {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;     /* Firefox */
}

/* Hide scrollbars for Chrome, Safari and Opera */
*::-webkit-scrollbar {
    display: none;
}

/* Login/register modal buttons styling for all screen sizes */
#namePopupModal form {
    display: flex;
    flex-direction: column;
}

#namePopupModal .enter-button,
#namePopupModal .share-button {
    width: calc(50% - 7.5px) !important;
    box-sizing: border-box !important;
    padding: 12.5px !important;
}

#namePopupModal form .enter-button,
#namePopupModal form .share-button {
    display: inline-block !important;
}

#namePopupModal form:after {
    content: "";
    display: table;
    clear: both;
}

/* Button container wrapper */
#namePopupModal .modal-buttons-container {
    display: flex !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin-top: 10px !important;
    margin-bottom: 15px !important;
    gap: 15px !important;
}

