.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

.app-header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    flex-shrink: 0;
    z-index: 10;
}

.app-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.app-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
}

.app-main {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

.app-playerbar {
    min-height: var(--playerbar-height);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    z-index: 10;
    overflow: hidden;
}

/* Header elements */
.header-menu-btn {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.header-menu-btn:hover {
    background: var(--bg-hover);
}

.header-brand {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--accent);
    margin-right: 8px;
    white-space: nowrap;
}

.header-search {
    flex: 1;
    max-width: 400px;
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: border-color var(--transition);
}

.header-search:focus {
    border-color: var(--accent);
}

.header-search::placeholder {
    color: var(--text-muted);
}

.header-spacer {
    flex: 1;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    transition: background var(--transition);
}

.header-btn:hover {
    background: var(--bg-hover);
}

.header-btn-primary {
    background: var(--accent);
    color: white;
}

.header-btn-primary:hover {
    background: var(--accent-hover);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    position: relative;
    transition: background var(--transition);
}

.header-user:hover {
    background: var(--bg-hover);
}

.header-user-name {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.header-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: white;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px;
    min-width: 180px;
    z-index: 100;
}

.user-dropdown button {
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    transition: background var(--transition);
}

.user-dropdown button:hover {
    background: var(--bg-hover);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

.dropdown-danger {
    color: #e74c3c !important;
}

.dropdown-danger:hover {
    background: rgba(231, 76, 60, 0.15) !important;
}

/* Feedback stars */
.feedback-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 0;
}

.feedback-star {
    font-size: 32px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 150ms ease, transform 150ms ease;
    user-select: none;
}

.feedback-star:hover,
.feedback-star.active {
    color: #f1c40f;
    transform: scale(1.15);
}

/* Sidebar elements */
.sidebar-section {
    padding: 12px;
}

.sidebar-section-title {
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
    font-size: var(--font-size-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-item:hover {
    background: var(--bg-hover);
}

.sidebar-item.active {
    background: var(--accent-dim);
    color: var(--accent);
}

.sidebar-item-icon {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.sidebar-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-item-count {
    margin-left: auto;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    flex-shrink: 0;
}

.sidebar-add-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    width: 100%;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.sidebar-add-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 12px;
}
