/* ===== HEADER ===== */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    height: 64px;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.logo-icon {
    width: 100px;
    height: auto;
}
.logo-text {
    font-size: 22px;
    font-weight: 500;
    color: var(--gm-text);
    letter-spacing: -0.02em;
}

.sign-in-link {
    color: var(--gm-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.2s;
}
.sign-in-link:hover {
    background: rgba(26,115,232,0.06);
}

/* ===== MAIN ===== */
.meet-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 24px 8px;
    overflow-y: auto;
}

.meet-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 48px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ===== PREVIEW SECTION (Left) ===== */
.preview-section {
    flex: 1;
    max-width: 640px;
    min-width: 0;
}

.preview-tile {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #202124;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.preview-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4285f4, #34a853);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.preview-menu {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.4);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s;
}
.preview-menu:hover { background: rgba(0,0,0,0.6); }
.preview-menu svg { width: 18px; height: 18px; }

/* Preview controls inside video */
.preview-controls {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
}
.preview-ctrl-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    background: transparent;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 0.2s;
}
.preview-ctrl-btn:hover { background: rgba(255,255,255,0.1); }
.preview-ctrl-btn svg { width: 22px; height: 22px; }


/* Device selectors */
.device-selectors {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    justify-content: center;
}
.device-select {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--gm-border);
    border-radius: 20px;
    background: var(--gm-surface);
    font-size: 13px;
    color: var(--gm-text-secondary);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.device-select:hover {
    background: var(--gm-bg);
    border-color: #bdc1c6;
}
.device-select svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.device-select-label {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.device-select-chevron {
    width: 14px !important;
    height: 14px !important;
}

/* ===== JOIN SECTION (Right) ===== */
.join-section {
    width: 360px;
    min-width: 360px;
    padding-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.join-heading {
    font-size: 28px;
    font-weight: 400;
    color: var(--gm-text);
    margin-bottom: 8px;
}

.name-input-wrap {
    position: relative;
}
.name-input {
    width: 100%;
    height: 56px;
    padding: 16px;
    border: 1px solid var(--gm-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    color: var(--gm-text);
    background: var(--gm-surface);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.name-input:focus {
    border-color: var(--gm-blue);
    box-shadow: 0 0 0 1px var(--gm-blue);
}
.name-input::placeholder {
    color: #80868b;
}
.name-counter {
    text-align: right;
    font-size: 12px;
    color: var(--gm-text-secondary);
    margin-top: 6px;
}

/* Gemini toggle */
.gemini-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--gm-border);
    border-radius: 12px;
    background: #f8f9fa;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.gemini-toggle:hover {
    background: #f1f3f4;
    border-color: #bdc1c6;
}
.gemini-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e8f0fe;
    color: var(--gm-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.gemini-icon svg { width: 18px; height: 18px; }
.gemini-text {
    flex: 1;
}
.gemini-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--gm-text);
}
.gemini-subtitle {
    font-size: 12px;
    color: var(--gm-text-secondary);
    margin-top: 2px;
}
.gemini-start-btn {
    height: 32px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid var(--gm-border);
    background: var(--gm-surface);
    color: var(--gm-blue);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.gemini-start-btn:hover {
    background: #f1f3f4;
    border-color: #bdc1c6;
}

/* Ask to join button */
.ask-join-btn {
    width: 100%;
    height: 48px;
    border-radius: 24px;
    border: none;
    background: #2d8cff;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 8px;
}
.ask-join-btn:hover:not(:disabled) { background: #1a73e8; }
.ask-join-btn:active:not(:disabled) { transform: scale(0.98); }
.ask-join-btn:disabled {
    background: #e8eaed;
    color: #9aa0a6;
    cursor: not-allowed;
}

/* Other ways button */
.other-ways-btn {
    width: 100%;
    height: 40px;
    border-radius: 20px;
    border: 1px solid var(--gm-border);
    background: var(--gm-surface);
    color: var(--gm-text-secondary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s, border-color 0.2s;
}
.other-ways-btn:hover {
    background: var(--gm-bg);
    border-color: #bdc1c6;
}
.other-ways-btn svg { width: 16px; height: 16px; }

/* ===== FOOTER ===== */
.meet-footer {
    text-align: center;
    padding: 12px 24px 24px;
    font-size: 12px;
    color: var(--gm-text-secondary);
    flex-shrink: 0;
}
.meet-footer a {
    color: var(--gm-blue);
    text-decoration: none;
}
.meet-footer a:hover { text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .meet-container {
        flex-direction: column;
        align-items: center;
    }
    .join-section {
        width: 100%;
        max-width: 640px;
        min-width: auto;
        padding-top: 24px;
    }
    .preview-section {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .preview-tile { border-radius: 12px; }
    .preview-avatar { width: 72px; height: 72px; }
    .preview-avatar svg { width: 40px; height: 40px; }
    header { padding: 12px 16px; }
    .meet-main { padding: 12px 16px 8px; }
    .join-heading { font-size: 24px; }
    .device-selectors { flex-wrap: wrap; }
    .device-select { padding: 6px 10px; font-size: 12px; }
}
