* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #0d0f12; color: #fff; height: 100vh; overflow: hidden; display: flex; flex-direction: column; }

/* Top Header */
.top-header {
    height: 56px;
    background: #14171d;
    border-bottom: 1px solid #232936;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
    z-index: 10;
}

.header-brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffcc00 0%, #ff9900 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-widgets { display: flex; align-items: center; gap: 15px; }
.header-search {
    background: #0d0f12;
    border: 1px solid #2d3748;
    border-radius: 8px;
    padding: 6px 12px;
    color: #fff;
    font-size: 0.85rem;
    width: 220px;
}
.header-search:focus { outline: none; border-color: #ffcc00; }

/* Main App Layout */
#lobby { display: flex; flex-grow: 1; height: calc(100vh - 56px); overflow: hidden; }

/* Left Sidebar */
.sidebar-left {
    width: 250px;
    background: #14171d;
    border-right: 1px solid #232936;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
}

.nav-group { display: flex; flex-direction: column; gap: 15px; }

.btn-create {
    background: #ffcc00;
    color: #121212;
    border: none;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.2);
    width: 100%;
}
.btn-create:hover { background: #ffe066; transform: translateY(-1px); }

.nav-section-title { font-size: 0.75rem; text-transform: uppercase; color: #5a6578; letter-spacing: 1px; margin-bottom: 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: #a0aec0; border-radius: 8px; cursor: pointer; font-size: 0.9rem; transition: 0.2s; }
.nav-item:hover, .nav-item.active { background: #1e2430; color: #fff; }

.sidebar-footer {
    border-top: 1px solid #232936;
    padding-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 0.75rem;
}
.sidebar-footer a { color: #5a6578; text-decoration: none; transition: 0.2s; }
.sidebar-footer a:hover { color: #a0aec0; text-decoration: underline; }

/* Central Content Area */
.main-content { flex-grow: 1; padding: 24px; overflow-y: auto; }
.header-title { font-size: 1.4rem; margin-bottom: 20px; font-weight: 700; }
.rooms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

.room-card {
    background: #161a22;
    border: 1px solid #232936;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    position: relative;
}
.room-card:hover { transform: translateY(-3px); border-color: #ffcc00; }

.card-preview { height: 140px; background-size: cover; background-position: center; filter: blur(18px); opacity: 0.6; transform: scale(1.1); }
.card-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    padding: 14px; display: flex; flex-direction: column; justify-content: space-between;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(22,26,34,0.95) 100%);
}

.card-header { display: flex; justify-content: space-between; align-items: center; }
.users-badge { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px); padding: 4px 8px; border-radius: 20px; font-size: 0.75rem; color: #ffcc00; font-weight: 600; }
.fav-btn { background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; cursor: pointer; }

.room-title { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { background: #232936; font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; color: #a0aec0; }
.tag-lang { background: rgba(255, 204, 0, 0.15); color: #ffcc00; border: 1px solid rgba(255, 204, 0, 0.3); font-weight: 600; }

/* Right Sidebar */
.sidebar-right {
    width: 260px;
    background: #14171d;
    border-left: 1px solid #232936;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
}

.status-box {
    background: #161a22;
    border: 1px solid #232936;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.status-label { font-size: 0.8rem; color: #a0aec0; font-weight: 600; }
.toggle-btn {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}
.mode-online { background: rgba(72, 187, 120, 0.2); color: #48bb78; border: 1px solid #48bb78; }
.mode-incognito { background: rgba(160, 174, 192, 0.2); color: #a0aec0; border: 1px solid #a0aec0; }

.friends-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.friend-item { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: #a0aec0; }
.avatar-placeholder { width: 32px; height: 32px; border-radius: 50%; background: #232936; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; }

/* Modals */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(8px); z-index: 1000;
    align-items: center; justify-content: center;
}

.modal-box {
    display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 380px;
    background: #161a22; padding: 28px; border-radius: 16px; border: 1px solid #2d3748;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8); position: relative; text-align: left;
}

.close-modal { position: absolute; top: 12px; right: 16px; color: #718096; font-size: 1.4rem; cursor: pointer; }

.form-label { font-size: 0.8rem; color: #a0aec0; margin-top: 6px; display: block; margin-bottom: 4px; font-weight: 600; }
.form-input { width: 100%; padding: 10px 12px; background: #0d0f12; border: 1px solid #2d3748; border-radius: 8px; color: #fff; font-size: 0.9rem; }
.form-input:focus { border-color: #ffcc00; outline: none; }

.btn-auth { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 12px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; transition: 0.2s; }
.btn-google { background: #ffffff; color: #1a202c; }
.btn-meta { background: #1877f2; color: #ffffff; }

/* Jitsi Overlay Controls */
#meet { display: none; width: 100vw; height: calc(100vh - 56px); }
#link-box {
    position: absolute; top: 70px; left: 50%; transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85); padding: 8px 16px; border-radius: 8px; z-index: 100;
    display: flex; align-items: center; gap: 12px; border: 1px solid #333; backdrop-filter: blur(8px);
}
#link-text { color: #fff; font-family: monospace; font-size: 0.85rem; }
.copy-btn { background: #ffcc00; border: none; padding: 6px 12px; font-weight: bold; cursor: pointer; border-radius: 6px; color: #121212; font-size: 0.8rem; }
.home-btn { background: #232936; border: 1px solid #3a4454; padding: 6px 12px; font-weight: bold; cursor: pointer; border-radius: 6px; color: #fff; font-size: 0.8rem; transition: 0.2s; }
