.base-container {
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-container {
    flex: 1;
    margin: 0 2rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: calc(100% - 4rem);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    height: calc(100vh - 80px); /* Account for navbar height */
    overflow: hidden;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 24px var(--shadow-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    min-height: 0; /* This is crucial for flex child scrolling */
}

.meme-license-container {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border-radius: 40px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 24px var(--shadow-color);
    display: flex;
    flex-direction: row;
    gap: 1rem;
    width: 100%;
    min-height: 0; /* This is crucial for flex child scrolling */
}

.ui-server-list {
    height: 100%;
    overflow-y: auto;
    margin: 16px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 24px var(--shadow-color);
}

.message {
    display: flex;
    align-items: flex-start;
    margin: 0 0;
    gap: 0.5rem;
}

.profile-picture {
    width: 40px;
    height: 40px;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border-radius: 5px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px var(--shadow-color);
    background: rgba(255, 255, 255, 0.1);
}

.message-bubble {
    background: var(--message-bubble-color);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    padding: 0.75rem;
    border-radius: 0 var(--border-radius) var(--border-radius) var(--border-radius);
    flex-grow: 1;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 12px var(--shadow-color);
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.username {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color, #fff);
    text-shadow: 0 2px 4px var(--shadow-color);
}

.timestamp {
    color: var(--text-secondary, rgba(255, 255, 255, 0.6));
    font-size: 0.8rem;
}

.message-content {
    color: var(--text-color, rgba(255, 255, 255, 0.9));
    font-size: 0.95rem;
}

.message-form {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 24px var(--shadow-color);
    margin-top: auto;
}

.message-input {
    flex: 1;
    background: var(--background-element, rgba(255, 255, 255, 0.1));
    border: none;
    padding: 0.4rem 1.5rem;
    color: var(--text-color, white);
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
}

.message-input:hover, .message-input:focus {
    background-color: rgba(255, 255, 255, 0.3);
}

.ui-button {
    background: var(--background-element, rgba(255, 255, 255, 0.1));
    padding: 0.4rem 1.5rem;
    color: var(--text-color, white);
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.ui-group {
    display: flex;
    flex-direction: row;

    background: var(--background-element, rgba(255, 255, 255, 0.1));
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 100%;
    color: var(--text-color, white);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-color);

    overflow: hidden;
}

.ui-layout-horizontal {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin: 0;
    padding: 0;
    width: 100%;
}

.ui-element-standalone {
    background: var(--background-element, rgba(255, 255, 255, 0.1));
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.8rem 1.5rem;
    color: var(--text-color, white);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.ui-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--background-element, rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-color);
    position: relative;
    z-index: 1000;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 2px 4px var(--shadow-color);
    white-space: nowrap;
}


.selector {
    position: relative;
    display: inline-block;

    background: rgba(255, 255, 255, 0.01);
    width: max-content;

    /* background: var(--background-element, rgba(255, 255, 255, 0.1)); */
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px var(--shadow-color);

    color: var(--text-color, white);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
}

.selector-items {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: -1px;
    right: -1px;

    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px var(--shadow-color);
    z-index: 1002;

    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    overflow: hidden;
}

.selector:hover .selector-items {
    display: block;
}

.selector-button {
    background: none;
    width: 100%;
    padding: 0.4rem 1.5rem;
    border: none;
    color: var(--text-color, white);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

.selector-label {
    background: none;
    width: 100%;
    padding: 0.4rem 1.5rem;
    border: none;
    color: var(--text-color, white);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
    position: relative;
    padding-right: 2rem;
    border-radius: var(--border-radius);
}

.selector-label::after {
    content: "▼";
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    opacity: 0.7;
}

.selector-button:hover {
    color: var(--glow-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.selector-button.active {
    color: var(--glow-color);
    font-weight: 500;
}

/* Custom scrollbar */
.messages-container::-webkit-scrollbar {
    width: 8px;
}

.messages-container::-webkit-scrollbar-track {
    background: transparent;
}

.messages-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
