/* Global Styles */
:root {
    --sidebar-width: 280px;
    --sidebar-bg: #1e1e24;
    /* Dark Sidebar */
    --sidebar-text: #e0e0e0;
    --accent-color: #3b82f6;
    /* Blue accent */
    --hover-bg: #2d2d35;
    --active-bg: #3b82f6;
    --main-bg: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--main-bg);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Global Header */
.global-header {
    background-color: var(--sidebar-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
    padding-right: 24px;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    border-right: 1px solid #333;
    flex-shrink: 0;
    transition: width 0.3s ease;
    position: relative;
}



.session-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
}

.session-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.session-item:hover {
    background-color: var(--hover-bg);
}

.session-item.active {
    background-color: var(--active-bg);
    color: #fff;
}

.thumbnail {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.thumb-icon {
    font-size: 1.2rem;
}

.session-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.session-title {
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.session-date {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 2px;
}

/* Main Content Styling */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--main-bg);
}



.iframe-container {
    flex: 1;
    position: relative;
    padding: 20px;
    overflow: hidden;
    transition: padding 0.3s ease;
}

.iframe-container.full-view {
    padding: 0;
}

.iframe-container.full-view iframe {
    border-radius: 0;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Branding Styles */
.header-brand {
    display: flex;
    align-items: center;
    height: 100%;
}

.brand-logo-wrapper {
    width: var(--sidebar-width);
    display: flex;
    align-items: center;
    padding-left: 20px;
    box-sizing: border-box;
    position: relative;
    flex-shrink: 0;
}

.brand-logo-wrapper::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 36px;
    background-color: #ff7b00;
}

.brand-title-wrapper {
    display: flex;
    align-items: center;
    padding-left: 20px;
}

.brand-logo {
    height: 22px;
    width: auto;
}

.brand-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Header Actions Styling */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    width: 14px;
    height: 14px;
    color: var(--text-secondary);
}

.search-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 8px 16px 8px 36px;
    color: #fff;
    font-size: 0.85rem;
    width: 200px;
    transition: all 0.3s ease;
    outline: none;
}

.search-input:focus {
    width: 260px;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--active-bg);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.lang-dropdown {
    background: #1e1e24; /* Solid background for options visibility */
    color: #fff; /* Selected text color */
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    appearance: none; /* Custom look */
}

.lang-dropdown option {
    background: #1e1e24;
    color: #94a3b8; /* Unselected/Other options in gray */
}

.lang-dropdown:hover {
    border-color: var(--active-bg);
}

.globe-3d:hover {
    transform: scale(1.1);
    filter: brightness(1.2) drop-shadow(0 0 12px rgba(59, 130, 246, 0.6));
}

.globe-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.globe-3d {
    width: 44px; /* Increased size slightly for better visibility */
    height: 44px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.globe-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.5));
    border-radius: 50%; /* Ensure it stays circular if any edges exist */
}


/* Sidebar Footer & Toggle */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #333;
    background-color: #1a1a20;
}

.auto-view-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auto-view-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #aaa;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #4b4b55;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--active-bg);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

/* Auto-view Checkboxes */
.session-checkbox {
    margin-right: 12px;
    display: flex;
    align-items: center;
    opacity: 0.3; /* Faint by default */
    transition: opacity 0.2s ease;
}

/* Show full opacity on hover of the item */
.session-item:hover .session-checkbox {
    opacity: 1;
}

body:not(.auto-view-active) .session-checkbox,
.sidebar.collapsed .session-checkbox {
    display: none !important;
}

.auto-view-check {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: var(--accent-color);
    border-radius: 4px;
}

/* Sidebar Collapse & Toggle Button */
.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .session-info,
.sidebar.collapsed .auto-view-label {
    display: none;
}

.sidebar.collapsed .session-item {
    justify-content: center;
    padding: 10px 0;
    margin: 4px auto; /* Centered without forcing overflow */
    width: 56px;
    height: 56px;
}

.sidebar.collapsed .thumbnail {
    margin-right: 0;
    width: 40px; /* Sized to fit comfortably */
    height: 40px;
}

.sidebar.collapsed .sidebar-footer {
    padding: 20px 10px; /* Reduced padding to fit switch */
    display: flex;
    justify-content: center;
}

.sidebar.collapsed .auto-view-control {
    justify-content: center;
}

.sidebar-toggle {
    position: absolute;
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.sidebar-toggle:hover {
    background-color: var(--active-bg);
    color: #fff;
    border-color: var(--active-bg);
}